Qwen Image VAE
Full FP32 Training of Decoder
Works in ComfyUI
Feel free to to suggest onsite support, to civitai staff. I don't think they have any agreements like with FLUX
Overview
This model is a fine-tuned variant of the base Qwen Image VAE, modified to emphasize high-frequency detail preservation and expanded color representation, following an HDR-style reconstruction objective.
The evaluation compares the base and HDR-tuned models using perceptual, structural, distributional, and photometric metrics over identical input data.
Evaluation Summary
Perceptual Fidelity (LPIPS)
Base: 0.0177
HDR: 0.0786
The HDR model exhibits a significant increase in perceptual distance, indicating reduced strict identity reconstruction under deep feature similarity metrics and a shift toward detail-enhancing reconstruction behavior.
Structural Energy (Gradient Magnitude)
Ground Truth: 404.02 (both models)
Base Reconstruction: 313.46
HDR Reconstruction: 687.97
The base model demonstrates strong low-pass behavior with reduced high-frequency content. In contrast, the HDR model exhibits high-frequency amplification, exceeding the structural energy of the original inputs.
Color Distribution Support
Ground Truth: 33150.61 (both models)
Base Reconstruction: 35004.49
HDR Reconstruction: 40133.37
The HDR model produces a substantially expanded color support space, indicating increased chromatic dispersion and reduced quantization collapse.
Photometric Stability
Brightness Bias
Base: 0.000351
HDR: 0.0000098
Contrast Gain
Base: 0.9984
HDR: 0.99999
Both models preserve global photometric consistency, with the HDR variant showing near-perfect affine stability.
Channel Drift
Red Shift:
Base: +0.0116
HDR: +0.0104
Green Shift:
Base: -0.0606
HDR: -0.1856
Blue Shift:
Base: +0.0187
HDR: +0.0219
The HDR model introduces a significantly stronger negative bias in the green channel, while maintaining comparable red and blue stability.
Interpretation
The base Qwen VAE behaves as a contractive perceptual projection operator, prioritizing smooth reconstructions and suppression of high-frequency components.
The HDR-tuned variant transitions into a detail-amplifying reconstruction operator, characterized by:
Increased high-frequency energy
Expanded color manifold coverage
Higher perceptual divergence under LPIPS
Preserved global photometric invariance
This represents a functional shift from a smoothing autoencoder regime toward a high-frequency preserving (HDR-like) reconstruction regime.
Description
FAQ
Comments (17)
Good work!!
Thank you so much for this amazing VAE! It completely fixes the infamous pixel patterns and blurry details associated with the standard qwen_vae.
Since almost every model that uses qwen_vae suffers from these flaws, your work is an absolute lifesaver.
If it’s not too much trouble, it would be incredible to see another variation in the future: one that fixes the pixelation and blurriness but keeps the original color palette of the standard qwen_vae.
Sometimes, the slightly muted colors of the original qwen_vae actually work really well depending on the theme of the image. Having a version like that would make it possible to cover absolutely any artistic style.
Thanks again for your hard work!
Possibly - However the training was the result of dozens of objective failures. The ratio of edge density without rewarding just noise, increased lab color space/rewarding non quantized colors - and standard mse per pixel would likely have to be adjusted many times
@Felldude
Ah, I see! It sounds like it requires way more trial and error, time, and effort than I initially imagined. Thank you for explaining the technical details.
Honestly, for most images, your hdr_vae gives a much better impression anyway, as the colors feel closer to natural memory colors. Plus, I can always just adjust the tones in post-processing with color correction if I really need to.
Given the immense amount of work it would take, my suggestion definitely isn't worth putting you through all that trouble. Please don't worry about it at all, and thanks again for the fantastic work!
P.S. It looks like merging it with the original qwen_vae might give a nice in-between balance, so I'll experiment with it a bit and find a sweet spot I like!
Thank you for this gem! This literally solved the blurriness of the previous main VAE and i thought it was because of the loras i use, appreciate it friend!
Thanks
Can I use this on T4 GPU or I just better stay with the original Qwen VAE for Anima?
Either version would run on T4 with Anima - FP32 VAE with forced FP16 mode would likely be the fastest given the card is Telsa you would likely not want to use BF16
@Felldude Ok, thanks I will try now.
@Felldude I have one other question. How do I reduce a checkpoint file size for Anima? yes I know Anima is already small but I found some that are 5GB and I want to reduce them for personal use only. Do you have a workflow or something for it? I would like to learn so I don't bother you again, last question I would like to now if I can also do it on a T4 GPU as well.
@theist1001 For INT Convrot it reduces it to 2.5GB or so, I have a converted finetune or you can download the tool from github if you want to convert your own
@Felldude Ok, I have the thing from Github. Thank you so much for all the answers you are the only one who answered. I do apreciate that.