sail-sg / EditAnything

Edit anything in images powered by segment-anything, ControlNet, StableDiffusion, etc. (ACM MM)
Apache License 2.0
3.3k stars 188 forks source link

Edit high res? #8

Open cian0 opened 1 year ago

cian0 commented 1 year ago

Similar to high res inpainting in SD webui, would this be possible?

gasvn commented 1 year ago

Thanks. Can you give me a link to what you said? That's possible if we train the model with higher resolution.

cian0 commented 1 year ago

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features

I don't think there's a need to train with a higher resolution for this as it's simply a technique to resize and repaint the masked area. This is usually used for faces in SD

Under inpaint area, the doc says:

Inpaint area Normally, inpainting resizes the image to the target resolution specified in the UI. With Inpaint area: Only masked enabled, only the masked region is resized, and after processing it is pasted back to the original picture. This allows you to work with large pictures and render the inpainted object at a much larger resolution.

gasvn commented 1 year ago

I understand it now. This would be a good feature. We can only edit a part of the image in high resolution.

cian0 commented 1 year ago

Yup though I'm not sure if I get why outputs would have blurred faces as per documentation..

gasvn commented 1 year ago
image

Here are some images from the SAM dataset. You can find more at https://segment-anything.com/dataset/index.html We are solving this problem by finetuning models on the Laion dataset.

kadirnar commented 1 year ago

Similar to high res inpainting in SD webui, would this be possible?

I want to add this feature to my demo application. But I couldn't find the codes. Can you help me? Demo: https://huggingface.co/spaces/ArtGAN/Stable-Diffusion-ControlNet-WebUI

cian0 commented 1 year ago

Similar to high res inpainting in SD webui, would this be possible?

I want to add this feature to my demo application. But I couldn't find the codes. Can you help me? Demo: https://huggingface.co/spaces/ArtGAN/Stable-Diffusion-ControlNet-WebUI

I believe it's here :

https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/22bcc7be428c94e9408f589966c2040187245d81/modules/processing.py#L985