VQDecode
Turning Lumina-DiMOO's tokens back into pixels
- vq_tokens
- vqvae
- image
Every Lumina-DiMOO workflow ends the same way: the generator hands you a flat array of VQ token IDs, and VQDecode is the node that turns them into an actual image you can preview or save. It's the mirror image of the encoder half - same VQ-VAE, opposite direction. If you've used a Stable Diffusion pipeline, this is the "VAE decode" step, except instead of a continuous latent tensor it's decoding a grid of discrete codebook indices.
You can't skip it. The generators output tokens, not pixels, and nothing else in ComfyUI knows how to read them.
How it works
Two inputs, both required: vq_tokens (VQ_TOKENS) straight from Generator_T2I or Generator_I2I, and vqvae (LUMINA_VQ) from LoadModel. The generator embeds the image's height and width inside the token bundle it returns, so VQDecode reads those, reshapes the flat token sequence into an H/16 × W/16 grid, subtracts the 126,356 codebook offset, and runs it through the VQ-VAE decoder with force_not_quantize=True. The output gets clipped to [0,1] and returned as a standard ComfyUI IMAGE tensor.
One output:
- image (IMAGE) → any display or save node, typically
PreviewImageorSaveImage.
Because each token maps to a 16×16 patch, the decode resolution is locked to whatever resolution the token graph was built at. There's no magic upscale here - this is a codec decode, and you get out roughly what the generator drew. If you want bigger, upscale after, like you would with any other model.
The mismatch error, and why you'll see it
The one failure mode worth knowing about: if the token count doesn't match height × width / 256, the node throws a clear VQ codes length mismatch error. That happens when you feed it a token bundle whose recorded resolution disagrees with the actual token sequence - for instance, if you somehow wire tokens from a T2I graph into a decode expecting a different canvas. The error message literally prints both numbers, so it's easy to diagnose. In normal graphs - matching ImageTokens_* → Generator_* → VQDecode - it never fires.
Installing it
VQDecode ships with the ComfyUI-Lumina-DiMOO pack. Install via ComfyUI Manager (search ComfyUI-Lumina-DiMOO) or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/L-Hugh/ComfyUI-Lumina-DiMOO.git
cd ComfyUI-Lumina-DiMOO
pip install -r requirements.txt
Then restart ComfyUI, and remember the model weights are a separate ~17 GB download (hf download Alpha-VLLM/Lumina-DiMOO --local-dir .../models/lumina_dimoo) that has to include the vqvae/ subfolder - this node literally cannot run without the VQ-VAE half of that download.
Two honest caveats, same as the rest of this pack: the pinned requirements.txt (old torch, old transformers) can fight your ComfyUI environment, and the underlying model is early-adopter territory. But as far as the graph goes, VQDecode is the easiest node here - two wires in, an image out, nothing to tune. It's the relief after the sampler finishes its work.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| vq_tokens | VQ_TOKENS | — | |
| vqvae | LUMINA_VQ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |