mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-06-26 09:49:22 +08:00
Fix aria2 path handling for local (non-Docker) installations
The previous logic stripped the ComfyUI base path prefix and sent a root-relative path (e.g. /custom_nodes) to aria2 via RPC, causing a permission error when aria2 tried to create that directory at the filesystem root. Use the full absolute path when model_dir is absolute; fall back to /models/<dir> only for relative paths (Docker-style setups). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3772432847
commit
857b4534f1
@ -80,10 +80,10 @@ def aria2_download_url(model_url: str, model_dir: str, filename: str):
|
||||
import tqdm
|
||||
import time
|
||||
|
||||
if model_dir.startswith(core.comfy_path):
|
||||
model_dir = model_dir[len(core.comfy_path) :]
|
||||
|
||||
download_dir = model_dir if model_dir.startswith('/') else os.path.join('/models', model_dir)
|
||||
if os.path.isabs(model_dir):
|
||||
download_dir = model_dir
|
||||
else:
|
||||
download_dir = os.path.join('/models', model_dir)
|
||||
|
||||
download = aria2_find_task(download_dir, filename)
|
||||
if download is None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user