Instructions to use opendiffusionai/stablediffusion_t5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use opendiffusionai/stablediffusion_t5 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("opendiffusionai/stablediffusion_t5", 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
Update demo.py
Browse filesused pipe.enable_sequential_cpu_offload() for lower vram use.
demo.py
CHANGED
|
@@ -10,8 +10,8 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 10 |
torch_dtype=torch.bfloat16,
|
| 11 |
)
|
| 12 |
|
| 13 |
-
print("model initialized.
|
| 14 |
-
pipe.
|
| 15 |
|
| 16 |
print("Trying render now...")
|
| 17 |
images = pipe("a misty Tokyo alley at night",num_inference_steps=30).images
|
|
|
|
| 10 |
torch_dtype=torch.bfloat16,
|
| 11 |
)
|
| 12 |
|
| 13 |
+
print("model initialized.")
|
| 14 |
+
pipe.enable_sequential_cpu_offload()
|
| 15 |
|
| 16 |
print("Trying render now...")
|
| 17 |
images = pipe("a misty Tokyo alley at night",num_inference_steps=30).images
|