Views
No views yet
ps2 graphics, fog filled space, subliminal5.00.020None421024x10241{
2 "algo": "lora",
3 "multiplier": 1.0,
4 "linear_dim": 64,
5 "linear_alpha": 32,
6 "apply_preset": {
7 "target_module": [
8 "Attention",
9 "FeedForward"
10 ],
11 "module_algo_map": {
12 "Attention": {
13 "factor": 16
14 },
15 "FeedForward": {
16 "factor": 8
17 }
18 }
19 }
20}1import torch
2from diffusers import DiffusionPipeline
3from lycoris import create_lycoris_from_weights
4
5model_id = 'stabilityai/stable-diffusion-3.5-medium'
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 = "ps2 graphics, fog filled space, subliminal"
12negative_prompt = 'blurry, cropped, ugly'
13pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
14image = pipeline(
15 prompt=prompt,
16 negative_prompt=negative_prompt,
17 num_inference_steps=20,
18 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
19 width=1024,
20 height=1024,
21 guidance_scale=5.0,
22).images[0]
23image.save("output.png", format="PNG")