Trung0246 / ComfyUI-0246

Random nodes for ComfyUI
MIT License
93 stars 10 forks source link

How to use LOOP and HOLD nodes to recursively add overlapping layers to base image? #32

Open annasophiachristianahahn opened 1 month ago

annasophiachristianahahn commented 1 month ago

Hi! I wanted to write regarding your ComfyUI nodes for looping- I’m trying to use LOOP and HOLD to repeatedly pass an image through for additive collage on the same base layer but can’t seem to figure out how to properly implement it.

I have a base image that I want to overlay multiple images onto similar to applying small stickers over a larger image

When I pipe the batch of images into a Paste By Mask node with randomized mask locations, it creates 3 different versions of the base image with 1 sticker applied to each version—-

Instead I would like for it to create a single image with all 3 stickers stacked on top of it by looping back the output image to have the next batched sticker overlayed onto it

What would be the proper way to set up this pipeline using your looping nodes?

Trung0246 commented 1 month ago

I totally forgot about porting my guide on matrix to here so if you join the official comfyui matrix server then you can take a look at this

https://matrix.to/#/!SLQulqwEQbBXcnBrCi:matrix.org/$MRco2WhaGqmr2weIl_Krc-3YyxwHe9Jc5uACpFiu8vo?via=matrix.org&via=tchncs.de&via=cutefunny.art

annasophiachristianahahn commented 1 month ago

Thank you for this- I’ve tried following your matrix thread but I am still confused, can you explain to me how I can connect the nodes to make the output image loop back and be put through the same process that assembled the image?

I described a bit more in detail in my first post, but basically I am trying to push an output image back through a pipeline for overlapping images ontop of it so that it would have more and more images overlaying the base image

I totally forgot about porting my guide on matrix to here so if you join the official comfyui matrix server then you can take a look at this

https://matrix.to/#/!SLQulqwEQbBXcnBrCi:matrix.org/$MRco2WhaGqmr2weIl_Krc-3YyxwHe9Jc5uACpFiu8vo?via=matrix.org&via=tchncs.de&via=cutefunny.art

annasophiachristianahahn commented 1 month ago

I know the workflow I’m pasting an image of wouldn’t achieve what I’m describing above (would be grateful for any advice how I can actually achieve what I describe in my previous post)

BUT

I’m having trouble even getting a basic implementation of your nodes to work- what am I doing wrong in these images?

IMG_5277 IMG_5278

Trung0246 commented 1 month ago

Hm the node that connect to _event looks invalid. Can you give me the workflow so I can take a look?