BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
289 stars 44 forks source link

[Bug]: Setting Custom save images location breaks Use local HTML file for model info when Use local images in the HTML is enabled. #287

Open jackminghaoxu opened 2 months ago

jackminghaoxu commented 2 months ago

Describe the bug.

Locally saved html files do not load locally save images when Custom save images location is set and Use local HTML file for model info when Use local images in the HTML are enabled.

Steps to reproduce the problem.

Assuming stable-diffusion-webui is installed to F:\stable-diffusion-webui-1.9.3, and running Microsoft Edge on Windows 10,

  1. Check Use local HTML file checkbox for model info in CivitAI Browser+ Browser settings.
  2. Check Use local images in the HTML checkbox in CivitAI Browser+ Browser settings.
  3. Set Custom save images location field to civitaibrowser\saveme in CivitAI Browser+ Browser settings.
  4. Check Automatically save all images checkbox in CivitAI Browser+ Downloads settings.
  5. Apply settings.
  6. Download model EasyNegative as easynegative.safetensors to F:\stable-diffusion-webui-1.9.3\embeddings
  7. Open F:/stable-diffusion-webui-1.9.3/embeddings/easynegative.html in Microsoft Edge. Images are broken, opening their link in a new tab brings up F:/stable-diffusion-webui-1.9.3/embeddings/easynegative_0.jpg, which doesn't exist.

Expected behavior

The html file should be trying to open F:/stable-diffusion-webui-1.9.3/civitaibrowser/saveme/easynegative_0.jpg.

System info

Console logs

n/a

Additional information

Html files are also broken if Store the HTML and api_info in the custom images location is enabled. The html file saves images as civitaibrowser\saveme\easynegative_0.jpg. Trying to open the link brings up F:/stable-diffusion-webui-1.9.3/civitaibrowser/saveme/civitaibrowser/saveme/easynegative_0.jpg.