Views
No views yet
diffusers1import torch
2from diffusers import DiffusionPipeline
3
4model_id = "black-forest-labs/FLUX.1-dev"
5adapter_id = "alvarobartt/ghibli-characters-flux-lora"
6
7pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
8pipeline.load_lora_weights(adapter_id)
9pipeline.to("cuda")
10
11prompt = (
12 "Ghibli style futuristic stormtrooper with glossy white armor and a sleek helmet,"
13 " standing heroically on a lush alien planet, vibrant flowers blooming around, soft"
14 " sunlight illuminating the scene, a gentle breeze rustling the leaves"
15)
16
17image = pipeline(
18 prompt=prompt,
19 num_inference_steps=30,
20 width=1024,
21 height=768,
22 guidance_scale=3.5,
23).images[0]
24
25image.save("ghibli.png", format="PNG")