gbtb / nix-stable-diffusion

Flake for running SD on NixOS
113 stars 21 forks source link

Create `package` outputs for invoke AI, webui, preload-models script #18

Open mitchmindtree opened 1 year ago

mitchmindtree commented 1 year ago

This is already mentioned as a potential goal in the README, but just thought I'd open an issue to track/discuss!

It would be wicked to turn both invoke AI and the webui into packages. I guess it's kind of unclear how to expose the model-download step which requires quite a bit of interactivity (making the huggingface account, generating a token, etc).

I guess the model download isn't an essential step to run invoke though - maybe running that step could also be it's own .#preload-models "package"?

gbtb commented 1 year ago

Hey :wave: With 2.0.0 release now both outputs are actual python packages. InvokeAI by itself is a properly declared pyproject.toml and should work great, with webui I had to pull some tricks to make it packageable and probably missed smth, but basic stuff should work.

As a first step to declarative model management, I've also tried to make webui reuse InvokeAI paths for support models, but my attempt based on CLI args has failed Declarative model management is nice to have, but I don't think I'm going to do it by myself. Maybe guys from https://github.com/nixified-ai would do that in the future or someone else make contribution to this flake :smiley: