stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Extra Networks does not show preview.png
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Preview image is not displayed

Steps to reproduce the problem
1.Place LoRA-test1.safetensors, LoRA-test2.safetensors, LoRA-test1.preview.png in the /mnt/r/data_model/LoRA folder. 2. Click the Extra Networks button. 3.Click the LoRA tab 4.LoRA-test1 becomes white
What should have happened?
LoRA-test1 should display the LoRA-test1.preview.png image
Commit where the problem happens
f2eae6127d16a80d1516d3f6245b648eeca26330
What platforms do you use to access UI ?
Linux
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
--administrator --xformers --opt-channelslast --lora-dir /mnt/r/data_model/LoRA/
Additional information, context and logs

I've had this issue as well but on windows, I thought it was the default and would be added in later until I saw screenshots that showed the tab having working previews. Has anyone come up with a solution or discovered a cause? It would be useful to have images so I don't have to remember the names of each Lora, embedding, hypernet and there styles to plan what I want to generate
I just ran into the same issue, and thought that either my Loras had no previews, or the preview was not actually implemented yet.
Experiencing the same issue on Windows 11, Chrome, here after an extended bit of time. Our team here hasn't found a fix for the PNG preview. However it doesn't seem to hinder the effect or viability of the LORA in the prompt. Still, if anyone ended up figuring out a fix, an update would be great.
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...
It seems updating the function link_preview of ExtraNetworksPage in modules/ui_extra_network.py can work for my environment (windows 11, chrome).
The original function is like:
def link_preview(self, filename):
return "./sd_extra_networks/thumb?filename=" + urllib.parse.quote(filename.replace('\\', '/')) + "&mtime=" + str(os.path.getmtime(filename))
The updated function is like:
def link_preview(self, filename):
return "./file=" + urllib.parse.quote(filename.replace('\\', '/'))
This approach is not a good fix but it works for me.
It seems updating the function
link_previewofExtraNetworksPageinmodules/ui_extra_network.pycan work for my environment (windows 11, chrome).The original function is like:
def link_preview(self, filename): return "./sd_extra_networks/thumb?filename=" + urllib.parse.quote(filename.replace('\\', '/')) + "&mtime=" + str(os.path.getmtime(filename))The updated function is like:
def link_preview(self, filename): return "./file=" + urllib.parse.quote(filename.replace('\\', '/'))This approach is not a good fix but it works for me.
It works, thanks!! As long PNG same LORA name in same folder. 👍😍
I'm presently having this issue. If anyone else is, the above @jzzhang8 edit still works.