Instructions to use black-forest-labs/FLUX.2-small-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.2-small-decoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-small-decoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Diffusion Single File
How to use black-forest-labs/FLUX.2-small-decoder with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
What file do I need to download for Flux 2 Klein 9B π€
Non-specified file to download π€
It's the same decoder for all open variants of our models. So you can download the Small decoder for FLUX.2 [klein] 9B, 4B, KV and FLUX.2 [dev]
The problem is, there is 3 files to download π€π
Folder path:
black-forest-labs/FLUX.2-small-decoder
Files in the folder:
diffusion_pytorch_model.safetensors
full_encoder_small_decoder.safetensors
small_decoder.safetensors
By the way, thank you Stephen π
I downloaded full_encoder_small_decoder.safetensors and it works fine in ComfyUI.
Maybe small_decoder.safetensors would work too, not sure, but giving them a try probably won't hurt.
None of them work for me
I didnβt understand where exactly they should be put in Comfy!?
update comfy ui, put the full_encoder_small_decoder.safetensors in the vae folder
small_decoder.safetensors is just the small decoder
diffusion_pytorch_model.safetensors is for diffusers
update comfy ui, put the full_encoder_small_decoder.safetensors in the vae folder
small_decoder.safetensors is just the small encoder
diffusion_pytorch_model.safetensors is for diffusers
Thank you, it really worked!!!!
update comfy ui, put the full_encoder_small_decoder.safetensors in the vae folder
small_decoder.safetensors is just the small decoder
diffusion_pytorch_model.safetensors is for diffusers
Update ComfyUI == Break all my subgraphs :(
update comfy ui, put the full_encoder_small_decoder.safetensors in the vae folder
small_decoder.safetensors is just the small decoder
diffusion_pytorch_model.safetensors is for diffusers
Hi,
Thanks for the release!
Iβve updated ComfyUI, placed full_encoder_small_decoder.safetensors in the vae folder, and selected full_encoder_small_decoder.safetensors as the VAE in the Flux.2 VAELoader node.
However, Iβm getting this error:
RuntimeError: Error(s) in loading state_dict for AutoencoderKL:
size mismatch for decoder.conv_in.weight: copying a param with shape torch.Size([384, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 32, 3, 3]).
Any advice on what could be wrong?
--> EDIT : it works with comfy UI v19 (14/4/2026)
update comfy ui, put the full_encoder_small_decoder.safetensors in the vae folder
small_decoder.safetensors is just the small decoder
diffusion_pytorch_model.safetensors is for diffusersHi,
Thanks for the release!Iβve updated ComfyUI, placed full_encoder_small_decoder.safetensors in the vae folder, and selected full_encoder_small_decoder.safetensors as the VAE in the Flux.2 VAELoader node.
However, Iβm getting this error:
RuntimeError: Error(s) in loading state_dict for AutoencoderKL:
size mismatch for decoder.conv_in.weight: copying a param with shape torch.Size([384, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 32, 3, 3]).Any advice on what could be wrong?
hello, i have same mismatch error for comfyui v18.5.
edit: it is working with comfyui v19.
As a ComfyUI user, you should choose full_encoder_small_decoder.safetensors.
Thanks for this. Judging from the comments it would be helpful if you could provide more detailed and straightforward install instructions. Then you would receive less support questions :)
P.S. A ControlNet for Flux 2 Klein would be very much appreciated! :) Using a reference image is OK but not as good as a 'proper' ControlNet...
