Model reference · open weights

versatile-diffusion

Image shi-labs Text→image 1 build Open weights 2k dl/mo

versatile-diffusion is an open-weight image model from shi-labs. versatile-diffusion (BF16) weighs 12.3 GB; the smallest configuration that runs it is RTX 4060 Ti 16 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Versatile Diffusion is a diffusion-based multimodal generation model developed by shi-labs that supports text-to-image, image-to-text, image variation, and text variation tasks.
  • The model operates in English and is released under the MIT license.

Summary of the shi-labs/versatile-diffusion model card, 2026-10-01

What it is

Released byshi-labs
Released2022-11-22
VRAM12.3 GB for the weights

What it runs on

Memory and cards for versatile-diffusion (BF16)

12.3 GBweights, file size
6.8 GBbiggest part
5.0 GBworking memory, one 1024² image
537 MBruntime overhead
CardOne imageMemory
RTX 3060 12 GBdoes not fit11.6 GB
RTX 4060 Ti 16 GBfits (encoders offloaded)15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What shi-labs says about versatile-diffusion

Read the model card

We built Versatile Diffusion (VD), the first unified multi-flow multimodal diffusion framework, as a step towards Universal Generative AI. Versatile Diffusion can natively support image-to-text, image-variation, text-to-image, and text-variation, and can be further extended to other applications such as semantic-style disentanglement, image-text dual-guided generation, latent image-to-text-to-image editing, and more. Future versions will support more modalities such as speech, music, video and 3D.

Resources for more information: GitHub, arXiv.

Model Details

One single flow of Versatile Diffusion contains a VAE, a diffuser, and a context encoder, and thus handles one task (e.g., text-to-image) under one data type (e.g., image) and one context type (e.g., text). The multi-flow structure of Versatile Diffusion shows in the following diagram:

  • Developed by: Xingqian Xu, Atlas Wang, Eric Zhang, Kai Wang, and Humphrey Shi
  • Model type: Diffusion-based multimodal generation model
  • Language(s): English
  • License: MIT
  • Resources for more information: GitHub Repository, Paper.
  • Cite as:
      @article{xu2022versatile,
      	title        = {Versatile Diffusion: Text, Images and Variations All in One Diffusion Model},
      	author       = {Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, Humphrey Shi},
      	year         = 2022,
      	url          = {https://arxiv.org/abs/2211.08332},
      	eprint       = {2211.08332},
      	archiveprefix = {arXiv},
      	primaryclass = {cs.CV}
      }

Usage

You can use the model both with the 🧨Diffusers library and the SHI-Labs Versatile Diffusion codebase.

🧨 Diffusers

Diffusers let's you both use a unified and more memory-efficient, task-specific pipelines.

Make sure to install transformers from "main" in order to use this model.:

pip install git+https://github.com/huggingface/transformers

VersatileDiffusionPipeline

To use Versatile Diffusion for all tasks, it is recommend to use the VersatileDiffusionPipeline

#! pip install git+https://github.com/huggingface/transformers diffusers torch
from diffusers import VersatileDiffusionPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

pipe = VersatileDiffusionPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
pipe = pipe.to("cuda")

# prompt
prompt = "a red car"

# initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"
response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")

# text to image
image = pipe.text_to_image(prompt).images[0]

# image variation
image = pipe.image_variation(image).images[0]

# image variation
image = pipe.dual_guided(prompt, image).images[0]

Task Specific

The task specific pipelines load only the weights that are needed onto GPU. You can find all task specific pipelines here.

You can use them as follows:

Text to Image

from diffusers import VersatileDiffusionTextToImagePipeline
import torch

pipe = VersatileDiffusionTextToImagePipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
pipe.remove_unused_weights()
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe("an astronaut riding on a horse on mars", generator=generator).images[0]
image.save("./astronaut.png")
Image variations
from diffusers import VersatileDiffusionImageVariationPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"
response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")

pipe = VersatileDiffusionImageVariationPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
image = pipe(image, generator=generator).images[0]
image.save("./car_variation.png")
Dual-guided generation
from diffusers import VersatileDiffusionDualGuidedPipeline
import torch
import requests
from io import BytesIO
from PIL import Image

# download an initial image
url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"

response = requests.get(url)
image = Image.open(BytesIO(response.content)).convert("RGB")
text = "a red car in the sun"

pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
pipe.remove_unused_weights()
pipe = pipe.to("cuda")

generator = torch.Generator(device="cuda").manual_seed(0)
text_to_image_strength = 0.75

image = pipe(prompt=text, image=image, text_to_image_strength=text_to_image_strength, generator=generator).images[0]
image.save("./red_car.png")

Original GitHub Repository

Follow the instructions here.

Cautions, Biases, and Content Acknowledgment

We would like the raise the awareness of users of this demo of its potential issues and concerns. Like previous large foundation models, Versatile Diffusion could be problematic in some cases, partially due to the imperfect training data and pretrained network (VAEs / context encoders) with limited scope. In its future research phase, VD may do better on tasks such as text-to-image, image-to-text, etc., with the help of mor

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

How it works

How image models work

Text promptwhat to makeText encoderunderstands itDiffusion stepsdenoise to pixelsImagePNG / JPEGA diffusion model starts from noise and denoises it, guided by your prompt, into a finished image.

Running it yourself

Run it on a rented GPU

Rent a machine by the hour. Runs as it is with diffusers, on the machine, in Python.

# on your rented machine: pip install diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.bfloat16).to("cuda")
image = pipe(prompt="a red bicycle on a cobbled street").images[0]
image.save("/workspace/out.png")
Renting a GPU: connect, tunnels, Python
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms