ssitu / ComfyUI_UltimateSDUpscale

ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A.
GNU General Public License v3.0
866 stars 58 forks source link

add mask as optional input to UltimateSD Sampler #96

Open Naomi-Ken-Korem opened 4 months ago

ssitu commented 4 months ago

I have questions about this. Is it intended that the mask is applied to each chunk of the image? If it is intended, how useful is it? I can't think of a good way to use this.

Naomi-Ken-Korem commented 4 months ago

You can add one mask that is applied on all frames in video, or a batch of masks ( mask for each frame, which makes more sense this is how I use it) It is a way to get results like here: https://discord.com/channels/1076117621407223829/1264492978232229908

In practice it enables to apply the animatediff model using ultimateupscale only on part on the areas in the video. ( and preserve the consistency of the masked area )

ssitu commented 4 months ago

Looks like I need access to that discord channel if I want to see the attachment.

Naomi-Ken-Korem commented 4 months ago

it is the banadoco channel https://discord.gg/pn385fGy Here it is :)

ssitu commented 3 months ago

So if I'm getting this right, the mask can be used to avoid rediffusing an area where you want to prioritize consistency while also upscaling the frames? Although I'm still confused about how adding a mask to ultimate upscale would help. The mask will be used in each chunk of the upscale, which can lead to strange results. Here is a demonstration with 4 tiles, the blurred areas are the parts where the resampling happens:

image

Wouldn't you want the mask to take up the entire upscaled image/frame instead of each tile?

Naomi-Ken-Korem commented 2 months ago

Yes, you are right, I mostly worked with the redundant setup where the tiles are same size os the full image, and than there is no reason to actually use UltimateSD

I will try to fix the pr