Skip to content

[Bug]: aliases for allowed dirs are not properly resolved on Windows #240

@itkitteh

Description

@itkitteh

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

Recent change in image (and style) fetch logic [1] has caused the thumbnails to not appear if the webui is hosted on. a windows machine through Stability Matrix. Because Stability Matrix uses aliases for output folders and the logic doesn't seem to resolve aliases properly.

[1]

raise HTTPException(status_code=403, detail="Access denied to this file.")

Steps to reproduce the problem

  1. Install Stability Matrix on Windows.
  2. Install webui-ux
  3. Generate on image
  4. Look at output thumbnails - they will be empty, with fetch requests resulting in 403's

What should have happened?

Thumbnails should have rendered

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

info.json

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.20.1-6-g6f1cbfb2
Commit hash: 6f1cbfb26493815f72da132ed8effa34b2bce71d
Launching Web UI with arguments: --server-name 0.0.0.0 --xformers --api --skip-python-version-check --no-download-sd-model --no-half-vae --gradio-allowed-path 'C:\Users\IttyKitty\AI\StabilityMatrix\Data\Images'
C:\Users\IttyKitty\AI\StabilityMatrix\Data\Packages\stable-diffusion-webui-ux\venv\lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
No items found to import
|          | 0/0 [  0%]
Loading weights [0cf76a2e79] from C:\Users\IttyKitty\AI\StabilityMatrix\Data\Packages\stable-diffusion-webui-ux\models\Stable-diffusion\novaFurryXL_illustriousV8b.safetensors
Running on local URL:  http://0.0.0.0:7860
Creating model from config: C:\Users\IttyKitty\AI\StabilityMatrix\Data\Packages\stable-diffusion-webui-ux\repositories\generative-models\configs\inference\sd_xl_base.yaml
C:\Users\IttyKitty\AI\StabilityMatrix\Data\Packages\stable-diffusion-webui-ux\venv\lib\site-packages\huggingface_hub\file_download.py:945: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(

To create a public link, set `share=True` in `launch()`.
Startup time: 16.8s (prepare environment: 2.7s, import torch: 4.6s, import gradio: 1.0s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.5s, load scripts: 1.6s, initialize extra networks: 0.3s, create ui: 0.4s, gradio launch: 4.3s, add APIs: 0.2s).
Applying attention optimization: xformers... done.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions