|
|
--- |
|
|
license: creativeml-openrail-m |
|
|
tags: |
|
|
- stable-diffusion |
|
|
- text-to-image |
|
|
--- |
|
|
# MakotoShinkai-Style-Diffusion |
|
|
This is the fine-tuned Stable Diffusion model trained by dreambooth with 10k steps, images dataset from MakotoShinkai's videos. |
|
|
Use the tokens **MakotoShinkaiStyle** in your prompts for the effect. |
|
|
### 🧨 Diffusers |
|
|
|
|
|
This model can be used just like any other Stable Diffusion model. For more information, |
|
|
please have a look at the [Stable Diffusion](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion). |
|
|
|
|
|
You can also export the model to [ONNX](https://huggingface.co/docs/diffusers/optimization/onnx), [MPS](https://huggingface.co/docs/diffusers/optimization/mps) and/or [FLAX/JAX](). |
|
|
|
|
|
```python |
|
|
from diffusers import StableDiffusionPipeline |
|
|
import torch |
|
|
import os |
|
|
from PIL import Image |
|
|
model_id = "michaelz/MakotoShinkai-Style-Diffusion" |
|
|
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32) |
|
|
pipe.requires_safety_checker = False |
|
|
pipe.safety_checker = None |
|
|
pipe = pipe.to("cuda") |
|
|
|
|
|
save_dir = os.path.join("results") |
|
|
os.makedirs(save_dir,exist_ok=True) |
|
|
prompt_list = [ |
|
|
"MakotoShinkaiStyle, a beautiful sky", |
|
|
"MakotoShinkaiStyle, a beautiful landscape", |
|
|
"MakotoShinkaiStyle, a beautiful city"] |
|
|
for prompt in prompt_list: |
|
|
torch.manual_seed(-1) |
|
|
image = pipe(prompt,width = 512,height = 512).images[0] |
|
|
save_path = os.path.join(save_dir,prompt + ".png") |
|
|
image.save(save_path) |
|
|
``` |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
### Sample images from the model: |
|
|
|
|
|
**Version 1** (MakotoShinkai-Style-Diffusion-10k): This model was trained by dreambooth by 10k steps |