lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.45k stars 826 forks source link

[Bug]: Final image is not displayed in UI when output folder is NTFS link #255

Open aib0lit opened 9 months ago

aib0lit commented 9 months ago

Checklist

What happened?

If you use NTFS link to point output folder to another disk (actually I use same output folder for forge, A1111, Confy and Fooocus) final image is missed with 403 HTTP error. Raw output says something like {"detail":"File not allowed: E:/Ai/output/2024-02-14/00001-712226642.png."} HTTP headers: Request URL: http://127.0.0.1:7860/file=E:/Ai/output/2024-02-14/00001-712226642.png?1707929864.7886732 Request Method: GET Status Code: 403 Forbidden Remote Address: 127.0.0.1:7860 Referrer Policy: strict-origin-when-cross-origin HTTP/1.1 403 Forbidden date: Wed, 14 Feb 2024 16:57:43 GMT server: uvicorn content-length: 75 content-type: application/json

Steps to reproduce the problem

  1. rename original output folder
  2. map output folder from another location to webui forge folder (I use Total commander for it)

https://github.com/lllyasviel/stable-diffusion-webui-forge/assets/14361303/79a8043d-45d9-4b27-9c6f-097bdd251e25

What should have happened?

It should display output image as it was before Feb. 13-th

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-02-14-17-03.json

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.12-latest-155-gd81e353d
Commit hash: d81e353d8928147bbd973068d0efbb2802affe0f
Checking ReActor requirements... Ok
Launching Web UI with arguments:
Total VRAM 8191 MB, total RAM 65438 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3070 : native
VAE dtype: torch.bfloat16
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
N:\_SD-forge\system\python\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Using pytorch cross attention
ControlNet preprocessor location: N:\_SD-forge\webui\models\ControlNetPreprocessor
[-] ADetailer initialized. version: 24.1.2, num models: 9
20:42:32 - ReActor - STATUS - Running v0.4.2-b3
Loading weights [1a751a5d65] from N:\_SD-forge\webui\models\Stable-diffusion\a_xl_a-omnium_v11.safetensors
2024-02-14 20:42:33,162 - ControlNet - STATUS - ControlNet UI callback registered.
Civitai Shortcut: v1.6.7
Civitai Shortcut: shortcut update start
model_type EPS
UNet ADM Dimension 2816
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.9s (prepare environment: 2.3s, import torch: 4.1s, other imports: 0.4s, list SD models: 0.3s, load scripts: 3.0s, create ui: 2.6s, gradio launch: 0.2s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale'}
left over keys: dict_keys(['conditioner.embedders.0.logit_scale', 'conditioner.embedders.0.text_projection'])
Loading VAE weights specified in settings: N:\_SD-forge\webui\models\VAE\sdxl_vae\sdxl_vae.safetensors
To load target model SDXLClipModel
Begin to load 1 model
Moving model(s) has taken 0.41 seconds
Model loaded in 6.8s (load weights from disk: 0.8s, forge instantiate config: 1.2s, forge load real models: 3.6s, load VAE: 0.3s, calculate empty prompt: 0.7s).
activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E66350>, <modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E66410>, <modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E65F30>]: AttributeError
Traceback (most recent call last):
  File "N:\_SD-forge\webui\modules\extra_networks.py", line 135, in activate
    extra_network.activate(p, extra_network_args)
  File "N:\_SD-forge\webui\extensions-builtin\Lora\extra_networks_lora.py", line 43, in activate
    networks.load_networks(names, te_multipliers, unet_multipliers, dyn_dims)
  File "N:\_SD-forge\webui\extensions-builtin\Lora\networks.py", line 51, in load_networks
    compiled_lora_targets.append([a.filename, b, c])
AttributeError: 'NoneType' object has no attribute 'filename'

To load target model SDXL
Begin to load 1 model
Moving model(s) has taken 1.86 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:07<00:00,  2.60it/s]
To load target model AutoencoderKL█████████████████████████████████████████████████████| 20/20 [00:06<00:00,  2.79it/s]
Begin to load 1 model
Moving model(s) has taken 1.25 seconds
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:08<00:00,  2.25it/s]
activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E83F40>, <modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E83820>, <modules.extra_networks.ExtraNetworkParams object at 0x0000014C98E82AA0>]: AttributeError
Traceback (most recent call last):
  File "N:\_SD-forge\webui\modules\extra_networks.py", line 135, in activate
    extra_network.activate(p, extra_network_args)
  File "N:\_SD-forge\webui\extensions-builtin\Lora\extra_networks_lora.py", line 43, in activate
    networks.load_networks(names, te_multipliers, unet_multipliers, dyn_dims)
  File "N:\_SD-forge\webui\extensions-builtin\Lora\networks.py", line 51, in load_networks
    compiled_lora_targets.append([a.filename, b, c])
AttributeError: 'NoneType' object has no attribute 'filename'

To load target model SDXL
Begin to load 1 model

Additional information

No response

strawberrymelonpanda commented 9 months ago

As a workaround, how about just changing the directory in the config? Under: Paths for Saving.

I'm not sure, but it sounds like you're hitting a security feature I remember seeing designed to make sure people can't remote access folders outside the WebUI root. I think there's a command-line flag to disable it, but maybe try a different type of link. If you're using a symlink, perhaps try a Junction? (or vice versa)

aib0lit commented 9 months ago

It was easiest way for me until Feb. 13-th.. It worked before that date and still work in A1111.

ronbere commented 8 months ago

It was easiest way for me until Feb. 13-th.. It worked before that date and still work in A1111.

have the same error, working fine on A1111