CivArchive
    ComfyUI — Inpainting XL/15/P/IL - v7
    NSFW
    Preview 52067151
    Preview 52067529
    Preview 52067889

    Hello there and thanks for checking out this workflow!

    What's new in v12? : Fixes and SubGraphs compatible with the latest ComfyUI Updates!

    Purpose

    This workflow provides a simple, solid and reliable way to efficiently inpaint images to perfection!

    I hope this proves to be a useful tool to you!

    Features

    • LoRA support

    • Batch Processing

    • Flexible Before/After Preview for any batch size and mask amount

    • Image Filter to cherry pick

    • Tutorial guide for nodes and settings in dedicated ►INFO boxes

    Common Issues

    • ValueError: Width and height must be >= 0
      → Make sure you masked an area on the node named "Mask"

    Custom Nodes

    All of which can be installed through the ComfyUI-Manager


    Troubleshooting

    1. If nodes show up red (failing to load), check the 'Install Missing Custom Nodes' tab of the ComfyUI Manager for the missing node packs and install them.

    2. Please check if all custom node packs load properly after installing, i.e. no (IMPORT FAILED) messages next to any of them in the console upon ComfyUI startup.

    3. Always reload/drag'n'drop the original, downloaded workflow file into ComfyUI to reload an intact version of the workflow.

      → The last opened workflow that appears on startup shows a cached version of the workflow, "remembering" group nodes that failed due to missing nodes as failed, keeping them broken even after having everything installed correctly.


    Thanks

    The workflow would not be possible as is without these custom node packs. If you want to support the custom node creators, give them a ⭐ on their github repos! Thank you!


    Feel free to ask any questions, share improvements or suggestions in the comment section!
    Also let me know if you encounter any confusing points I can elaborate on and focus on improving for the next update!

    Description

    v7
    — structural changes
    — updated mask editor tutorial

    v7.1
    — added safeguards for case: mask = empty and case: batch_size = 0

    v7.2

    — fixed detailer node after a breaking update

    FAQ

    Comments (30)

    dickhead__Jan 17, 2025
    CivitAI

    For some reason this thing doesn’t work, I updated all the nodes that were needed through the manager, and this is what it writes to me as a result

    Missing Node Types

    When loading the graph, the following node types were not found

    RedPinkRetro
    Author
    Jan 17, 2025

    @dickhead__ hey there,

    1.) Did you go through these instructiongs to install the execution-inversion pack?

    In case of "execution-inversion-demo-comfyui" you need to set the "Channel" setting to "Channel: dev". (Found in the top left of the ComfyUI Manager Menu)
    → Do not forget to turn the channel setting back to default again afterwards


    2.) Does the console log on startup of Comfy show any (IMPORT FAILED) messages next to any custom node packs?

    dickhead__Jan 17, 2025

    @redpinkretro 1- yes

    "execution-inversion-demo-comfyui" I see that it needs to be installed only after I change the “channel” on the developer, but as soon as I changed and saw that I can install “execution-inversion-demo-comfyui” I get the error “Installation error: Execution-inversion- demo-comfyui" installation failed: with the current security level configuration, only custom nodes from the "default channel" can be installed.

    2-no errors were noted in the console

    doesn't work for me InversionDemoLazySwitch(In group node 'workflow>Checkpoint Loader — AIO')

    workflow>Checkpoint Loader — AIORemove from workflow

    ForLoopOpen

    AccumulateNode

    AccumulationHeadNode

    AccumulationToListNode

    AccumulationGetItemNode

    ForLoopClose

    RedPinkRetro
    Author
    Jan 18, 2025

    @dickhead__ Ok, that error indicates that it really is just the execution-inversion pack that is failing to install for you. Did you try the suggested solution for that security config issue?

    This here:
    " If the "Channel: dev" nodes refuse to install due to some "security level" issue, you can modify the "config.ini" file located in ComfyUI/custom_nodes/ComfyUI-Manager and edit that with any text editor.
    The entry at the very bottom
    "security_level" is likely set to "= normal", which is the default and in some cases prevents installation of custom nodes, especially when using online services.
    When you change that setting to
    "= weak", save and restart Comfy, you should be able to install the nodes just fine."


    Also make sure that ComfyUI itself is updated, as the Comfy Manager had some issue last week as well that caused it to refuse installing packs from different channels, even with the solution above active. But that was fixed already afaik.

    armamdpfuentes520856Jan 25, 2025· 1 reaction

    @RedPinkRetro I decided to check on the path location that you mentioned, but unfortunately there wasnt a config.ini

    RedPinkRetro
    Author
    Jan 25, 2025

    @armamdpfuentes520856 You are right, it was moved in a recent update!
    The new location of the config.ini is at:
    ComfyUI\user\default\ComfyUI-Manager

    omgcheesedudeJan 19, 2025· 1 reaction
    CivitAI

    hello friend i dont know why i have this error

    MathExpression|pysssss

    invalid syntax (<unknown>, line 0)

    all the nodes are there and ok but it just keeps giving me that error i dont know what to connect or what to configure to make it work properly

    RedPinkRetro
    Author
    Jan 19, 2025· 1 reaction

    Hey there, I believe this could be caused by a custom node pack that is accidentally found when looking for missing nodes, probably due to having a common internal node name shared with the actual node pack I use.

    The culprit would be this pack "ComfyUI-LatentClamp" which is NOT RIGHT and not used

    Whereas this node pack "ComfyUI-Allor" is used and has a node called LatentClamp, which does not even make sense as it does not clamp anything and acts as a mere passthrough

    So if you have "ComfyUI-LatentClamp" installed, get rid of it and make sure you have the "ComfyUI-Allor" pack 👌

    Please report back if that resolves the issue

    omgcheesedudeJan 20, 2025· 1 reaction

    @redpinkretro hey sorry i dont have that installed to begin with if your referring to Sparknight's node sadge

    RedPinkRetro
    Author
    Jan 20, 2025· 1 reaction

    @omgcheesedude Yes, that was what I was referring to and I vaguely recall a MathExpression error like yours to be one of the things that can happen.

    You said all nodes are there, but do they all load properly as well, i.e. no (IMPORT FAILED) messages next to any of them?

    Can you send me the console log? https://wormhole.app/

    The only ways I managed to deliberately break the workflow is by leaving the mask empty, which results in a division by 0 error, and by setting the batch size to 0 which results in an infinite loop.
    I just guardrailed those cases as well, so it's impossible to make any of those mistakes, but aside from that I would need to see what goes wrong on your end to encounter the invalid syntax.

    omgcheesedudeJan 21, 2025· 1 reaction

    @redpinkretro https://wormhole.app/zEbko#PWsCJYeIsedg5UHgR58G_A so the preview for the mask does not appear but the image is masked and uploaded so i dont know thanks for the quick reply

    RedPinkRetro
    Author
    Jan 21, 2025· 1 reaction

    @omgcheesedude 

    When did you last update your nodes?

    And you missed answering this question:
    "You said all nodes are there, but do they all load properly as well, i.e. no (IMPORT FAILED) messages next to any of them?"

    Did you load the original downloaded workflow, after installing/updating all nodes?
    Otherwise Comfy might use a faulty cached version of the workflow that might look alright, but include errors internally because of initially missing/outdated nodes not being found and connections getting messed up as a result.

    If all is installed correctly, just download the v7.1 update and directly drag and drop the workflow file in there into your ComfyUI and it should be fine 👌

    omgcheesedudeJan 21, 2025

    @redpinkretro so I never mentioned import failed because I don't see it, I loaded the original workflow after installing all the appropriate nodes and reconnecting them. still having that issue

    RedPinkRetro
    Author
    Jan 21, 2025· 1 reaction

    @omgcheesedude I see, when you startup ComfyUI, the console contains a section near the end where all installed/enabled custom node packs are loaded in, displaying (IMPORT FAILED) next to them in case they have any issues.


    What do you mean with this part after installing all "appropriate nodes and reconnecting them"?
    There is nothing that needs to nor should be connected additionally...

    omgcheesedudeJan 22, 2025

    @redpinkretro so i had to reput some nodes back to make it work because it was just broken as in reload them back in by making new nodes of the same nodes got the workflow out of zip again used that all the nodes are working, when using it just gives that issue math expression.

    Failed to validate prompt for output 209:

    * ImpactSchedulerAdapter 573:18:

    - Value not in list: extra_scheduler: 'max(a,0)' not in ['None', 'AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]', 'LTXV[default]']

    Output will be ignored

    Failed to validate prompt for output 375:3:

    Output will be ignored

    Failed to validate prompt for output 208:

    Output will be ignored

    Failed to validate prompt for output 210:

    Output will be ignored

    !!! Exception during processing !!! invalid syntax (<unknown>, line 0)

    Traceback (most recent call last):

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 327, in execute

    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 202, in get_output_data

    return_values = mapnode_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 174, in mapnode_over_list

    process_inputs(input_dict, i)

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 163, in process_inputs

    results.append(getattr(obj, func)(**inputs))

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-custom-scripts\py\math_expression.py", line 156, in evaluate

    node = ast.parse(expression, mode='eval').body

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "ast.py", line 50, in parse

    File "<unknown>", line 0

    SyntaxError: invalid syntax

    Prompt executed in 0.29 seconds

    got prompt

    Failed to validate prompt for output 209:

    * ImpactSchedulerAdapter 573:18:

    - Value not in list: extra_scheduler: 'max(a,0)' not in ['None', 'AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]', 'LTXV[default]']

    Output will be ignored

    Failed to validate prompt for output 375:3:

    Output will be ignored

    Failed to validate prompt for output 208:

    Output will be ignored

    Failed to validate prompt for output 210:

    Output will be ignored

    !!! Exception during processing !!! invalid syntax (<unknown>, line 0)

    Traceback (most recent call last):

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 327, in execute

    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 202, in get_output_data

    return_values = mapnode_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 174, in mapnode_over_list

    process_inputs(input_dict, i)

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\execution.py", line 163, in process_inputs

    results.append(getattr(obj, func)(**inputs))

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "C:\Users\Computer\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-custom-scripts\py\math_expression.py", line 156, in evaluate

    node = ast.parse(expression, mode='eval').body

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "ast.py", line 50, in parse

    File "<unknown>", line 0

    SyntaxError: invalid syntax

    Prompt executed in 0.18 seconds

    RedPinkRetro
    Author
    Jan 22, 2025· 1 reaction

    @omgcheesedude When you re-place specifically group-nodes I built, they will look alright, but be broken internally, as Comfy doesn't save the values I entered upon creation within the template of it, so you might just get the error because of your tweaks.

    When you download the workflow, take that file, drag it into Comfy, not changing anything and follow these steps :

    1. select a checkpoint
    2. select a vae
    3. select an image to inpaint in both the "Input Image" and "Mask" node
    4. right-click on the "Mask" node and select the mask editor to paint a mask
    5. tweak generation parameters for: Steps, CFG, Sampler, Scheduler, Denoise
    6. enter prompt
    7. queue

    Nothing else than that.

    Does that lead to the error?

    omgcheesedudeJan 22, 2025· 1 reaction

    @redpinkretro yes did exactly what u said exactly like the workflow on the image u have uploaded i just realized that the concat label on has b on the text a and there is no b4 on the node when loaded the workflow

    RedPinkRetro
    Author
    Jan 22, 2025· 1 reaction

    @omgcheesedude I have just found the issue behind all this, an update fixing the issue will be up shortly! The impact pack added more values to the detailer node, which messed up all the internal connections and lead to this issue. 👌

    Edit: fixed in 7.2

    omgcheesedudeJan 22, 2025· 1 reaction

    @redpinkretro works good job hope everyone enjoys this workflow was gonna give up on it but the layout looked very nice to look at, so i wanted it to work

    RedPinkRetro
    Author
    Jan 22, 2025

    @omgcheesedude Thank you very much for pulling through! I'm glad it's working now. The SDXL advanced one is fixed as well. Few more workflows to go and they should all be fully operational again 🙏

    ApraCoreJan 24, 2025· 1 reaction
    CivitAI

    Keep getting

    UltralyticsDetectorProvider(In group node 'workflow>Impact::SIMPLE_DETAILER_PIPE')

    workflow>Impact::SIMPLE_DETAILER_PIPE

    even though this custom node is fully installed

    RedPinkRetro
    Author
    Jan 24, 2025· 1 reaction

    Thank you for reporting that. That was a remnant of a component test and is gone now. Just re-download the 7.2 version 👌

    apdj94Jan 26, 2025· 2 reactions
    CivitAI

    Hey there,
    I'm looking forward to using this workflow but I am still stuck with the Inpainting - AIO node missing. I have everything else and have run through the security level adjustments, etc. I can't find any nodes that even closely resemble this in the library like I did for the Checkpoint Loader - AIO node. Wondering what this is and how to get it up and running?

    RedPinkRetro
    Author
    Jan 26, 2025

    Hey there, sorry to hear that,

    do all node packs load properly, i.e. no (IMPORT FAILED) messages next to any of them in the console when starting ComfyUI up?

    I just checked the node for its parts and this is a screenshot of the deconstructed node with the specific packs it uses displayed :
    https://wormhole.app/pdBQ9#6eytTdqtmZOI6LyInxQnNw

    So if all those nodes are up to date and load correctly, you should be able to make it load by drag-and-dropping the original, downloaded workflow file into ComfyUI.


    The group nodes I build would be easiest found in the "category" tab of the node search, when typing in "group nodes".
    But those wouldn't be much use, as they would only create broken dummy-copies of the node, as Comfy unfortunately doesn't save the internal values I set within the templates.

    LokaboFeb 1, 2025· 3 reactions
    CivitAI

    I'm getting Import Failed on Allor Plugin, so I tried to install manually via GitBash and it still says import failed and I'm missing several AIO plugins to use this WF.

    RedPinkRetro
    Author
    Feb 1, 2025

    Hey there,

    so far the Allor Plugin was never mentioned as causing issues and pretty much all of my workflows use it for the passthrough nodes it contains.
    What was the error message about the part that failed? Did you check the ComfyUI-Allor github issues for it?

    LokaboFeb 1, 2025· 1 reaction

    @RedPinkRetro I solved some of the issues, in Allor Plugin requirements.txt it said onnx instead of onnxruntime. So I changed that and re-installed it. Now I "only" missing 4 nodes, but they cannot be found in manager. I am missing WorkflowCrop Labeling, WorkflowCrop Batch Grid, workflowCheckpoint Loader -- AIO and workflowInpainting -- AIO.

    RedPinkRetro
    Author
    Feb 2, 2025

    @Lokabo That's great to hear! And the other issue you're facing now is just Comfy showing you a cached version of the workflow with the group nodes being dysfunctional. When you drag the downloaded workflow file into Comfy, all should load perfectly fine 👌

    radio_hateFeb 18, 2025· 1 reaction
    CivitAI

    Nice workflow, thank you! I had one issue: after clicking the 'Progress selected image as result' button, my process got stuck at '33% - Prevent Batch <1' on the top green status bar. However, it was resolved by selecting an alternative VAE in the Checkpoint Loader. Now everything works fine. It’s an interesting tool to tweak and experiment with. Any plans for adding a Flux option?

    RedPinkRetro
    Author
    Feb 19, 2025

    Hey there, thank you very much! 🙌

    The issue you encountered seems to come from using the 'Progress selected image as result' in conjunction with the for-loop process, I believe. I should point out that it shouldn't be used as an option in future versions. 🙏

    I personally always copy the clipspace to the Load Image node used as input instead.
    That acts as a backup of sorts as well, wheras the 'Progress selected image...' option is keeping the clipspace in the void

    About a Flux version, yes, in a dedicated workflow. I have already built a prototype for that including support for the ACE LoRAs, which actually aren't bad with proper preprocessing.

    At the moment there are a lot of changes being made on Comfy's frontend, which are going to ultimately replace group nodes altogether, in place of a better as well as easier to handle/maintain system. That is exciting, but at the same time all the small steps towards that are rather disruptive to all my (unconventional) methods of hacking in some more user friendliness by misusing some nodes on purpose 😅

    That is why I haven't updated workflows as much lately, as the moment I update my frontend version usually what happens is ... 💩 ⏩ 𖣘 💥💦

    Workflows
    SDXL 1.0

    Details

    Downloads
    663
    Platform
    CivitAI
    Platform Status
    Available
    Created
    1/16/2025
    Updated
    5/13/2026
    Deleted
    -

    Files

    comfyuiInpaintingXL15_v7.zip

    Mirrors

    HuggingFace (1 mirrors)
    CivitAI (1 mirrors)