Instructions to use stabilityai/stable-diffusion-xl-base-0.9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-diffusion-xl-base-0.9 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", 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
CLIP max_position_embeddings defaults to 77
#49
by ComicGPT - opened
The prompts are being cut down to 77 tokens. How to change/increase this value. Sorry new to this
I think A1111's implementation has a mechanism for extending prompt length, and you can do something similar in ComfyUI.
There's a catch, though: Overly long or complicated prompts are unlikely to be usefully interpreted anyway. Use finetuning, T2I-Adaptor, or ControlNet or any of the varieties similar techniques if you need finer control.
Supposedly there would be official releases of some of those soon enough. Some of those are already deployed on Clipdrop.