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 |

|
| 14 |

|
| 15 |

|
|
|
|
| 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 |

|
| 32 |

|
| 33 |

|