Update README.md
Browse files
README.md
CHANGED
@@ -10,6 +10,24 @@ tags:
|
|
10 |
# Totoro LoRA text2image fine-tuning
|
11 |
These are LoRA adaption weights for nitrosocke/Ghibli-Diffusion.
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
![image1](./1de49996ce1f160a03e6f56db21b2fb11f38dbe9a867b04175e3145614ea7328.png)
|
14 |
![image2](./2b475450b9a5eee5338f2a867186a58fcdd191945d9c3c1cb9f4bfc8f932df20.png)
|
15 |
![image3](./3f5b7cb8c1aa4366cd152fdfedf8beb8e7bc09057e29b1497dc87e8bb038136f.png)
|
|
|
10 |
# Totoro LoRA text2image fine-tuning
|
11 |
These are LoRA adaption weights for nitrosocke/Ghibli-Diffusion.
|
12 |
|
13 |
+
```python
|
14 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
15 |
+
model_id,
|
16 |
+
torch_dtype=torch.float16,
|
17 |
+
safety_checker=None,
|
18 |
+
)
|
19 |
+
pipe.enable_xformers_memory_efficient_attention()
|
20 |
+
pipe.load_lora_weights(./lora_weights)
|
21 |
+
pipe = pipe.to('cuda')
|
22 |
+
|
23 |
+
image = pipe(
|
24 |
+
prompt='Totoro',
|
25 |
+
num_inference_steps=66,
|
26 |
+
guidance_scale=6.9,
|
27 |
+
cross_attention_kwargs={'scale': 0.6 },
|
28 |
+
).images[0]
|
29 |
+
```
|
30 |
+
|
31 |
![image1](./1de49996ce1f160a03e6f56db21b2fb11f38dbe9a867b04175e3145614ea7328.png)
|
32 |
![image2](./2b475450b9a5eee5338f2a867186a58fcdd191945d9c3c1cb9f4bfc8f932df20.png)
|
33 |
![image3](./3f5b7cb8c1aa4366cd152fdfedf8beb8e7bc09057e29b1497dc87e8bb038136f.png)
|