InvokeAI
InvokeAI copied to clipboard
[enhancement]: upload model via model manager
Is there an existing issue for this?
- [X] I have searched the existing issues
Contact Details
No response
What should this feature add?
It would be great to have the ability to upload a model from your local machine via the web interface.
This would be useful for sites such as Civit which often only allow Model/LoRA downloads when logged in and that don't work well with / don't have an API key available in InvokeAI's environment.
Currently:
- I download a LoRA or Model locally 1a. Maybe try it out with something on my machine quickly
- I have to rsync it to my server running InvokeAI to the container volume path on the host
- SSH to the server 3a. If some files are LoRAs and some are base models, move them around accordingly
- chmod/chown
- Find the path in the mounted container volume
- Copy it
- Load InvokeAI
- Go to the model manager
- Add model
- From path
- Paste the path in relative to the containers fs
- Click search (weirdly pressing enter doesn't work here?)
- Find the model I just copied across (would be good if these could be sorted by date added)
- Import it
- Refresh models
etc... which is a right pain in the bum.
Ideally there'd be either or both:
A) An "upload model" button that pops up a browser file dialogue to select a safetensors file to upload.
and/or
B) The ability to drag a safetensors model onto the invokeAI web interface and have it upload.
Alternatives
No response
Additional Content
Just an idea / super super low priority / a nice to have
I don't think we want to implement a separate frontend for uploading models in the UI.
You can set an API key, though: https://invoke-ai.github.io/InvokeAI/features/CONFIGURATION/#model-marketplace-api-keys
Does that address your use-case?
I was thinking more just another tab or button in or next to the scan folder item:
or simply if you dragged a model file into the model manager pane, similar to how you do with importing images.
I looked at adding API keys via the config file - but as it's committed to git I didn't really want to add secrets there. If InvokeAI can read the secrets from other files or environment variables that may be good enough as a workaround though?
Yes, you can read from environment variables. There's an example here: https://invoke-ai.github.io/InvokeAI/features/CONFIGURATION/#environment-variables
Uploading files would similarly require the API key, no?
To clarify, handling for uploading files to whichever model marketplace, via API or UI, is out of scope. Big can of worms - we don't want to be responsible for all of that complexity.
Oh I missed the env vars for remote tokens! Sorry about that.
Uploading files would similarly require the API key, no? To clarify, handling for uploading files to whichever model marketplace, via API or UI, is out of scope. Big can of worms - we don't want to be responsible for all of that complexity.
Sorry if I wasn't clear, I meant from the users local machine to InvokeAI via the browser
Ohhhh - I misunderstood. That's much more approachable and a nice UX improvement. I think we'd be happy to review a PR to do this. @hipsterusername thoughts (see message just above mine)?
Phew, thought maybe my coffee deprived brain was spewing nonsense 😅
Something like this in the model manager: