Views
No views yet
caitlin and roxy sit together on a rooftop under the setting sun, the golden light bathing their faces in a soft glow, caitlin tall, athletic frame is relaxed as she leans back, dressed in a casual tank top that highlights her muscular build, while roxy, much smaller in stature, is perched next to her in a loose-fitting hoodie, her pink hair tousled by the wind, they share a quiet laugh, their bond of friendship bringing out a sense of relaxed femininity in both of them, contrasting their tough exteriors3.50.020None42768x13441{
2 "algo": "lokr",
3 "multiplier": 1.0,
4 "linear_dim": 10000,
5 "linear_alpha": 1,
6 "factor": 12,
7 "apply_preset": {
8 "target_module": [
9 "Attention",
10 "FeedForward"
11 ],
12 "module_algo_map": {
13 "Attention": {
14 "factor": 12
15 },
16 "FeedForward": {
17 "factor": 6
18 }
19 }
20 }
21}1import torch
2from diffusers import DiffusionPipeline
3from lycoris import create_lycoris_from_weights
4
5model_id = 'black-forest-labs/FLUX.1-dev'
6adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
7lora_scale = 1.0
8wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
9wrapper.merge_to()
10
11prompt = "caitlin and roxy sit together on a rooftop under the setting sun, the golden light bathing their faces in a soft glow, caitlin tall, athletic frame is relaxed as she leans back, dressed in a casual tank top that highlights her muscular build, while roxy, much smaller in stature, is perched next to her in a loose-fitting hoodie, her pink hair tousled by the wind, they share a quiet laugh, their bond of friendship bringing out a sense of relaxed femininity in both of them, contrasting their tough exteriors"
12
13pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
14image = pipeline(
15 prompt=prompt,
16 num_inference_steps=20,
17 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
18 width=768,
19 height=1344,
20 guidance_scale=3.5,
21).images[0]
22image.save("output.png", format="PNG")