KongKang224/v0.6
pruned encoder weights to save VRAM
2 min readupdated
A set of pruned text and vision encoder weights based on shaohao011/LynnReal-Hand-Fast-preview. The author stripped out layers and modules that are never used during encoding: unused Qwen3-VL layers and the VAE (variational autoencoder) decoder. The text encoder output remains bit-for-bit identical to the original 64-layer version, while total file size drops by 30.4% — from 77.17 GB down to ~53.7 GB. This repository is built for developers and hobbyists looking to cut VRAM usage and download overhead without sacrificing accuracy.
Key features
- Smaller total footprint: Repository size is reduced by 30.4% (from 77.17 GB to ~53.7 GB).
- Trimmed text encoder:
text_encoder/keeps Qwen3-VL with 51 hidden layers (layers[0..50]) and drops thelm_head, saving ~14.5 GB. - Bit-for-bit identical output: Because H3 reads unnormalized states from
outputs.hidden_states[50](the output oflayers[49]), the result matches the 64-layer original exactly. - VAE memory savings:
vae_encoder/keeps only theencoder.*andquant_conv.*modules fromAutoencoderKLMiniMaxH3(decoder removed), saving ~8.9 GB on download and ~9 GiB of GPU VRAM.
What you can do
- Optimize LynnReal-Hand-Fast-preview pipelines: Swap in these pruned encoders in
diffusersto free up roughly 9 GiB of VRAM during the encoding stage. - Speed up deployment and caching: Cut download times and disk usage when precomputing text and image embeddings for H3 pipelines.
Example
The repository includes two directories with ready-to-use weights for diffusers pipelines: text_encoder/ (Qwen3-VL with num_hidden_layers = 51) and vae_encoder/ (the AutoencoderKLMiniMaxH3 encoder without its decoder). Drop them in to replace the full weights from shaohao011/LynnReal-Hand-Fast-preview when extracting latent representations.
Read more
DetailsBase model: shaohao011/LynnReal-Hand-Fast-preview
Total size: ~53.7 GB instead of 77.17 GB (-30.4%)
VRAM savings: ~9 GiB GPU VRAM from removing the VAE decoder
Limitation: The decoder is removed from vae_encoder, so these components are for the encoding stage only










Comments