快说!你们把工作流藏哪里啦?

#1
by chenpingan - opened

这看着就不对劲
image.png

你试一试用https://chat.qwen.ai/ 这个网站来编辑图像,看看效果

ComfyUI_00069_.png
Drag and drop this in comfyui, make sure you update the comfyui as well

I get this error with the above workflow:
TextEncodeQwenImageEdit
shape '[84, -1, 128]' is invalid for input of size 5114368

Using the same image for input gives me this:
TextEncodeQwenImageEdit
einsum(): subscript j has size 481 for operand 1 which does not broadcast with previously seen size 1443

image.png
所以问题出在哪里呢@Dodome

虽然...但是...我觉得我写的好像有点问题,希望明天可以看到官方出手

image.png

Sorry if I'm being slow here but, where are you all getting that node? TextEncodeQwenImageEdit ? I have latest 0.3.50 and that doesn't have it, no luck with custom nodes search either. What am I missing ?

Sorry if I'm being slow here but, where are you all getting that node? TextEncodeQwenImageEdit ? I have latest 0.3.50 and that doesn't have it, no luck with custom nodes search either. What am I missing ?

I had the same issue, but it was fixed after pulling the latest code.
I’m on the ComfyUI portable version and updated it using update_comfyui.bat.

Here are the before/after screenshots:

Screenshot 2025-08-20 020010.png

image.png

And here’s the generated result on an 8GB GPU:

Screenshot 2025-08-20 090052.png

Sorry if I'm being slow here but, where are you all getting that node? TextEncodeQwenImageEdit ? I have latest 0.3.50 and that doesn't have it, no luck with custom nodes search either. What am I missing ?

same question, how to install it ......

Sorry if I'm being slow here but, where are you all getting that node? TextEncodeQwenImageEdit ? I have latest 0.3.50 and that doesn't have it, no luck with custom nodes search either. What am I missing ?

same question, how to install it ......

Turns out people who keep posting are the ones with repo installs, because the commit exists, but desktop installer didn't get the update yet. so if you must have it "nooow" you will have to install from the repo

I am using the original workflow and i have downloaded the Model, Clip, VAE and Lora twice to avoid corrupt files, but i only got this type of picture.
I am using a RTX 5090, do someone know, what conditions musst be fullfilled for this type of card to function with Qwen-Image-Edit?

Error.jpg

I am using the original workflow and i have downloaded the Model, Clip, VAE and Lora twice to avoid corrupt files, but i only got this type of picture.
I am using a RTX 5090, do someone know, what conditions musst be fullfilled for this type of card to function with Qwen-Image-Edit?

from the image you shared I can spot that you have disabled Lighx2v lora, in which case qwen image will need at least 40 steps for a reasonable image, try either increasing steps or enabling lighx2v lora and lowering steps to 4 or 8 (depending on lora)

How can I implement inpainting using masking in ComfyUI? Could someone share a correct workflow setup that uses a base image and a mask (white = editable area, black = preserved area) to achieve proper inpainting results?

为什么还要用mask,我觉得2.5vl已经很聪明了呀

I completely agree. I have a dataset of night vision IR (black-and-white) images, and my goal is to perform face swapping or enhance facial features specifically within the face region. It’s important that the pixels outside the face remain unaltered. However, when I use the 2.5V model to improve the images, it tends to remove or distort the IR-specific characteristics. What I would like is to process a batch of these images and generate multiple variants while preserving the unique IR properties.

Sorry if I'm being slow here but, where are you all getting that node? TextEncodeQwenImageEdit ? I have latest 0.3.50 and that doesn't have it, no luck with custom nodes search either. What am I missing ?

same question, how to install it ......

Turns out people who keep posting are the ones with repo installs, because the commit exists, but desktop installer didn't get the update yet. so if you must have it "nooow" you will have to install from the repo

You need to update your ComfyUI, use "git pull", and then "pip install -r requirements.txt", to get the new version of comfyui, in this 0.3.51 version, they add TextEncodeQwenImageEdit.

I am using the original workflow and i have downloaded the Model, Clip, VAE and Lora twice to avoid corrupt files, but i only got this type of picture.
I am using a RTX 5090, do someone know, what conditions musst be fullfilled for this type of card to function with Qwen-Image-Edit?

Did you fixed this? I have the same artifacts and same GPU (RTX 5090)
Here is result with 50 steps and 4 CFG as recomended by the note

image.png

I've tried all that I can find online, but can't fix this.

I've tried all that I can find online, but can't fix this.

I've got two questions, 1) did you try disabling the lightx2v lora and increasing the steps to 30 - 5* ? if so what's the outcome ? also, by any chance are you forcing any attention ( sage attention flash attention etc.) through launch args ?

I've tried all that I can find online, but can't fix this.

I've got two questions, 1) did you try disabling the lightx2v lora and increasing the steps to 30 - 5* ? if so what's the outcome ? also, by any chance are you forcing any attention ( sage attention flash attention etc.) through launch args ?

Hi!

  1. Yeah, on the screenshot it is 50 steps with CFG 4. Any combination of steps and CFG giving somewhat same results, and with lighning lora too.
  2. No, my .bat file looking like this
    ".\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast
    pause"
    So I have no idea what is causing this :)
    Thx for the fast reply.

I mean, commenting purely on the shared screen shot, I see wan 2.1 VAE ?? which has nothing to do with QWEN image edit ??? original VAE from https://huggingface.co/Qwen/Qwen-Image-Edit/tree/main/vae is diffusion_pytorch_model.safetensors you know that right ? I'm using https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main/split_files/vae qwen_image_vae.safetensors

So yeah, considering you actually do try to run it with WAN 2.1 vae (god know why) I'm not too surprised of the outcome. Try using the right VAE (again, I'm assuming the screenshot is correct)

So yeah, considering you actually do try to run it with WAN 2.1 vae (god know why) I'm not too surprised of the outcome. Try using the right VAE (again, I'm assuming the screenshot is correct)

Oh, well... As I said, I was trying everything that I found online, and this is one of that, someone suggested trying wan 2.1 vae. With qwen-image-vae outcome was the same, but need to test it with 50 steps I guess. Thx.

Oh, well... As I said, I was trying everything that I found online, and this is one of that, someone suggested trying wan 2.1 vae. With qwen-image-vae outcome was the same, but need to test it with 50 steps I guess. Thx.

here is the thing, maybe helps you diagnose, qwen edit doesn't have to "edit" anything, it's still an image generator after all, so even with no image and heck even with no prompt, it should generate something, so I recommend, strip the pipeline down to just the sampler, and try a few samples with high steps, this might help you pinpoint the problem if you can actually get a reasonable image out

Oh, well... As I said, I was trying everything that I found online, and this is one of that, someone suggested trying wan 2.1 vae. With qwen-image-vae outcome was the same, but need to test it with 50 steps I guess. Thx.

here is the thing, maybe helps you diagnose, qwen edit doesn't have to "edit" anything, it's still an image generator after all, so even with no image and heck even with no prompt, it should generate something, so I recommend, strip the pipeline down to just the sampler, and try a few samples with high steps, this might help you pinpoint the problem if you can actually get a reasonable image out

Thanks! Will try that later today.

here is the thing, maybe helps you diagnose, qwen edit doesn't have to "edit" anything, it's still an image generator after all, so even with no image and heck even with no prompt, it should generate something, so I recommend, strip the pipeline down to just the sampler, and try a few samples with high steps, this might help you pinpoint the problem if you can actually get a reasonable image out

Well, turned off all that it allowed me and still no luck.

image.png

image.png

here, I've created the absolute most minimal qwen image edit wf for you, replicate this exactly, what does that do ?

image.png

here is another one which does NOT use the "Text encode Qwen image edit" node , so you can also diagnose if that node is the problem or not

here is another one which does NOT use the "Text encode Qwen image edit" node , so you can also diagnose if that node is the problem or not

Unfortunately, same picture. (I saw wan 2.1 vae in your wf. I don't know is there a reason for that, but tried it too).

image.png

image.png

well yes I was testing out wan2.1 vae and turns out it works too. and back to you, even if with this simplest workflow, you get that horrid result. I would re-download model file, clip file and vae file, something somewhere is borked for sure.

well yes I was testing out wan2.1 vae and turns out it works too. and back to you, even if with this simplest workflow, you get that horrid result. I would re-download model file, clip file and vae file, something somewhere is borked for sure.

Yeah, started with downloading model already, will redownload all of them. Thanks for the help!
Gona test it again tomorrow.

well yes I was testing out wan2.1 vae and turns out it works too. and back to you, even if with this simplest workflow, you get that horrid result. I would re-download model file, clip file and vae file, something somewhere is borked for sure.

Yeah, started with downloading model already, will redownload all of them. Thanks for the help!
Gona test it again tomorrow.

and if you find out you had somehow a corrupted file somewhere along the line, check your hardware too, maybe ram oc ? cpu oc ?

well yes I was testing out wan2.1 vae and turns out it works too. and back to you, even if with this simplest workflow, you get that horrid result. I would re-download model file, clip file and vae file, something somewhere is borked for sure.

Yeah, started with downloading model already, will redownload all of them. Thanks for the help!
Gona test it again tomorrow.

and if you find out you had somehow a corrupted file somewhere along the line, check your hardware too, maybe ram oc ? cpu oc ?

image.png

Well, I've lied. Tested it now with completely new downloaded models (from civitai now) and result is bloody same. No OC on HW. I start to think it is something with dependencies like pytorch or maybe something similar as I had to update to pytorch 12.8 when I've got 5090 on hands. Will try to find what is causing this but losing hope)

well yes I was testing out wan2.1 vae and turns out it works too. and back to you, even if with this simplest workflow, you get that horrid result. I would re-download model file, clip file and vae file, something somewhere is borked for sure.

Yeah, started with downloading model already, will redownload all of them. Thanks for the help!
Gona test it again tomorrow.

and if you find out you had somehow a corrupted file somewhere along the line, check your hardware too, maybe ram oc ? cpu oc ?

image.png

Well, I've lied. Tested it now with completely new downloaded models (from civitai now) and result is bloody same. No OC on HW. I start to think it is something with dependencies like pytorch or maybe something similar as I had to update to pytorch 12.8 when I've got 5090 on hands. Will try to find what is causing this but losing hope)

Well I wanted to ask that but assumed otherwise, if it's your pytorch or any other dependancies, nothing else should work either. can you render anything else? say sdxl, or wan etc. ??

try my WF on civit (https://civitai.com/models/1824847/wan-22-wanvideo-aws-advanced-workflow-suite-v12a-qwen-morph-ai-music-native-lightx2v-interpolation-etc-etc) it has several different modules so you can test out everything, see if anything works at all

Well I wanted to ask that but assumed otherwise, if it's your pytorch or any other dependancies, nothing else should work either. can you render anything else? say sdxl, or wan etc. ??

Flux and flux kontext working as expected, so I don't know. ComfyUI logs at startup don't show any errors.
Gonna check your workflow tomorrow, thanks!

Hey,

followed a bit the discussion,

i have the same issues with the Qwen model.
No matter what settings i use (lighning lora, destilled model, FP8), everytime i get a pixelated image.

With the startup parameter " --use-sage-attention" i am getting black images how the most people with this model.
Without Sage ---> pixelated images

With and without the parameter: " --fast" i get the same results

Update:
After the upgrade from Sage 1.0.6 --> 2.2.0 i get at least the pixelated result

image.png

image.png

The ONLY thing what HELPED is: to the the weight dtype in the Diffusion Loader Node: from default to "fp8_e5m2"

image.png

image.png

I use Windows 11 with a RTX 4090,

Nvidia Driver: 581.08

ComfyUI:

Checkpoint files will always be loaded safely.
Total VRAM 24564 MB, total RAM 65253 MB
pytorch version: 2.7.1+cu128
xformers version: 0.0.31.post1
Enabled fp16 accumulation.
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
Using sage attention
Python version: 3.12.11 (main, Jul 11 2025, 22:40:18) [MSC v.1944 64 bit (AMD64)]
ComfyUI version: 0.3.52
ComfyUI frontend version: 1.25.10

Triton 3.4.0
Sage Attention 2.2.0

The question is now, why it works with the specific dtype value?!

Hope we can still find a solution with the default weight dtype !
Greetings!

The ONLY thing what HELPED is: to the the weight dtype in the Diffusion Loader Node: from default to "fp8_e5m2"

Can confirm, setting weight dtype to fp8_e5m2 worked like a charm! I don't know is there any drawbacks but wonder, why it behave like this.

image.png

Considering the model is fp8 e4m3fn . . . but hey, you guys found how to make it work for you, I guess that's what matters the most.

@PS0103

I found a solution for getting results without the pixel chaos! With the default weight_dtype "fp8_e4m3fn" of the Qwen FP8 model.
I was using the --fast option during ComfyUI launch. (also known as High Performance Mode for loading up 16 bit models faster)
You have to deactivate it. In my case a deactivated it in the launcher "launcher_config.json" -> "fast_mode": false,
i am using the ComfyUI Portable version from https://github.com/YanWenKun/ComfyUI-Windows-Portable?tab=readme-ov-file
There is an extra launcher comes with that.
But i think, the standard version have also an option to deactivate it somewhere in the batch file for startup or so.

Greetings!

@PS0103

I found a solution for getting results without the pixel chaos! With the default weight_dtype "fp8_e4m3fn" of the Qwen FP8 model.
I was using the --fast option during ComfyUI launch. (also known as High Performance Mode for loading up 16 bit models faster)
You have to deactivate it. In my case a deactivated it in the launcher "launcher_config.json" -> "fast_mode": false,
i am using the ComfyUI Portable version from https://github.com/YanWenKun/ComfyUI-Windows-Portable?tab=readme-ov-file
There is an extra launcher comes with that.
But i think, the standard version have also an option to deactivate it somewhere in the batch file for startup or so.

Greetings!

image.png

Legend! Yes, there is --fast option in the startup .bat file. It's been there when I downloaded so I didn't touch this. Now its working like expected, but is there any drawbacks without this option? Like with fp16 Flux Kontext or others?

Nice! Nothing bad side effect to fp16 model known to me. Maybe we habe to do 2 run with and without fast with a fp16 model and compare the result and speed.

Sign up or log in to comment