COMFUI TXT2IMG TUTORIAL! (any luck on a working image editing workflow?)

#1
by coughdrop - opened

for basic image generation:
https://huggingface.co/unsloth/FLUX.2-klein-4B-GGUF/tree/main/assets (download the .png* file, the metadata includes your workflow for comfyui)
download: https://huggingface.co/unsloth/FLUX.2-klein-base-9B-GGUF (download any GGUF, highest quant is fine | this goes in comfyui/models/unet)
download: https://huggingface.co/Comfy-Org/flux2-dev/blob/main/split_files/vae/flux2-vae.safetensors (this goes in comfyui/models/vae)
download: https://huggingface.co/Qwen/Qwen3-4B-GGUF/tree/main (download any GGUF, highest quant is fine 4_K_M | this goes in comfyui/models/text_encoders)

After starting COMFYUI, Open the PNG you downloaded from within COMFUI > FILE > OPEN > (PNG file)
Press R to refresh, install any missing nodes if necessary from the ComfyUI manager window.
If everything went successfully, you should have FLUX2 Klein running locally in GGUF format, keep in mind when downloading your GGUF's the size of your quant should be under the amount of VRAM + RAM you have in total. So if you have 8GB VRAM and 16GB RAM, then your GGUF should be under ~24GB max. With all of this said, has anyone figured out how to edit images using GGUF's?

i haven't tried it yet but can you hust slot it into the normal comfy flux2 example workflow, connect the gguf model loader instead of the diffsuion model loader? It works with (full) flux2.dev models (connect flux2.de gguf instead of flux2.dev fp8 safetensors) as model. .

Not sure if this one can just be slottet in. gonna test later. but in general ggufs are working as 1:1 replacements.

In general if you take the flux2 klein workflows and swap out the diffusion model with the unet gguf loader it should work. The quirk with flux2 klein is that they use different text encoders. Qwen3 4b and and qwen3 8b for the 4b and 9b flux2 variants.

thanks for the replies, concerning the workflow if you have a working workflow available please feel free to share that with me. regarding the other information, while insightful, was also my initial thought process too. unless I and others have been making mistakes, but it isn't working natively as you've suggested. I've been corresponding with others from the comfyui / unsloth discords and we all typically seem to be getting the same errors.

[mat1 and mat2 shapes cannot be multiplied (512x7680 and 12288x4096)] <- seems to be the most consistent.

How did you install comfyui? It needs to be the latest from the repo so you may need to upgrade it.

downloading currently. the error sounds like clip or something is different or a node that's loading it doesn't work. However if it uses qwen instead of mistral (like big flux2.dev) it's probably nor just a slot-in for those workflows. These mat errors are usually clip compatibility issues.
however i've not seen a version from/for comfy.org. Not sure if this all works already in comfy. It may just be the gguf version of the wrong version. But also weird if they make it completely different /incompatible with the big flux2 model. Back in ye olde days Flux1.dev and Flux schnell were completely interchangeable. Flux2.dev, Klein-9b distilled and base and klein 4b may not be.
It's a bit of a model mess, isn't it?

Flux2-Klein_00007_
I took the published workflow from comfy for flux2 klein base 9b, replaced the clip and diffusion loaders with the gguf loaders. Set my vae (which is the same vae as the flux2 dev) and hit run. And also unpacked the subgraph. If you load this image into comfy it shows you the workflow.

bro this workflow does not allow me to upload any images, I already have the TXT2IMG workflow?

The above workflow (in the image) did eventually work for me finally.

I continued to get a message like "mat1 and mat2 shapes cannot be multiplied (512x4096 and 2048*1024)" with this workflow and the qwen 8b and Flux 2 klein 9b models until I looked at a lot of details very carefully.

  • If you're using the GGUF model for Flux 2 Klein then also use the gguf version of the appropriate Qwen 3 model. Mixing safetensors for one and gguf for the other seems to be asking for trouble.
  • For the Flux 2 Klein 9B, use the Qwen 3 8b; For the Flux 2 Klein 4B, use the Qwen 3 4B.
  • For the VAE, use flux2-vae.safetensors

You also have to update your ComfyUI with the most recent updates since I guess earlier versions don't have all it needs. (Though this wasn't an issue for me.)

bro this workflow does not allow me to upload any images, I already have the TXT2IMG workflow?

Flux2kleinbase_sample

Does that work for you?

You need a new CLIP - I have had to use :Qwen_3_8B_fp8mixed.safetensors.

You need a new CLIP - I have had to use :Qwen_3_8B_fp8mixed.safetensors.

No this is not accurate. You can use the qwen gguf as well

Sign up or log in to comment