blueturtleai / gimp-stable-diffusion

MIT License
322 stars 40 forks source link

stable-diffusion-webui support request #7

Closed zuencap closed 1 year ago

zuencap commented 1 year ago

Please consider supporting locally running stable-diffusion-webui.

I can help with testing.

heitikei commented 1 year ago

It looks well thought out.

blueturtleai commented 1 year ago

What would be the benefit of running webui locally and not the notebook? This wouldn't work out of the box, because webui has a different API.

Running notebooks locally is supported by Google. I would be happy, if you could give it a try. I can't try it myself as I haven't got a local GPU. Here are more details: https://research.google.com/colaboratory/local-runtimes.html

zuencap commented 1 year ago

The benefit in my view is using stable-diffusion-webui which is well supported and full of features. Although I won't be able use all those parameters through the gimp interface, I can still use webui in parallel.

To be honest I haven't tried your notebook but I guess there is no webui for manual use?

I might try to hack the plugin myself and see if it's feasible to merge changes or it's better to create a fork.

blueturtleai commented 1 year ago

You are right, that the webui has many features. But only a few features make sense in GIMP imo. Image generation with and without init, in- and out-painting are useful in GIMP. And these will all be supported by my notebook.

The notebook is a headless server, modified to use it together with the GIMP plugin. It is based on the deforum notebook.

I won't support webui as backend, as I see not benefit doing this. I also know from another developer, that it's not much fun using webui as backend as it is under heavy development and the API changes almost daily. That really sounds like a support nightmare. For me the way to go is running my notebook locally. It sounds like this is possible with little efforts. That way I have only one code base for running on colab and locally.

What's the reason, that you want to use GIMP and the GIMP plugin? Why not just use the webui?

zuencap commented 1 year ago

In my workflow currently, I paint a draft in GIMP then use img2img on it. Then I pick one result and edit it in GIMP again and repeat the process. So GIMP plugin would be very useful. In theory, the plugin should be enough for this workflow but I also use resizing and face correction in webui too.

I see your concern about dealing with webui. You're right. Maybe it might be possible to copy your backend implementation to stable-diffusion-webui. I'll check the code.

blueturtleai commented 1 year ago

Okay, I understand. Face correction is inpainting, right? This is now also possible with my plugin. What's not supported is resizing.

zuencap commented 1 year ago

Sorry, actually it's called "face restoration": Lets you improve faces in pictures using either GFPGAN or CodeFormer. So it's a separate feature than in-painting.

But really there are tones of other things I'm still learning how to use: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features and more is coming all the time.

Obviously I can use the two projects in parallel but it's too much hassle 😦

blueturtleai commented 1 year ago

I see. Of course it would be possible to integrate all these features in GIMP. But in the end you rebuild then webui in GIMP and this doesn't make much sense imo. Like I wrote above, currently I see image generation with or without init and in-/out-painting as the features which should be supported in GIMP. For all the other features you should use a specific tool.

zuencap commented 1 year ago

I see your point.

What do you think about, can your backend be ported to sd-webui?

I don't know much about python so it's hard for me to understand what's going on totally, so correct me please if I wrong. Your backend is an http server which uses a "stable-diffusion library" to render images on request. sd-webui is probably using the same or similar "stable-diffusion library" so it might be possible to run your backend locally and use sd-webui's services. Does this sound right-ish?

zuencap commented 1 year ago

Never mind, I just found out it's possible to copy/paste an image to/from the webui which is as good as using the gimp plugin for my workflow. It saves me from creating temp files, opening them in the other app all the time.

Still I would like to see what this plugin will evolve into. Maybe on-the-fly ai image suggestion in the future? 😄

Thanks for your help and effort for developing this nice tool.

dallytaur commented 1 year ago

I would still like this feature ill prefer to be cloud independent and not dependent on google.

blueturtleai commented 1 year ago

In the meantime there are two google independent alternatives: local server and stablehorde. For both img2img will be added soon. You find them in subdirectories of the repo.