Views
No views yet
a selfie image of erica cherry with red hair and curls wearing a green swimsuit sitting by the pool. she is smiling and holding an ice cream cone3.50.015None4210241import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'ericac/flux-lora-training'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "a selfie image of erica cherry with red hair and curls wearing a green swimsuit sitting by the pool. she is smiling and holding an ice cream cone"
10
11
12pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
13image = pipeline(
14 prompt=prompt,
15 num_inference_steps=15,
16 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
17 width=1024,
18 height=1024,
19 guidance_scale=3.5,
20).images[0]
21image.save("output.png", format="PNG")