Closed rvkwi closed 1 year ago
Wanted to report this as well, but for Windows. I have all my SD-Resources on a different drive, so the previews are not working for:
--embeddings-dir --hypernetwork-dir --lora-dir
Same error with Gradio
ValueError: File cannot be fetched: F:/SD/embeddings/030-Chars/marin_7.preview.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.
Linux here, i also don't have previews but i didn't change my hypernetwork_dir. It's default. Embeddings and Lora Previews work, but hypernetworks don't
@RandomLegend Just tried it, it works for me as expected if i copy the files into the install dir and not use the options for an outside path (on debian 11), including hypernetworks. Might be a different issue causing this on your end.
I think this is by design in Gradio for security. It also, currently, breaks symlinks too, but that should be fixed by the next release. https://github.com/gradio-app/gradio/pull/3037
@catboxanon Interesting, i just tried the symlinking and yeah it throws the same error.
So i suppose one workaround would be storing previews in a temp directory before being displayed with gradio? I'm not sure if gradio has something built in for this already, not very familiar with it but their docs don't seem to mention it.
Or maybe serialize the previews into memory?
Just want to point out, that symlink-option is a workaround at best, since some filesystems don't support symlinks (exFAT etc)
https://github.com/gradio-app/gradio/pull/3075 would make symlinks not required.
Fixed now as of 1d8e06d542176beade37d2d36cb57460c3c6772f, I think this can be closed.
I'm running 3715ece0adce7bf7c5e9c5ab3710b2fdc3848f39
and none of my embeddings/loras have previews. They actually aren't in a separate location from the install (just the txt2image, etc directories are), and I still have this issue.
You can work around this by storing a PNG file with the same name as the network and refresh the view. Works for checkpoints and LORA, but I haven't tested with the others as I don't have any installed...
You can work around this by storing a PNG file with the same name as the network and refresh the view. Works for checkpoints and LORA, but I haven't tested with the others as I don't have any installed...
Thanks. I actually inadvertently fixed this issue by getting the civitai helper extension, which downloaded images and links. Its super helpful.
Thanks. I actually inadvertently fixed this issue by getting the civitai helper extension, which downloaded images and links. Its super helpful.
Nice! Civitai is definitely my new fave source, after finding it a couple of days ago...
Because I ended up losing a number of fantastic prompts today (which I hadn't quite rendered and were refreshed out of existence), I've just setup InvokeAI to play around with...
Is there an existing issue for this?
What happened?
The previews for extra networks seem to not function if one of the directory options outside of the install folder are used.
For example when using
--embeddings-dir
. It will look for them there and try to use them, it will also save them to that directory with the embedding correctly. But it won't load the previews, it just shows a blank image and throws this error:ValueError: File cannot be fetched: /mnt/mldrive/ai/files/stable-diffusion-library/embeddings/poset2.preview.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.
Steps to reproduce the problem
replace preview
What should have happened?
It should load/show the preview image that it saved/detects
Commit where the problem happens
0792fae078ba362a5119f56d84e3f490a88690ae
What platforms do you use to access UI ?
Linux
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
Additional information, context and logs
No response