s0md3v / sd-webui-roop

roop extension for StableDiffusion web-ui
GNU Affero General Public License v3.0
3.3k stars 837 forks source link

Anu support for Vlad Auto UI? #178

Open StableInfo opened 12 months ago

StableInfo commented 12 months ago

Hello, I described he issue here: https://github.com/s0md3v/sd-webui-roop/issues/79 Thought it needed a little "up", since its been more than 3 weeks.

Thanks

Gourieff commented 12 months ago

You can use my fork or only my installation instruction for VladAuto: https://github.com/Gourieff/sd-webui-roop-nsfw#installation - it will work for the original Roop as well

StableInfo commented 12 months ago

the title has an extra word "nsfw", is it different from the original roop?

Gourieff commented 12 months ago

Yes, you can check the list of main differences here: https://github.com/Gourieff/sd-webui-roop-nsfw/releases Or just use my installation instruction (SD.Next section) with this Roop

glucauze commented 12 months ago

Providing a tool that lets you swap face on nsfw photos is irresponsible. It allows harassment of women. I don't think it belongs here. It's one thing for you to be able to modify the program to your liking, but I think it's a bad idea for you to widely distribute a tool that allows you to do just about anything. Think of it as an idiot filter.

Furthermore, I'm convinced that this is not in line with the model disseminated by insightface, which is the underlying library. It doesn't meet the requirements for reasonable use of the model. Unless you produce a specific model on your own without such limitations. See here https://github.com/deepinsight/insightface/tree/master/model_zoo

I know this isn't a popular opinion, but I think it's important to point it out.

I'm continuing to work on the extension in the form of a PR here: https://github.com/s0md3v/sd-webui-roop/pull/152

This version is much more complex and extensive (and therefore probably has its bugs). It seems to me that it works correctly at the vlad level and that it works better in terms of performance and inpainting.

Gourieff commented 12 months ago

I don't want to ague, in ethical way you're of course right But it's just a tool And how it's used - depends on how much human is in a particular man Everyone has the right to make a choice

The simplest example - nude antique statues One person looking at their nakedness will admire the beauty Another one - will probably have some dirty thoughts And what? Michelangelo, who sculpted these statues, would've had to impose restrictions on his art? Or maybe it should've been done by any other person? Only because of a probability that someone else could use Michelangelo's technique to sculpt naked women or men and had dirty thoughts staring at them?

Forbidden fruit - always sweet Current human nature is such that the more anyone set intentional, pointed limits and restrictions - the more temptation to set them off But the nature of female beauty should not be subject to restrictions The rest is personal problems of individuals with a dirty mind Why does our society have to look up or adapt to some crazy psychos? In my opinion our society must look up to mentally healthy people

Moreover, both SD as batch of models and SD WebUI as an app - already have no limits in that case. What's the point of making such limits in some separate extension? A rhetorical question I think :)

Just my off-topic opinion and I hope I didn't offend anyone

P.S.: In future updates I have plans to add options to set NSFW filter on/off Even Google has such options in their image search They give a choice)

glucauze commented 12 months ago

I am not against nsfw in general. I am against swapping the face of a real person into nsfw content which is really different. If it were possible to check that the faces were synthetic faces (which is currently not reliably possible) before making the swap, I would have no problem with this. Making it easy for everyone seems ethically risky. In any case, I wouldn't take this responsibility on a personal level. I wouldn't want to feel responsible for someone being harassed with this tool.

Gourieff commented 12 months ago

Maybe an invisible watermark can solve the issue in some way If a face is swapped into nsfw -> an invisible watermark will be generated directly on the final face On the other hand, given that all this is open source, anyone can cut this piece of code in their own fork In the end, it all depends on the person, on one's inner foundations and views

glucauze commented 12 months ago

Early versions of faceswap had a wattermark. It's not easy to set a wattermark that's effective and doesn't degrade the image. Especially as it's often easy to remove. It would have to be integrated directly into the model, which isn't the case at the moment.

The fact that people can bypass the protection because it's open source is different from making this option possible. You don't give alcohol to kids even if you know they can manage to find it. The protection is there to dissuade the masses from making modifications. An anti-idiot filter. And it's also a way of respecting the license of the original model as much as possible.

Providing tools to do anything on sd is likely to give arguments against AI-generated images. I know that Lora allows this, but again it requires more experience and a greater quantity of images.

I feel like that nerd kid with glasses lecturing the others in the playground, but I think it's important. It's not against you, it's just to try and establish a red line.

glucauze commented 12 months ago

I listed all the features of the PR in the README. Except for the source selection and nsfw, i think the current version offers more features : https://github.com/glucauze/sd-webui-roop

cleverestx commented 12 months ago

I am not against nsfw in general. I am against swapping the face of a real person into nsfw content which is really different. If it were possible to check that the faces were synthetic faces (which is currently not reliably possible) before making the swap, I would have no problem with this. Making it easy for everyone seems ethically risky. In any case, I wouldn't take this responsibility on a personal level. I wouldn't want to feel responsible for someone being harassed with this tool.

You can be against whatever you want, of course, but don't force your morals/ethics on other people, which includes things you think "seems ethically risky." Not everyone is using this tech in a damaging/harmful way. This sort of "can be badly used" argument can be used against anything, guns, knives, speech, etc and it shouldn't prevent any of those things.

StableInfo commented 12 months ago

Providing a tool that lets you swap face on nsfw photos is irresponsible. It allows harassment of women. I don't think it belongs here. It's one thing for you to be able to modify the program to your liking, but I think it's a bad idea for you to widely distribute a tool that allows you to do just about anything. Think of it as an idiot filter.

Furthermore, I'm convinced that this is not in line with the model disseminated by insightface, which is the underlying library. It doesn't meet the requirements for reasonable use of the model. Unless you produce a specific model on your own without such limitations. See here https://github.com/deepinsight/insightface/tree/master/model_zoo

I know this isn't a popular opinion, but I think it's important to point it out.

I'm continuing to work on the extension in the form of a PR here: #152

This version is much more complex and extensive (and therefore probably has its bugs). It seems to me that it works correctly at the vlad level and that it works better in terms of performance and inpainting.

Hello, so you made a roop version that works with vlad?

glucauze commented 12 months ago

You can be against whatever you want, of course, but don't force your morals/ethics on other people, which includes things you think "seems ethically risky." Not everyone is using this tech in a damaging/harmful way. This sort of "can be badly used" argument can be used against anything, guns, knives, speech, etc and it shouldn't prevent any of those things.

Exactly, and most of the things you mention are controlled in one way or another. More so in some countries than others, and not just dictatorships. Besides, it's not my morals I'm trying to push, but simply what seems to me to be those of the creators of the inswapper model you're using. If you want to download and modify the software, you take your responsibility, now I don't think it's a good thing to publicly distribute such a tool.

I'm not forcing anything I'm just giving an opinion. I made it clear what I was against (make porn with real people's faces without their consent), and what I thought was unwise to make easy. And I'm not talking about nsfw content in general. In any case, I will no longer contribute to software that allows this.

glucauze commented 12 months ago

@StableInfo Yes ( https://github.com/glucauze/sd-webui-roop), it should. Inpainting may be buggy for vlad, i did not find why : but the same problem applies to other forks i think.

StableInfo commented 11 months ago

Are there forks that full definition instead of the original 128 ?

glucauze commented 11 months ago

There are no public models with 256+ resolution afaik apart from simswap which use a different architecture and an old version of insightface.

StableInfo commented 11 months ago

and non public?

glucauze commented 11 months ago

Yes, i suspect insighface to have a non-public 512 model that they use commercially for their midjourney api.

As the training process is not really detailed. It would be quite tedious without a great deal of knowledge (and computing power) to implement a model. The best thing would be for simswap to adapt its model to recent versions of insightface (0.73 vs. 0.21), but I don't think this is their priority. Using simswap as it is would mean having very old dependencies and that would cause headache getting it to work with recent versions of a1111 or sd.

StableInfo commented 11 months ago

I think there are some people who were able to touch the code of roop and made it possible to work with higher resolutions

glucauze commented 11 months ago

I would be suprised. The main code of roop doesn't show any sign of that except upscaling and face restore which is done by most extensions. You would have to change insightface, specifically here : https://github.com/deepinsight/insightface/blob/fc622003d5410a64c96024563d7a093b2a55487c/python-package/insightface/model_zoo/model_zoo.py#L35

StableInfo commented 11 months ago

I read about it here: https://www.reddit.com/r/StableDiffusion/comments/15mqt5e/getting_close_to_reality/, this guy changed it

glucauze commented 11 months ago

There is no clue on the first thread that he is using a better model. He just used a face restorer (GFPGAN) and upscaling.

StableInfo commented 11 months ago

Read the comments. trust me.

glucauze commented 11 months ago

The closer modification i read was related to using Waifu2X an upscaler.

StableInfo commented 11 months ago

The comment I read was this one: "I am pretty familiar with Python yes. I needed a Roop version which didn´t lose the frames if the face was not very defined and I managed to tweak a bit the original version, plus I added an extra pass with a Gan to harmonize the face. ( doesnt work all the time, depends on the initial image )"

What do you think?

glucauze commented 11 months ago

Yes that's upscaling and face restorer with Gan. It's exactly what i am doing here : https://glucauze.github.io/sd-webui-faceswaplab/. It just depends on what you are using as face restorer/upscaler. But it does not change the 128 model.