Text-to-Image
Diffusers
UniDiffuserPipeline
image-to-text
image-captioning
image-variation
text-variation
multi-modality
generative model
Instructions to use thu-ml/unidiffuser-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use thu-ml/unidiffuser-v0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("thu-ml/unidiffuser-v0", 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
Download model_index.json from thu-ml/unidiffuser-v0: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/thu-ml/unidiffuser-v0/resolve/main/model_index.json
- Command line
-
hf download hf://thu-ml/unidiffuser-v0/model_index.json
-
curl -L -o model_index.json https://huggingface.co/thu-ml/unidiffuser-v0/resolve/main/model_index.json
699 Bytes
| { | |
| "_class_name": "UniDiffuserPipeline", | |
| "_diffusers_version": "0.21.0.dev0", | |
| "clip_image_processor": [ | |
| "transformers", | |
| "CLIPImageProcessor" | |
| ], | |
| "clip_tokenizer": [ | |
| "transformers", | |
| "CLIPTokenizer" | |
| ], | |
| "image_encoder": [ | |
| "transformers", | |
| "CLIPVisionModelWithProjection" | |
| ], | |
| "scheduler": [ | |
| "diffusers", | |
| "DPMSolverMultistepScheduler" | |
| ], | |
| "text_decoder": [ | |
| "unidiffuser", | |
| "UniDiffuserTextDecoder" | |
| ], | |
| "text_encoder": [ | |
| "transformers", | |
| "CLIPTextModel" | |
| ], | |
| "text_tokenizer": [ | |
| "transformers", | |
| "GPT2Tokenizer" | |
| ], | |
| "unet": [ | |
| "unidiffuser", | |
| "UniDiffuserModel" | |
| ], | |
| "vae": [ | |
| "diffusers", | |
| "AutoencoderKL" | |
| ] | |
| } | |