Text-to-Image
Diffusers
Safetensors
English
StableDiffusionPipeline
stable-diffusion
cvpr
image-generation
compositionality
Instructions to use mlpc-lab/TokenCompose_SD21_A with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use mlpc-lab/TokenCompose_SD21_A with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("mlpc-lab/TokenCompose_SD21_A", 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
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,7 +22,7 @@ from diffusers import StableDiffusionPipeline
|
|
| 22 |
model_id = "mlpc-lab/TokenCompose_SD21_A"
|
| 23 |
device = "cuda"
|
| 24 |
|
| 25 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.
|
| 26 |
pipe = pipe.to(device)
|
| 27 |
|
| 28 |
prompt = "A cat and a wine glass"
|
|
|
|
| 22 |
model_id = "mlpc-lab/TokenCompose_SD21_A"
|
| 23 |
device = "cuda"
|
| 24 |
|
| 25 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
| 26 |
pipe = pipe.to(device)
|
| 27 |
|
| 28 |
prompt = "A cat and a wine glass"
|