ThereforeGames / txt2mask

Automatically create masks for Stable Diffusion inpainting using natural language.
512 stars 40 forks source link

txt2img->txt2mask (to fix small faces) #20

Open jmp909 opened 1 year ago

jmp909 commented 1 year ago

Since SD faces get worse the smaller they get, it would be useful if some of the algorithms used for txt2mask could be used to automate the following process in one

1) txt2img eg photo of jmp909 person wearing a red hat etc 2) send the image to img2img 3) apply txt2mask on eg head or face 4) inpaint photo of jmp909 person at full resolution for just the masked part eg head or face (without the extra part of the prompt so would need a separate input as well for the simplified prompt)

Hope that makes sense

thanks

jmp909 commented 1 year ago

I believe some of this is also related in some part, but I was seeing this as a very specific script for faces. Could possibly use face detect algorithms but the txt2mask is probably plenty sufficient https://github.com/ThereforeGames/txt2mask/issues/16

thanks

danielcitron commented 1 year ago

@jmp909 did you ever find a solution to this?