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
336 stars 59 forks source link

[Bug]: #301

Open gltchcom opened 5 months ago

gltchcom commented 5 months ago

Describe the bug.

I moved models to another drive, and now scans are failing.

My models are in H:\models\ and Forge is running on the C: drive. I am not using symlinks, but I am using command line arguments:

In webui-user.bat, I have: set COMMANDLINE_ARGS= --always-offload-from-vram --ckpt-dir "H:/models/checkpoints" --embeddings-dir "H:/models/embeddings" --lora-dir "H:/models/loras"

They are all accessible within Forge, so I know the paths are correct.

Steps to reproduce the problem.

  1. Press Update model info & tags

Expected behavior

models scan correctly

System info

Console logs

Traceback (most recent call last):
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\StableDiffusion\stable-diffusion-webui-forge\extensions\sd-civitai-browser-plus\scripts\civitai_file_manage.py", line 1055, in file_scan
    save_path, name = get_save_path_and_name(install_path, file_name, api_response)
  File "C:\StableDiffusion\stable-diffusion-webui-forge\extensions\sd-civitai-browser-plus\scripts\civitai_file_manage.py", line 819, in get_save_path_and_name
    sub_folder = os.path.normpath(os.path.relpath(install_path, gl.main_folder))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 747, in relpath
    raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'H:', start on mount 'C:'

Additional information

No response

gltchcom commented 5 months ago

I'm not sure why, but when I tried it today it worked flawlessly. Closing this for now.

gltchcom commented 2 months ago

I am still having this issue. Sometimes it works, but it usually does not. I'm using the newest version of Forge.

Traceback (most recent call last):
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1508, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\StableDiffusion\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\utils.py", line 818, in wrapper
    response = f(*args, **kwargs)
  File "C:\StableDiffusion\stable-diffusion-webui-forge\extensions\sd-civitai-browser-plus\scripts\civitai_file_manage.py", line 1066, in file_scan
    sub_folder = os.path.normpath(os.path.relpath(install_path, gl.main_folder))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 747, in relpath
    raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'C:', start on mount 'H:'