Qwen Image, ComfyUI and Python Script

I am wondering what ComfyUI are doing with the models (e.g. Qwen Image). They can run on consumer hardware where the official seems to use at lot more resources.

I have tried to use the script from Qwen/Qwen-Image · Hugging Face and changed the model to Comfy-Org/Qwen-Image_ComfyUI · Hugging Face

It seems they are two different formats/packages. Can anyone suggest a refactored script that works with the ComfyUI model?

Thanks

1 Like

ComfyUI and Diffusers are entirely different software, so conversion isn’t really something you should consider. It’s not impossible, but most models have weights for both software available on Hugging Face, so use the weights provided there…

There are ways to use ComfyUI via its API. Also, when using Diffusers, while the sample scripts prioritize accuracy and code simplicity, there are methods for memory optimization and speeding up the process in actual use.

most models have weights for both software available on Hugging Face

Can you provide a link for the weights to a model where I can see the differences for both software?

Thank you :folded_hands:

1 Like

the weights to a model where I can see the differences for both software

Qwen/Qwen-Image vs Comfy-Org/Qwen-Image_ComfyUI is also an example…

stabilityai/stable-diffusion-xl-base-1.0


Each safetensors files are not simply split and merged; the keys have changed. While conversion is possible (The actual conversion method varies depending on the model architecture.), it’s best to avoid it if you’re unsure. It’s best to use files intended for ComfyUI with ComfyUI, and files intended for Diffusers with Diffusers.