Views
No views yet
anime style digital art of a girl with long blue-green hair and green eyes wearing a white button down shirt and a short black pleated skirt. She has a happy look on her face and is holding up a peace sign.3.50.020None9023110241import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'Disra/anime-lora-test-08'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "anime style digital art of a girl with long blue-green hair and green eyes wearing a white button down shirt and a short black pleated skirt. She has a happy look on her face and is holding up a peace sign."
10
11pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
12image = pipeline(
13 prompt=prompt,
14 num_inference_steps=20,
15 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
16 width=1024,
17 height=1024,
18 guidance_scale=3.5,
19).images[0]
20image.save("output.png", format="PNG")