AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.67k stars 26.77k forks source link

integrate the Hydrus Client API #2084

Closed CuddleBear92 closed 2 years ago

CuddleBear92 commented 2 years ago

Integrate the Hydrus Client API! having a folder to manage your generated files is messy and gets out of control quite quickly! With Hydrus you can push new files to an Hydrus client and also send over any tags or prompt the user would use. This will also work great with Deeper Danbooru!

Easier management of larger library of image generation, don't be limited by the explorer window. Hydrus is also supported by Windows, Linux and MacOS across the board or even run from source in Python. The API can push raw files, urls, tags and so on if you like. Technically if integrated more fully you can also query files on the Hydrus Client to use in img2img and others.

Don't be limited by the simple limitations of filenames and folders, use tags for your seed, prompt, tags, model, settings and more!

https://github.com/hydrusnetwork/hydrus Docs: https://hydrusnetwork.github.io/hydrus/index.html API docs: https://hydrusnetwork.github.io/hydrus/client_api.html https://hydrusnetwork.github.io/hydrus/developer_api.html

Side note, Hydrus can also scrape sites and boorus if you want to download a new imageset for training!

evanjs commented 2 years ago

Thank you for opening this issue 😄 There are a ton of things I want to do re stable diffusion and Hydrus, but getting the discussion going is a great place to start, regardless of what auto wants to do (Maybe the issue or just this comment would be better served as a discussion, idk)

I'll add a few things I've been thinking about that would be nice to have re webui <-> Hydrus integrations

Note: I don't think that all of these are necessarily "best implemented in the WebUI", but I'll list them here to consolidate my thoughts/before I forget


Easier tag/generation parameter importing

Hydrus supports configuring "import folders", which allow you to specify a folder to import at specific intervals. It can also delete files after import. This makes Hydrus a good candidate for long-term storage of content generated via SD, especially at higher volumes.

While you can automatically import images from folders with Hydrus, there are a few quirks that prevent the above from functioning perfectly with webui-generated content:

Currently, I have to add tags for each image manually. While this is not a problem exclusive to this scenario, it is exacerbated by how much I can easily generate with SD, and quickly gets tiresome.


While there is quite a bit more that Hydrus can do, I think that being able to automatically move generated images into Hydrus—with information such as generation parameters—would make the volume of SD content I generate much easier to manage in the long run.

As stated above, Hydrus can already do scheduled/automatic folder imports, but the current end result is essentially just a giant scheduled picture dump without easily visibile/associated tags, which doesn't entirely solve the long-term storage/management problem.

As it stands, Always save all generated images will be the death of me, especially now that https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/1932 (i.e. Generate Forever) has been merged.

Regardless, thanks for your continued work on this repository, Auto!

(And please pardon to brain vomit 😅)