Home Creators Posts Import Register Favorites Logout

Downloads

Content

Hey everyone! I've just released a quick new video update on the ULTIMATE QWEN IMAGE EDIT INPAINTING WORKFLOW!

You can now EDIT ANYTHING with precise manual masking giving you full control over exactly where your changes happen without changing anything else in the image.😎

You can check out the video right here: https://youtu.be/r0QRQJkLLvM

I also created a 1-click installer for the Webui for my Patreon supporters for Local AND Runpod, that you can find right here: https://www.patreon.com/posts/1-click-install-137036485

Here the link to the manual install guide: https://pastebin.com/aYMsWDmr

Down below you will also find the QWEN_IMAGE_EDIT_SUPER_INPAINTING.json for free for you to use!

As always, supporting me on Patreon allows me to keep creating helpful resources like this for the community. Thank you for your support - now go have some fun😉!

Files

Comments

Art4Ever

Thank you so much! But there is a problem with the Qwen Edit model , or it's the workflow. I very often get the error > "mat1 and mat2 shapes cannot be multiplied (5292x1280 and 3840x1280)" . Even if the image is lower resolution, or higher, I get this error very often.

Jimmy

Can QWEN Image character LoRAs be used in the QWEN Image Edit In-Painting? So for example I want to change the look of a character using a LoRA is that possible?

Aitrepreneur

Update comfyui by using the update comfyui bat file inside the update folder and update all the nodes by using the manager by clicking on update all, then you can restart and re drag and drop the workflow in again and make sure that you used the installer and that you have downloaded the mmproj file inside the text encoder

Todd Douglas

Yeah, I'm getting the same error. I thought updating everything in Comfy would fix it but not yet.

Anton Karpuzikov

TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)

Art4Ever

Everything is updated to the latest. Still that error comes up.

Art4Ever

There is a possibility of version incompatibility of transformers plus other pythons scripts which is really hard to find out, maybe different nodes will work better? Error comes up even If I don't use or use the resize option.

Aitrepreneur

Update comfyui by using the update comfyui bat file inside the update folder and update all the nodes by using the manager by clicking on update all, then you can restart and re drag and drop the workflow in again and make sure that you used the installer and that you have downloaded the mmproj file inside the text encoder

Aitrepreneur

You guys need to update comfyui + update the gguf nodes with the manager + you need the mmproj file inside the text encoder folder, use the installer

Jaina Shop

working great! thank you :)

udi klein

It was the text encoder for me, after downloading it and restarting comfy it worked fine

Lexi

Brian Monarch

The one click installer says "expired URL" when I click it.

Aitrepreneur

Are you sure you are clicking on the correct link? Every file is hosted on patreon so it can't just "expire".

Aitrepreneur

no you don't need to replace anything, just follow the intruction, it's usually because people forget to dl the mmproj file

Aitrepreneur

Yeah I guess for me it sounds obvious but maybe less obvious for other people, but if they used either the installer or followed the manual install guide they have all the files as well

Ashley Barrett

What NSFW loras would you recommend to work with this ?

Art4Ever

I was expecting to tell me thank you for finding the solution to that. :) Just joking, lol :) Anyway it worked for me, I hope that helped others as well :)

Parnation

Anyone know how to fix the lora key not loaded problem? I'm on nightly builds and it's up to date, but adding any second lora will do absolutely nothing and give me that error a billion times in the console

Aitrepreneur

Update comfyui by using the update comfyui bat file inside the update folder no need for nightly build anymore, stable build is good now

Aitrepreneur

Don't click on the link in the post itself, scroll down at the bottom, all the attached files will always be at the bottom

Aitrepreneur

Well because it's not a good solution, using that node uses more vram than if you use the gguf node

Art4Ever

Yes, I noticed that. But It worked for me in a 16 GB Vram GPU.

RavenLand

Lame question, can I disable the in-painting? I'd like to use this new workflow for both regular editing and in-painting, but it seems that if you don't select an area in the photo, no prompt changes are applied on the photo.

Brian Monarch

Sorry man... I got the file and ran it. Chose 24gb and up. It ran and downloaded things. Now ComfyUI won't load. I have a blackwell. Not sure if that makes a diff. I'm getting this... D:\AI\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build [START] Security scan [DONE] Security scan ## ComfyUI-Manager: installing dependencies done. ** ComfyUI startup time: 2025-08-27 17:08:19.693 ** Platform: Windows ** Python version: 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] ** Python executable: D:\AI\ComfyUI_windows_portable\python_embeded\python.exe ** ComfyUI Path: D:\AI\ComfyUI_windows_portable\ComfyUI ** ComfyUI Base Folder Path: D:\AI\ComfyUI_windows_portable\ComfyUI ** User directory: D:\AI\ComfyUI_windows_portable\ComfyUI\user ** ComfyUI-Manager config path: D:\AI\ComfyUI_windows_portable\ComfyUI\user\default\ComfyUI-Manager\config.ini ** Log path: D:\AI\ComfyUI_windows_portable\ComfyUI\user\comfyui.log Prestartup times for custom nodes: 0.0 seconds: D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use 0.0 seconds: D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 2.6 seconds: D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-manager Checkpoint files will always be loaded safely. Traceback (most recent call last): File "D:\AI\ComfyUI_windows_portable\ComfyUI\main.py", line 147, in import execution File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 15, in import comfy.model_management File "D:\AI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 236, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ~~~~~~~~~~~~~~~~^^ File "D:\AI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 186, in get_torch_device return torch.device(torch.cuda.current_device()) ~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "D:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 1071, in current_device _lazy_init() ~~~~~~~~~~^^ File "D:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 403, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled D:\AI\ComfyUI_windows_portable>pause Press any key to continue . . .

RavenLand

That's what I've been doing, very happy with both your workflows, but it would have been a nice little addition to be able to enable/disable the in-painting to avoid switching workflows :D

LL

Don't mean to butt in, but can't you just merge or drag'n'drop either workflow into the other? That's partly my question to Aitrepeneur too . . .

sai ram

What’s your take on models/gemini-2.5-flash-image-preview? (Nano Banana) Have you tried?

Aitrepreneur

It's absolutely amazing, but the censor filter is absolutely nuts, sometimes even asking for a "white t-shirt" is enough for the model to refuse to generate the image. There is no flexibility for these censored closed third party models. If you don't have the weights, if you can't train it, if you can customize it and mix it will other ai models and tools then it's useless for a lot of people and I'm not even talking about nsfw stuff, if you can't customize these models to precisely what you need, then they are too limited in my opinion.

Aitrepreneur

Yeah I can this time I just wanted to separate the two of them but yeah you can just select the workflow and then copy and paste it into the other one

Aitrepreneur

Yeah that's ok, I have the solution for that error in every 1 click install post

EvilShadows

Can you make a outpainting workflow? or the lastest Video FS on comfy?

bugbudder

im getting this error with the workflow :( "TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)"

Silent Monk

It's GGUF node issue. Replace "ClipLoaderGGUF" with "Load Clip" and download qwen_2.5_vl_7b_fp8_scaled.safetensors

Silent Monk

It's GGUF node issue. Replace "ClipLoaderGGUF" with "Load Clip" and download qwen_2.5_vl_7b_fp8_scaled.safetensors

cool1

I'm also getting "TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5400x1280 and 3840x1280)". I've downloaded qwen_2.5_vl_7b_fp8_scaled.safetensors into diffusion_models (that wasn't mentioned in the original post). I don't see how to change the clip loader ggguf to load clip (I don't see a "Load Clip" - when right clicking to add a node, then going to "loaders". I see a "Load Clip Vision" but I think that's something else.). I don't see why we were given a workflow that needs different loaders changing for it to work. Can't a working workflow be posted in the main section please?

chemsou Alger

TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280) plz help me .

MS hadmayot

I updated ComfyUI to the latest version and I have all the models I'm running on a 3090 24 GB and this message keeps popping up mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)

Goldo 27

you`re the greatest. But I keep getting this error when I try to edit a picture : TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5304x1280 and 3840x1280)

Paro Gide

Thank you!!! This solved it for me!!!

Daan Tilburg

Make sure the mmproj text encoder has exactly the same name as the main clip text encoder, fixed it for me

Goldo 27

I ended up going in the manager and updated the nodes and it works

Nemo Nomen

The king of ComfyUI workflows has blessed us with his wisdom once more.

Tomas Rampas

Hello, pls is it normal that a single 1024x1024 picture takes up to 10 minutes? I am using your workflow as is. The only difference is I use Q5 models. I have 16GB ram RTX4060 Ti. The enable image resize is set to yes. Thx!

Nemo Nomen

Yeah, same issue. ChatGPT says this is because the Unet Loader and CLIPLoader nned to be from the same Qwen version (which I guess implies that the one's he provided are not). I'm using the Q5 12-24GB vram version for reference. Hope he can get back to us on this.

Nemo Nomen

Ah it makes sense now. I saw that and I wasn't sure whether or not to install it because just below there were 3 other text encoders to install depending on available vram. They were listed as pick this OR this OR this but the first one was just placed there somewhat ambiguously. I bet if you put an "AND" in there, no one would miss it.

Nemo Nomen

Looks like there was already an explanation and solution posted by "k" further down. You just need to make sure everything's updated and also make sure you installed "Qwen2.5-VL-7B-Instruct-mmproj-BF16.gguf" in your text encoders folder.

Star Hawk

Same here. TY also.

Maverick Ong

CLIPLoaderGGUF Unexpected text model architecture type in GGUF file: 'qwen2vl' HELP PLS

Marek Marek

use qwen_2.5_vl_7b_fp8_scaled.safetensors in standard loadclip node instead

Bob

please make workflow with image reference to use for text to image.

LW

I'm installing using:- QWEN-IMAGE-EDIT-MODELS-NODES_INSTALL.bat I have the following red error message:- ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. mediapipe 0.10.21 requires numpy<2, but you have numpy 2.3.2 which is incompatible. mediapipe 0.10.21 requires protobuf<5,>=4.25.3, but you have protobuf 6.32.0 which is incompatible. numba 0.61.2 requires numpy<2.3,>=1.24, but you have numpy 2.3.2 which is incompatible. opencv-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 2.3.2 which is incompatible. opencv-python-headless 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 2.3.2 which is incompatible. torchaudio 2.7.1+cu128 requires torch==2.7.1+cu128, but you have torch 2.8.0 which is incompatible. torchvision 0.22.1+cu128 requires torch==2.7.1+cu128, but you have torch 2.8.0 which is incompatible. Is this going to cause problems? Should I simply do a full install in another folder?

LW

Indeed it causes problems....... File "X:\_K QwenWAN_Illustrator\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\__init__.py", line 403, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled X:\_K QwenWAN_Illustrator\ComfyUI_windows_portable>pause Press any key to continue . . . So I can't access ComfyUI at all now. Is there any way of removing the QWEN-IMAGE-EDIT-MODELS-NODES_INSTALL.bat installation? Please don't tell me I have to completely reinstall everything again from scratch.....

Sean Rowe

This is awesome, the only problem I run into is when attempting to change the background of an image it often requires that the lighting on the subject be changed to match the new environment. Since nothing is being done to the inpainted area it can sometimes look like a terrible photoshop job. Not sure there is a solution to that though since you either change the entire image or you don't.

Karl Smink

I keep seeing people saying this and I don't know where it is. The only loadclip node I see under the menu is loadclip vision and that won't accept the existing file.

Matheus Rocher

Alguém conseguiu resolver o erro: TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5400x1280 and 3840x1280)

Olivier Lefebvre

Replace both GGUF loaders by the standard Load Diffusion Model (using qwen_image_edit_fp8_e4m3fn.scalestensors) and Load CLIP (qwen_2.5_vl_7b_fp8_scaled.safetensors).

Norbert Lienig

thank you @ poster "K" who (way further down) wrote this: that solved the mat1 and mat2 shapes problem for me. great work @ aitrepreneur, too, of course, thanks a lot for all of your work, it's highly appreciated. To FIX the error > "mat1 and mat2 shapes cannot be multiplied (5292x1280 and 3840x1280)": Update comfyui by using the update comfyui bat file inside the update folder and update all the nodes by using the manager by clicking on update all, then you can restart and re drag and drop the workflow in again and make sure that you used the installer and that you have downloaded the mmproj file inside the text encoder. Noone Understands (at least rtards like me :D ) what is this part means: ..."make sure that you used the installer and that you have downloaded the mmproj file inside the text encoder" SO I did a little investigation (Sorry A10R your stuff is great but sometimes you are too technical. I get it... for you it sounds obvious but for us it doesn't always. We are trying I promiss ) Go to hugging face. To A10R page comits: https://huggingface.co/Aitrepreneur/FLX/tree/64c0ed48845cdacba051b0a4662a49b732644b4d CTR+F for the following text "mmproj" and in the middleish of the page there will be the file we want. Then there is the 1.35GB test the xet then a down pointing arrow. Press that to download the file. THen when you have it paste it into ComfyUI_windows_portable\ComfyUI\models\clip Then ensure everythign is up date and restarted, and redrop workflow. Then the error will go away. Hope this helps

Olivier Lefebvre

If correctly working you should see the following in the console: got prompt gguf qtypes: BF16 (55), F32 (141), Q8_0 (143) Dequantizing token_embd.weight to prevent runtime OOM. Attenpting to find mmproj file for text encoder... Using mmproj 'Qwen2.5-VL-7B-Instruct-mmproj-BF16.gguf' for text encoder 'Qwen2.5-VL-7B-Instruct-UD-Q8_0.gguf'.

jhonathan Paula

Hi, could you create a setup to apply one image onto another using a mask? For example, I choose an image of a miniature airplane and place it on top of a table in another photo, so the AI preserves the background and only inserts the airplane in the chosen position.

Omer Nachshon

couldn't even get one image to work. first it was the error that everyone here has (mat 1 mat 2) so I digged in the comments and now it just crashes after "Requested to load WanVAE". Kinda feels like latest releases from you are not fully baked... :/ or at least not for me and my 4070 TI. I'm cancelling my subscription. thanks for the early stuff you posted but the latest workflows kinda suck, filled with problems and generally not for 16gb I suppose... good luck :) <3

LW

solved this by replacing the python-embedded folder with an earlier version and then updating comfyui and dependencies It seems that QWEN-IMAGE-EDIT-MODELS-NODES_INSTALL.bat is not compatible with the comfyui installation I had, which was the one created by QWEN-ULTRA-COMFYUI-MANAGER_AUTO_INSTALL.bat

Louis Sparks

Tried this but didn't fix my issue: CTR+F for the following text "mmproj" and in the middleish of the page there will be the file we want. Then there is the 1.35GB test the xet then a down pointing arrow. Press that to download the file. THen when you have it paste it into ComfyUI_windows_portable\ComfyUI\models\clip Then ensure everythign is up date and restarted, and redrop workflow. Error mismatch still. :0(

Steve

Worked fine on my 4070... But I will say that 95% of the videos seem like hype. THE NEW KING VIDEO MAKER BANANA 4.2 JUST DROPPED!!! one weeklater new video hyping something else that was barely tested: RIP BANANA!

dalbir twitter

Error: TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)

uniqornate

It can only generates black image. 4090 - 60gb ram - using Q8 setup.. any solutions?

Rey

i have the same problem

Anthony Sparks

so mine is actually just not changing anything i in paint put in a prompt with what i want the change to be and the before and after are the same... is there something im not understanding??

Jumbo

Sheesh these instructions are terrible. For the Mat1 and Mat2 error you need to add BOTH text encoders to file path -> models\text_encoders NOT whatever file path is below in the comments. This will fix your issue I guarantee it. Example, add Qwen2.5-VL-7B-Instruct-mmproj-BF16.gguf AND Qwen2.5-VL-7B-Instruct-UD-Q5_K_S.gguf to models\text_encoders.

Lukas

So I tried to find the INPAINT workflow .json. But this is no where to be found. Only the old workflow is here? Please fix this so we can use it!

Timmy

I also keep getting this error. I have tried: - Re-Downloading all files - Moving the text-encoder files (2 of them) into the root text_encoders folder - Trying the different quantizations of the text encoders/ unet gguf models - Updating ComfyUI (Not the dependencies though)

Dragonbait

its odd, I have a head, I can paint the hair and ask it to change the colour and it works great, I paint the closed eyes and ask it for them to be open, nothing changes

Pumpalooza (edited)

Comment edits

2026-09-08 20:00 I've been meaning to ask! I already have ComfyUI installed via your WAN 2.2 installer, and I tried dragging and dropping this workflow. Every node works except one: TextEncodeQwenImageEdit. It requires ComfyUI version 0.3.50, but mine is stuck at 0.3.48—even after trying to update through the manager. Is there an easy fix?
2025-09-03 10:12

Craig Dawson

Same issue here, won't let me update comfyUI with the WAN2.2 version, gets this in the console when I try [ComfyUI-Manager] Failed to checkout 'master' branch. repo_path=D:\AI\ComfyUI_windows_portable\ComfyUI Available branches: ComfyUI update failed

jonescrusher1

I've installed via the runpod installer, all files are where they should be and still cant get past this mat1 error, any ideas?

uniqornate

only generates black output :/

uniqornate

I just fixed via removing the --use-sage-attention flag from my portable.bat file.

uniqornate

I just fixed via removing the --use-sage-attention flag from my portable.bat file.

kanojo3 ai

Super Inpainting Qwen Image Edit takes a long time to process. Is anyone else experiencing the same issue? RTX5080 VRAM 16GB

Bob

can you please check this app "selfyzai' there you can do reference images to video. you can upload up to 3 images for example: car photo, city photo, human photo. and write a man driving car in the city. And it will generate exactly with same same similar city, same person into video! can you make workflow for comfyui similar work flow with at least 3 images for reference. please

Koudkunstje

Is this the updated one? Where the unmask parts shouldn't change. Because after multiple edits (after a successful edit, i used that image for the next edit.), i noticed the "unchanged parts" become some what over exposed. You might not notice it from edit to edit, but it's noticeable from original (start) to after a couple edits (final result). So, it changed parts that shouldn't have changed. Well, that's with the resize on. I'm now gonna test it without resize.

Koudkunstje

Ok, I think I found the problem and it has to do with the opacity settings in the mask editor.

MM Gè

It’s probably because the area you want the model to inpaint to is a too small percentage of the whole image. Use a node like stitch to fix it

MM Gè

Could you explain why the VAE input isn’t connected on the TextEncodeQwenImageEdit node? In the ModelSamplingAuraFlow node, I noticed the shift value is set to 1.36, but in the official workflow it’s listed as 3.0. Is there a reason for using 1.36 here instead? Thanks a lot for sharing this workflow 💙

darcy

This works amazing thankyou for sharing, do you know if this is possible for 2 or 3 image workflows for example i have an image 1st image is a person and 2nd image is 3 people can i mask a person from the 2nd image and prompt "add man/lady to 2nd image and it will place the man/lady in the masked area" ?

Sutherland

Hey! Can i use this but instead of text can i inpaint an image. Lets say i want an adidas logo on a t-shirt, what do i need to tweak to load the logo.png and mask the area where i want it to be put?

Hang Su

downgrade the base model. maybe you dont have enough vram

Hang Su

bro, I have the same problem, what is the best setting for opacity?

Koudkunstje

The problem is not comfyui related. It's a browser problem. In my case firefox. Don't copy and paste from browser. Either save the file to disk and load the file from disk or find a browser that handles copying images better then firefox. Copying from within the standalone app also seems to work for me. It seems copying from firefox ditches color profiles and meta data which slters the image. So, avoid copying from firefox.

TrapHouseMag

I keep getting TextEncodeQwenImageEditPlus error when trying to run qwen edit. How do I fix?

TrapHouseMag

TextEncodeQwenImageEditPlus gather(): Expected dtype int64 for index

Aitrepreneur

have you updated comfyui with the update comfyui bat file and all the nodes via the manager? IF yes you can dm me screenshots of the parameters you are using

TrapHouseMag

This is the error that ChatGPT gave me when I feed it the error log. "The Qwen node is blowing up because the IQ4_XS dequant code is still using int32."

Ken Kawashima

I am having the exact same issue after allowing ComfyUI update. After that I deleted the entire folder and reinstalled from scratch, but your workflow won't work anymore. I tried with and without updating ComfyUI. Without, it forces to update. After updating, I start getting the exact same "gather(): Expected dtype int64 for index" reported here. Looks like ComfyUI will no longer work with this workflow due to incompatibility and new security requirements.