# Qwen Image, ComfyUI and Python Script

**URL:** <https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684>\
**Category:** Beginners\
**Created:** [September 25, 2025, 8:23pm UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684 "2025-09-25T20:23:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![boan-dk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/boan-dk/32/54270_2.png) [@boan-dk](https://discuss.huggingface.co/u/boan-dk)\
**Post date:** [September 25, 2025, 8:23pm UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684/1 "2025-09-25T20:23:15Z")

</div>

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](https://huggingface.co/Qwen/Qwen-Image) and changed the model to [Comfy-Org/Qwen-Image\_ComfyUI · Hugging Face](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI)

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

Thanks

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 25, 2025, 11:24pm UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684/2 "2025-09-25T23:24:29Z")

</div>

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](https://huggingface.co/datasets/John6666/forum1/blob/main/qwen_image_comfy_diffusers_python.md). 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.

---

<div class="post-metadata">

**Author:** ![boan-dk](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/boan-dk/32/54270_2.png) [@boan-dk](https://discuss.huggingface.co/u/boan-dk)\
**Post date:** [September 26, 2025, 5:01am UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684/3 "2025-09-26T05:01:12Z")

</div>

> 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 🙏

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 26, 2025, 6:10am UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684/4 "2025-09-26T06:10:24Z")

</div>

> 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](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)

 ![sdxla1111diffusers](https://us1.discourse-cdn.com/hellohellohello/original/3X/6/2/62e4aca270d99a962b93437522672f6b25b360b4.png)  
Each `safetensors` files are not simply split and merged; the keys have changed. [While conversion is possible](https://github.com/huggingface/diffusers/blob/main/scripts/convert_diffusers_to_original_sdxl.py) (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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [October 5, 2025, 3:33pm UTC](https://discuss.huggingface.co/t/qwen-image-comfyui-and-python-script/168684/5 "2025-10-05T15:33:40Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
