lquesada / ComfyUI-Inpaint-CropAndStitch

ComfyUI nodes to crop before sampling and stitch back after sampling that speed up inpainting
GNU General Public License v3.0
398 stars 23 forks source link

On/Off switch #18

Closed nux1111 closed 5 months ago

nux1111 commented 5 months ago

Please could you include a switch to bypass the crop. think it is useful for we that use comfy Api.

lquesada commented 5 months ago

Hi,

What's your use case? When would you do that?

Also, have you tried literally bypassing the node? From the inputs and outputs, that should work. Select the node and do CTRL+B or Command+B so it's marked purple (bypass).

You may also get it by right clicking the node and bypassing it.

nux1111 commented 5 months ago

my use case is for comfy api (without the node frontend), you are unable to bypass nodes so a switch works in handy there. there are times when you want the full context of the image for the inpaint. Below is a node similar to inpaint crop that has the switch but doesn't have as much flexibility as this. CleanShot 2024-06-09 at 06 04 03@2x

lquesada commented 5 months ago

aha, I get it.

I will not add some bypass boolean given there's already a bypass function in the UI and it would be very confusing to most users, who don't use Comfy API. Honestly, this is something that Comfy API should provide, rather than all the nodes separately providing it.

If you want a workaround from the inpaint node, setting context_expand_factor or pixels to very large values in practice has the effect to not crop (but still downsize if needed to fit in the target resolution, which is something you probably still desire).

Cheers!