stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Extension doesn't support symlink?
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Webui raises errors when loading extension files when extensions folder is sylinked. It also won't install extension from webui (can still git clone manually).
Steps to reproduce the problem
- Clone webui
- Delete extensions folder
- Symlink extensions folder from somewhere else
- Clone extensions there
- Run webui
- Open webui. Will raise errors
- Install an extension. Will raise error
What should have happened?
Extensions are loaded and installed normally
Commit where the problem happens
804d9fb83d0c63ca3acd36378707ce47b8f12599
What platforms do you use to access UI ?
Other/Cloud
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
--autolaunch --ckpt {workspace3}/novelai/final_pruned.ckpt --vae-path {workspace3}/novelai/animevae.pt --disable-safe-unpickle --no-half-vae --xformers
Additional information, context and logs
Error when loading webui, extension already cloned
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
self.scope, self.receive, self.send
File "/usr/local/lib/python3.7/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/fastapi/applications.py", line 270, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/applications.py", line 124, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 24, in __call__
await responder(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 43, in __call__
await self.app(scope, receive, self.send_with_gzip)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 75, in __call__
raise exc
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 64, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 680, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 275, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 65, in app
response = await func(request)
File "/usr/local/lib/python3.7/dist-packages/fastapi/routing.py", line 236, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/usr/local/lib/python3.7/dist-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.7/dist-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.7/dist-packages/anyio/to_thread.py", line 32, in run_sync
func, *args, cancellable=cancellable, limiter=limiter
File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 243, in file_deprecated
return file(path)
File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 237, in file
f"File cannot be fetched: {path}, perhaps because "
ValueError: File cannot be fetched: extensions/a1111-sd-webui-tagcomplete/tags/config.json, perhaps because it is not in any of {'/tmp/tmpcceodhof', '/tmp/tmpevg__edu', '/tmp/tmp5xjsibfd', '/tmp/tmpr8d_jpta', '/tmp/tmpw9apjgul', '/tmp/tmprosa1eun', '/tmp/tmpclpyjink', '/tmp/tmp94sd2kor', '/tmp/tmp_qmlaazq', '/tmp/tmpeonwbl84', '/tmp/tmpebaiv2fv', '/tmp/tmpl2ve730a', '/tmp/tmp8f8merer', '/tmp/tmpb7duab2d', '/tmp/tmpz_1zyi2x', '/tmp/tmpbfy7xp6y', '/tmp/tmp1dz0mm29', '/tmp/tmpgxih6hrx', '/tmp/tmpr83v45cz'}
Error when installing extension
Error completing request
Arguments: ('https://github.com/tsngo/stable-diffusion-webui-aesthetic-image-scorer', ['ads', 'localization']) {}
Traceback (most recent call last):
File "/content/nai/stable-diffusion-webui/modules/ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "/content/nai/stable-diffusion-webui/modules/ui_extensions.py", line 144, in install_extension_from_index
ext_table, message = install_extension_from_url(None, url)
File "/content/nai/stable-diffusion-webui/modules/ui_extensions.py", line 135, in install_extension_from_url
os.rename(tmpdir, target_dir)
OSError: [Errno 18] Invalid cross-device link: '/content/nai/stable-diffusion-webui/tmp/stable-diffusion-webui-aesthetic-image-scorer' -> '/content/nai/stable-diffusion-webui/extensions/stable-diffusion-webui-aesthetic-image-scorer'
Environment: Google Colab, python 3.7.15
I'm testing this myself but this should fix it. https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4684
https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4684