StableStudio
StableStudio copied to clipboard
Make a basic implement for webui plugin
hi Stability team, I am not sure you guys already start to implement the webui plugin or not, but I make a basic version for this big demand. please let me know how you think about it.
Hello! 👋
We haven't been able to pick this up yet, so I'd be extremely happy to help you get it finished and merged!
Thanks! I make a TODO list in the issue https://github.com/Stability-AI/StableStudio/issues/25 and readme, please feel free to request any features I missed.
How would you like us to cooperate with you?
Should we create a branch which pulls in from yours, commit directly to yours, etc.?
I think it is ok to commit directly, shall I add someone into my repo?
@cruhl should be as simple as gh pr checkout 24
Been playing around with this plugin, and so far it seems to work quite well, although with some major issues that need to be addressed before it can be merged:
issues
- img2img / masking is not implemented
- model/sampler seems to lose its state often
- seed seems to be ignored (not sure if this is webui automatically incrementing seed or not)
possible implementations:
- history (might be able to implement via https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)
- can pull from a path in settings
- currently webui needs to be started manually with extra CLI flags.
- plugin could use path in settings along with a field for extra cli flags to launch webui on startup
- webui status could replace images generated status
@Kajdev hey at least its a start right?
Thanks for @KAJdev testing, let me add the requirements in the TODO list
@KAJdev @jtydhr88 @daryllaro Taking a crack at this now
possible implementations:
history (might be able to implement via https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)
- can pull from a path in settings
currently webui needs to be started manually with extra CLI flags.
- plugin could use path in settings along with a field for extra cli flags to launch webui on startup
Wouldn't these two implementations work only in case both StableStudio and SD-webui are on the same host and wouldn't support remote webui?
@merodiro since this plug-in is just at start phase, I only have local environment for dev, once we finish the main features, we can test remote host. However in theory, it should support remote host easily
I just tried it with remote sd-webui and it worked well. ~The only problem I had was that I couldn't load the samplers~ I think I was doing something wrong. it's loading them fine now
When I don't choose a model it displays SDXL as the model used for the generation
I believe this is because internally StableStudio defaults to stable-diffusion-xl-beta-v2-2-2
as a model ID for input objects. If you aren't returning one it will just use the default object specified in Generation.Image.Model.StableDiffusionV1.Input.initial
. This can be overridden by the plugin providing a default input.
@jtydhr88 We're going to try to get this merged tomorrow, will be updating some code in a bit 👍
@cruhl thanks! I am also making final tests and fixing the bugs I can find
@cruhl @KAJdev one more thing, in order to get generated images form webui, I created an extension to entend the rest api since webui doesn't provide, see https://github.com/Stability-AI/StableStudio/issues/25 and https://github.com/jtydhr88/sd-webui-StableStudio, please let me know you guys accept this solution or not
@jtydhr88 Are you cool with the README changes I committed? @KAJdev is making some tweaks to the plugin itself and then we're cool to merge. 🦾
Yeah! Readme is good for me!
@jtydhr88 Refactor is going well, noticing some issues with the history plugin. Looks like get_root_path()
is failing since __file__
doesn't exist in exec()
ed python code. os.getcwd()
should work though.
@KAJdev thanks for catching, I will fix it soon
hi @KAJdev as my test, there is an issue happening on get history image, even webui returns the data, but StableSudio sitll keeps loading without show image:
I output the data, and they are all Prmoise:
I have to revert your code regarding this part to my previous one.
Another issue is the status keeps on "Ready without history plugin" even the extension already be here and orks well to return data. (I don't fix it)
Yes, I was having issues with the history plugin, the error mentioned before as well as some possible CORS issues. Will investigate more.
Good catch on the async map there, that revert is fine.
besides this issue, anything else needs to do for this init version? or i am good to merge
I think we are aiming for an early morning merge.
@jtydhr88 Are we good to merge this from your perspective?
@cruhl yes!
I really need to thank you @jtydhr88 (@cruhl , @KAJdev ) for bringing this to StableStudio. StableDiffusion now feels so much polished and slick! Of course there are plenty of opportunities for more features like cancel current dreaming, progress bar/eta, set image size, set settings for variants before dreaming... but this first, very important step was really great work. Well done!