Instructions to use nitrosocke/classic-anim-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nitrosocke/classic-anim-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nitrosocke/classic-anim-diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Add diffusers model
#8
by patrickvonplaten - opened
This PR adds the weights to run the diffusers code snippet:
from diffusers import StableDiffusionPipeline
import torch
model_id = "nitrosocke/classic-anim-diffusion"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "classic disney style magical princess with golden hair"
image = pipe(prompt).images[0]
image.save("./magical_princess.png")
patrickvonplaten changed pull request status to open
Depending on the seed the above gives:
Note that on current main:
pip install git+https://github.com/huggingface/diffusers.git
we now also have the euler scheduler which seems to work very well with just 20 diffusion steps. E.g.:
from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
import torch
model_id = "nitrosocke/classic-anim-diffusion"
euler_scheduler = EulerDiscreteScheduler.from_config(model_id, subfolder="scheduler")
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=euler_scheduler, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "classic disney style magical princess with golden hair"
image = pipe(prompt).images[0]
image.save("./magical_princess.png")
nitrosocke changed pull request status to merged
Thank you so much!
The results from euler look very nice! Any chance that DPM2 Karren will be available in the future?
Yes, the DPM2 and Heun schedulers will be available soon (~in next 8-10 days).
