Skip to content

v4: An aria2 on the same machine can be the downloader - #3644

Merged
ltdrdata merged 1 commit into
manager-v4from
fix/v4-aria2-same-paths
Dec 2, 2026
Merged

ltdrdata merged 1 commit into
manager-v4from
fix/v4-aria2-same-paths

Conversation

@ltdrdata

@ltdrdata ltdrdata commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Intent and scope

With aria2 as the downloader, the Manager asks aria2 to save a file into /models/... or /custom_nodes. That is where the container of docs/en/use_aria2.md sees the folders of ComfyUI. An aria2 that runs on the same machine as ComfyUI, without a container, cannot write there, and every download through it fails. With COMFYUI_MANAGER_ARIA2_SAME_PATHS=true the Manager now gives aria2 each folder as ComfyUI sees it. Without the variable nothing changes.

This is the counterpart of #2999 on main, with the branches of its code. #2999 picks the form by whether ComfyUI itself runs in Docker, which breaks the documented setup of ComfyUI on the host and aria2 in a container; here, and in the maintainer commit on #2999, the form is picked by the variable.

  • Applies to: every download that goes through aria2: a model, and the archive of a registry nodepack.
  • Accepted:
    • Without the variable aria2 gets the same folders as before, and the container setup installs as before.
    • With the variable an aria2 on the same machine installs a model and a nodepack, from the server and from cm-cli.
    • With the variable and an aria2 that does not see the same paths, the install is reported as failed.
  • Not covered:
    • The variable is read from the environment only. There is no config.ini key, as for the other two aria2 variables.
    • Whether aria2 sees the same paths is not detected. A wrong setting shows as a failed install whose message names both folders.
    • Windows paths.

Changes

  • aria2_download_url picks the folder for aria2 by COMFYUI_MANAGER_ARIA2_SAME_PATHS. With true, aria2 gets model_dir as it is. Otherwise a folder under ComfyUI is given with the ComfyUI folder as /, as before. Module: comfyui_manager/common/manager_downloader.py.
  • The error for a file that is not where ComfyUI reads it no longer says that aria2 must see the ComfyUI folder as /. It points to docs/en/use_aria2.md, which now has both setups.
  • docs/en/use_aria2.md: a section for an aria2 on the same machine.
  • tests/test_aria2_download.py: the folder that aria2 gets, with and without the variable, for a models folder, custom_nodes and a folder outside ComfyUI.
  • CHANGELOG.md: one entry under Unreleased.

Verification

A real aria2 1.37.0 daemon and a real ComfyUI (eada43db0) with the Manager of each commit, glob server, on Linux, with aria2p 0.12.3, COMFYUI_MANAGER_ARIA2_SERVER and COMFYUI_MANAGER_ARIA2_SECRET set. The model goes through the install_model route, the nodepack through the install task and through cm-cli install.

aria2 runs in one of two placements. mapped: it sees the models and custom_nodes folders of this ComfyUI as /models and /custom_nodes, as the container of the doc does (here a bwrap mount namespace, not Docker). plain: it runs on this machine as it is.

Intent Path and step Before · fdc9c1177 After · 310b175b4
The container setup installs as before mapped, no variable: the model taesd_decoder.pth, the nodepack by the install task, cm-cli install all three installed (file of 4,913,399 bytes) the same
Without the variable nothing changes for an aria2 on the same machine plain, no variable: the model taesd_encoder.pth failed: aria2 failed to download '<url>' into '/models/vae_approx': Download aborted. the same
With the variable an aria2 on the same machine installs plain, COMFYUI_MANAGER_ARIA2_SAME_PATHS=true: the model, the nodepack by the install task, cm-cli install Red: the variable is not read (the row above) Green: all three installed. aria2 saved into <ComfyUI>/models/vae_approx and <ComfyUI>/custom_nodes (file of 4,912,826 bytes)
A wrong setting is reported mapped, with the variable: the model taesdxl_decoder.pth not run failed: aria2 saved 'taesdxl_decoder.pth' into its '<ComfyUI>/models/vae_approx', but the file is not at '<ComfyUI>/models/vae_approx/taesdxl_decoder.pth'. See docs/en/use_aria2.md for where aria2 must see the folders of ComfyUI.

310b175b4 is the head before a change to the test file alone: the cases that name the POSIX folder aria2 gets are skipped on Windows. The head b349b2f14 has the same product code.

The models (madebyollin/taesd on GitHub) and the nodepack (ComfyUI_SigmoidOffsetScheduler 1.1.1 of the registry) are real. The check of the verify skill passes on each run with 6 of 6.

Steps and outcomes: before · after · after, with the variable · scripts

Results

  • Head b349b2f14 on manager-v4 fdc9c1177, Linux, Python 3.12.3. tests/test_aria2_download.py: 1 failed, 7 passed on the base (output), 8 passed on the head (output).
  • Unit suite (python -m pytest tests --ignore=tests/e2e --ignore=tests/playwright): 4718 passed, 17 skipped on the head (output), 4715 passed, 17 skipped on the base (output).
  • ruff check . passes.
  • Not run: aria2 in a Docker container, the legacy UI page, Windows, tests/e2e, tests/playwright. The nodepack has no requirements, so pip and uv do not differ here.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fed0769b-fff1-498e-bdd9-0f653e2a12dd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ltdrdata
ltdrdata marked this pull request as ready for review December 2, 2026 10:17
With aria2 as the downloader, the Manager asks aria2 to save a file
into `/models/...` or `/custom_nodes`, which is where the container of
`docs/en/use_aria2.md` sees the folders of ComfyUI. An aria2 that runs
on the same machine without a container cannot write there, and its
downloads failed.

- With `COMFYUI_MANAGER_ARIA2_SAME_PATHS=true` the Manager gives aria2
  each folder as ComfyUI sees it. Without it nothing changes
- The error for a file that is not where ComfyUI reads it points to
  `docs/en/use_aria2.md` without naming one of the two setups
- `docs/en/use_aria2.md` describes an aria2 on the same machine
- Add tests and a CHANGELOG entry

The same change for main is #2999.

Co-authored-by: ViolinKaine <125495038+ViolinKaine@users.noreply.github.com>
@ltdrdata
ltdrdata force-pushed the fix/v4-aria2-same-paths branch from 310b175 to b349b2f Compare December 2, 2026 10:28
@ltdrdata
ltdrdata merged commit 0cf2445 into manager-v4 Dec 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant