invoke-ai / InvokeAI

InvokeAI is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, supports terminal use through a CLI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.07k stars 2.39k forks source link

[bug]: Pasting paths with quotes into Model Manager gives an error #6517

Open DuncanL opened 3 months ago

DuncanL commented 3 months ago

Is there an existing issue for this problem?

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX 4070

GPU VRAM

12GB

Version number

v4.2.4

Browser

Firefox 128.0b3

Python dependencies

No response

What happened

Tried to add models using paths copied from Windows File Explorer and recieved error message about "Unsupported model source"

What you expected to happen

The models to be imported

How to reproduce the problem

Right click a model file in Windows Explorer Select "Copy as path" Paste the path into the "URL or local path" section in Model Manager Note that Windows has added quotes to cope with spaces in the path; even if there are none. Click Install An error toast appears along the lines of "Unsupported model source: '"D:\blah\blah\fred.safetensors"' Remove the quotes and press Install again - works as expected.

Additional context

Generally Windows file handlers cope with quotes; remving them as necessary. Simply stripping any quotes from the pasted path would make this process much easier if you're importing multiple models.

Discord username

No response