Bonsai-27B-GGUF
lmstudio-community · Kit
A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…
Replaces the Wan2.1 VAE decoder with one that upscales images 2x and removes speckle and grain artifacts, for ComfyUI and diffusers. For people who generate images with Wan or Qwen models.
Wan2.1-VAE-upscale2x is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download spacepxl/Wan2.1-VAE-upscale2x
Only the decoder of the Wan2.1 VAE was retrained here, and it now doubles the image size as part of decoding. Its main job is to get rid of the speckles, polka dots and grain that the original decoder leaves in Wan images. It also helps in hires fix workflows, since the extra resolution costs almost no extra compute. The first release is trained on images only.
It suits people who generate images with Wan or Qwen models and want cleaner, larger output, in ComfyUI or in Python code.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Image generation | ComfyUI users | Decode latents with the 2x decoder instead of upscaling afterwards | Replacing a separate upscaler step in a hires fix workflow |
| Digital art | Creators of realistic images | Get cleaner skin and hair detail from a decoder | Decoding a generated portrait and comparing it with the original decoder |
| Software | Developers using diffusers | Swap the VAE in a Wan pipeline for this one | Loading it with the Wan autoencoder class |
| Research | VAE researchers | Study a decoder-only finetune built on perceptual losses | Reading the card's notes on LPIPS, FDL and GAN loss |
If your images are anime, line art or text, you can skip it, since the card says it was trained almost only on real images.
| Use case | Who | What they get back |
|---|---|---|
| Clean decoding | Image generators | Pictures without the speckle and grain of the original decoder |
| Hires fix | ComfyUI users | A 2x larger image straight from the decoder |
| Original size output | Anyone who wants the old resolution | A slight blur and downsample gives a cleaner image at the original size |
pip install -U huggingface_hub hf download spacepxl/Wan2.1-VAE-upscale2x
In ComfyUI, the custom nodes load the VAE and decode latents in a way that matches the native nodes. Wan wrapper latents also work once they are de-normalized with the right wrapper node. In diffusers, decode the latents and rearrange the 12 output channels with a pixel shuffle.
import torch
import torch.nn.functional as F
from diffusers import AutoencoderKLWan
vae = AutoencoderKLWan.from_pretrained("spacepxl/Wan2.1-VAE-upscale2x", subfolder="diffusers/Wan2.1_VAE_upscale2x_imageonly_real_v1")
decoder_out = vae.decode(latents, return_dict=False)[0] # [B, 12, F, H, W]
decoded_video = F.pixel_shuffle(decoder_out.movedim(2, 1), upscale_factor=2).movedim(1, 2) # pixel shuffle needs [..., C, H, W] format
# or just use decoder_out.squeeze(2) for images to convert BCFHW to BCHW| Tool | What it does |
|---|---|
| AutoencoderKLWan | Loads the VAE in diffusers |
| vae.decode | Turns latents into a 12-channel output |
| F.pixel_shuffle | Rearranges those channels into an image at twice the size |
| ComfyUI-VAE-Utils | Custom nodes for loading and decoding latents in ComfyUI |
You decode the latents of a generated portrait with this decoder. The picture comes out at twice the resolution, with fewer speckles in skin and hair. For the original size, blur it slightly and scale it back down.
A VAE converts between pictures and the compact latent form that image models work in. Its decoder turns a latent back into a picture. This decoder also makes the picture twice as large. A good first try is the ComfyUI route with the custom nodes.
Under the hood, the encoder stays unchanged and frozen, so the latent space is preserved, and only the decoder is trained. The last Conv3d layer of the decoder was swapped so it outputs 12 channels instead of 3, and a pixel shuffle turns them into a larger image. Training combines L1, LPIPS, FDL and GAN losses, and the final run took about 40 hours on a single 5090.
Replaces the Wan2.1 VAE decoder with one that upscales images 2x and removes speckle and grain artifacts, for ComfyUI and diffusers. For people who generate images with Wan or Qwen models.
Made by spacepxl on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: Only the decoder of the Wan2.1 VAE was retrained here, and it now doubles the image size as part of decoding. Its main job is to get rid of the speckles, polka dots and grain that the original decoder leaves in Wan images. It also helps in hires fix workflows, since the extra resolution costs almost no extra compute. The first release is trained on images only.
Who it suits: It suits people who generate images with Wan or Qwen models and want cleaner, larger output, in ComfyUI or in Python code.
Industry | Who uses it | How they use it | Example
Image generation | ComfyUI users | Decode latents with the 2x decoder instead of upscaling afterwards | Replacing a separate upscaler step in a hires fix workflow
Digital art | Creators of realistic images | Get cleaner skin and hair detail from a decoder | Decoding a generated portrait and comparing it with the original decoder
Software | Developers using diffusers | Swap the VAE in a Wan pipeline for this one | Loading it with the Wan autoencoder class
Research | VAE researchers | Study a decoder-only finetune built on perceptual losses | Reading the card's notes on LPIPS, FDL and GAN loss
If your images are anime, line art or text, you can skip it, since the card says it was trained almost only on real images.
Where to use it:
Use case | Who | What they get back
Clean decoding | Image generators | Pictures without the speckle and grain of the original decoder
Hires fix | ComfyUI users | A 2x larger image straight from the decoder
Original size output | Anyone who wants the old resolution | A slight blur and downsample gives a cleaner image at the original size
How to set it up:
pip install -U huggingface_hub
hf download spacepxl/Wan2.1-VAE-upscale2x
How to use it: In ComfyUI, the custom nodes load the VAE and decode latents in a way that matches the native nodes. Wan wrapper latents also work once they are de-normalized with the right wrapper node. In diffusers, decode the latents and rearrange the 12 output channels with a pixel shuffle.
import torch
import torch.nn.functional as F
from diffusers import AutoencoderKLWan
vae = AutoencoderKLWan.from_pretrained("spacepxl/Wan2.1-VAE-upscale2x", subfolder="diffusers/Wan2.1_VAE_upscale2x_imageonly_real_v1")
decoder_out = vae.decode(latents, return_dict=False)[0] # [B, 12, F, H, W]
decoded_video = F.pixel_shuffle(decoder_out.movedim(2, 1), upscale_factor=2).movedim(1, 2) # pixel shuffle needs [..., C, H, W] format
# or just use decoder_out.squeeze(2) for images to convert BCFHW to BCHW
Tool | What it does
AutoencoderKLWan | Loads the VAE in diffusers
vae.decode | Turns latents into a 12-channel output
F.pixel_shuffle | Rearranges those channels into an image at twice the size
ComfyUI-VAE-Utils | Custom nodes for loading and decoding latents in ComfyUI
Example: You decode the latents of a generated portrait with this decoder. The picture comes out at twice the resolution, with fewer speckles in skin and hair. For the original size, blur it slightly and scale it back down.
For newcomers and experts: A VAE converts between pictures and the compact latent form that image models work in. Its decoder turns a latent back into a picture. This decoder also makes the picture twice as large. A good first try is the ComfyUI route with the custom nodes.
Under the hood, the encoder stays unchanged and frozen, so the latent space is preserved, and only the decoder is trained. The last Conv3d layer of the decoder was swapped so it outputs 12 channels instead of 3, and a pixel shuffle turns them into a larger image. Training combines L1, LPIPS, FDL and GAN losses, and the final run took about 40 hours on a single 5090.
Latents from a Wan or Qwen model
Retrained decoder with 12 output channels
Pixel shuffle
Image at twice the resolution
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download spacepxl/Wan2.1-VAE-upscale2x
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Wan2.1-VAE-upscale2x This page | 15,963 | 242 | — | apache-2.0 | |
| stable-diffusion-xl-base-1.0Shares diffusers · safetensors | 4,688,522 | 8,466 | 2.6B | openrail++ | |
| Animagine XL 4.0Shares diffusers · safetensors | 1,026,807 | 582 | 2.6B | openrail++ | |
| Stable Diffusion v1-5Shares diffusers · safetensors | 1,012,982 | 1,364 | 860M | creativeml-openrail-m | |
| Z-Image-TurboShares diffusers · safetensors | 765,804 | 5,594 | 6.2B | apache-2.0 | |
| FLUX.2 [klein] 4B BaseShares diffusers · safetensors | 743,055 | 195 | 3.9B | apache-2.0 |
lmstudio-community · Kit
A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…
LibertAIDAI · Kit
Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…
facebook · Kit
Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…
alpindale · Kit
Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…
prithivMLmods · Kit
Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…