Views
No views yet
black-forest-labs/FLUX.1-Kontext-dev model to transform images into Avatar-style Na'vi characters, inspired by the visuals from James Cameron's Avatar films.1from diffusers import StableDiffusionPipeline
2from peft import PeftModel
3import torch
4
5# Load the base model
6pipe = StableDiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.float16).to("cuda")
7
8# Load the LoRA adapter
9pipe.unet.load_attn_procs("your-username/flux-kontext-na-vi-lora")
10
11# Use the model
12prompt = "A close-up portrait of a Na'vi warrior in a glowing forest, cinematic lighting"
13image = pipe(prompt).images[0]
14image.save("output.png")