QWEN IMAGE EDIT ULTIMATE INPAINTING WORKFLOW!
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😉!
Comments (64)
TextEncodeQwenImageEditPlus gather(): Expected dtype int64 for index
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
I keep getting TextEncodeQwenImageEditPlus error when trying to run qwen edit. How do I fix?
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?
v3
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 💙
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.
Ok, I think I found the problem and it has to do with the opacity settings in the mask editor.
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
Super Inpainting Qwen Image Edit takes a long time to process. Is anyone else experiencing the same issue? RTX5080 VRAM 16GB
downgrade the base model. maybe you dont have enough vram
only generates black output :/
I just fixed via removing the --use-sage-attention flag from my portable.bat file.
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!
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.
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??
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
It can only generates black image. 4090 - 60gb ram - using Q8 setup.. any solutions?
I just fixed via removing the --use-sage-attention flag from my portable.bat file.
Error: TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)
i have the same problem
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
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(
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.
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
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'.
Alguém conseguiu resolver o erro: TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5400x1280 and 3840x1280)
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).
Can you send me another invite to discord server, i can;t use invite under a video.
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.
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?
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.....
please make workflow with image reference to use for text to image.
CLIPLoaderGGUF Unexpected text model architecture type in GGUF file: 'qwen2vl' HELP PLS
use qwen_2.5_vl_7b_fp8_scaled.safetensors in standard loadclip node instead
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!
The king of ComfyUI workflows has blessed us with his wisdom once more.
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)
Make sure the mmproj text encoder has exactly the same name as the main clip text encoder, fixed it for me
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)
TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280) plz help me .
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?
im getting this error with the workflow :( "TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)"
Same error here
Can you make a outpainting workflow? or the lastest Video FS on comfy?
What’s your take on models/gemini-2.5-flash-image-preview? (Nano Banana) Have you tried?
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.
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.
I mean...this is the special inpainting workflow, if you want the regular editing, just use the regular editing workflow from the previous post: https://www.patreon.com/posts/qwen-image-edit-137036479
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
Update comfyui by using the update comfyui bat file inside the update folder no need for nightly build anymore, stable build is good now
What NSFW loras would you recommend to work with this ?
any nsfw qwen lora you find on civitai
The one click installer says "expired URL" when I click it.
Are you sure you are clicking on the correct link? Every file is hosted on patreon so it can't just "expire".
It was the text encoder for me, after downloading it and restarting comfy it worked fine
working great! thank you :)
Obrigado!
TextEncodeQwenImageEdit mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)
Same here
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?
+1
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.
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
