Views
No views yet
A fashionable woman wearing oversized white sunglasses and orange lipstick. woman, fashion, sunglasses, oversized glasses, white sunglasses, orange lipstick, makeup, portrait, close-up, monochrome, dark hair, straight hair, chic, stylish, modern, glamour, glossy, high contrast, minimalistic background, beauty, contemporary, bold, accessory, trendy, cosmetic, facial expression, luxurious, elegant, sophisticated, high fashion.3.50.020None421024x10241import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'hmpark/lora-training'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "A fashionable woman wearing oversized white sunglasses and orange lipstick. woman, fashion, sunglasses, oversized glasses, white sunglasses, orange lipstick, makeup, portrait, close-up, monochrome, dark hair, straight hair, chic, stylish, modern, glamour, glossy, high contrast, minimalistic background, beauty, contemporary, bold, accessory, trendy, cosmetic, facial expression, luxurious, elegant, sophisticated, high fashion."
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=20,
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")