Views
No views yet
loona from helluva boss is eating a donut3.50.015None4210241{
2 "algo": "lokr",
3 "multiplier": 1.0,
4 "linear_dim": 1000000,
5 "linear_alpha": 1,
6 "full_matrix": true,
7 "factor": 10,
8 "apply_preset": {
9 "target_module": [
10 "FluxSingleTransformerBlock",
11 "FluxTransformerBlock"
12 ],
13 "module_algo_map": {
14 "FeedForward": {
15 "factor": 6
16 }
17 }
18 }
19}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 = "loona from helluva boss is eating a donut"
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=15,
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=1024,
19 height=1024,
20 guidance_scale=3.5,
21).images[0]
22image.save("output.png", format="PNG")