Diffusers
How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Anzhc/Qwen2D-VAE", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

A modification of Qwen-Image-VAE to remove temporal dimension, collapsing it from 3D to 2D. Primarily meant for caching latents for training, but also can be used in ComfyUI to save a second ever so often.

Why?

Because you don't need temporal dimension for Image models (unless you're doing research related to temporally consistent gens on them).

Collapsing it to 2D does not alter output, while reducing required VRAM 3x, and speeding it up 2.5x.

But what if im using temporal dimension for control input?

You don't encode them in temporal dimension, they are separate latents. It works.

изображение

Fully compatible with image models using Qwen/Wan VAEs.

Use this node pack to use it in your ComfyUI - https://github.com/Anzhc/anzhc-qwen2d-comfyui

Downloads last month
7,318
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Anzhc/Qwen2D-VAE

Base model

Qwen/Qwen-Image
Finetuned
(84)
this model
Finetunes
1 model

Collection including Anzhc/Qwen2D-VAE