light-and-ray / sd-webui-replacer

A tab for sd-webui for replacing objects in pictures or videos using detection prompt
193 stars 11 forks source link

additional Tiled Upscale behavior (not bug?) #71

Closed pessivesto closed 4 months ago

pessivesto commented 4 months ago

I don't think this is a bug, so please forgive me for writing it here. Depending on the detection area of 'sam' or 'grounding dino' (size or amount in the detection area? idk..) Sometimes Replacer goes through an additional tile upscale process. There is no problem with the low resolution image, but this process takes a very long time in the high resolution image. I tried to interrupt the additional upscale process for the test, but there was no significant difference in the result. (But at high resolution image is broken, so I interrupt this process to shorten the generation time.) I usually use the hiresFIX function to finalise the result. So the basic detection result is just a guideline or foundation for hiresfix. I can do almost complete image transformation with the SD1.5 model through this pipeline. (thank you) btw is there any way to skip this additional tile upscale process or prevent this additional operation depending on the detection area?

스크린샷 2024-04-30 184612

pessivesto commented 4 months ago

I found the cause of the problem and fixed it 😓. The problem was solved by checking 'none' on the 'Upscaler for img2img' function🥲. Sorry for taking your time.🙋‍♂️

스크린샷 2024-04-30 195615

light-and-ray commented 4 months ago

Okay no problem

light-and-ray commented 4 months ago

In upscaler algorithm in webui it tries to upscale 3 times by 4x each, while the resolution becames >= target, then it downscales to target. If you upscale 5x for example, then picture will be upscaled 4x, then 4x again, then downscaled