Repository navigation
refactor(lora): one plain PEFT adapter directory per component - #274
Merged
Rockdu merged 2 commits intoOct 4, 2026
Merged
Conversation
…nstead of component subfolders
This was referenced Sep 29, 2026
Merged
Rockdu
added this pull request to stack #270
September 29, 2026 20:58
…n the reference worker
zhihengy
approved these changes
Oct 4, 2026
6 tasks
OnePunchMonk
pushed a commit
to OnePunchMonk/miles_diffusion
that referenced
this pull request
Oct 5, 2026
…ark#274) * refactor(lora): take one plain PEFT adapter directory per component instead of component subfolders * test(fsdp): keep the caller's PYTHONPATH behind the repository root in the reference worker
OnePunchMonk
pushed a commit
to OnePunchMonk/miles_diffusion
that referenced
this pull request
Oct 5, 2026
OnePunchMonk
pushed a commit
to OnePunchMonk/miles_diffusion
that referenced
this pull request
Oct 5, 2026
…ark#274) * refactor(lora): take one plain PEFT adapter directory per component instead of component subfolders * test(fsdp): keep the caller's PYTHONPATH behind the repository root in the reference worker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 9/9 of follow-ups to #263:
main← #265 ← #266 ← #267 ← #268 ← #269 ← #271 ← #272 ← #273 ← this.What
--lora-adapter-path,--ref-lora-adapter-pathand--teacher-lora-adapter-pathtake one plain PEFT adapter directory (whatsave_pretrainedwrites) per--update-weight-target-moduleentry, in order, e.g.--lora-adapter-path /adapters/high_noise /adapters/low_noisefor Wan2.2. Any other count is rejected inarguments.py.lora_adapter_subfolderhelper are gone.test(fsdp): keep the caller's PYTHONPATH ...: the GPU reference-model test now puts the repository root in front of the caller'sPYTHONPATHinstead of replacing it (a follow-up to perf(fsdp): skip deterministic NaN fill in moves; fix reference worker PYTHONPATH #269, kept here so the PRs below keep their CI results).Why
#263 read a multi-component adapter as one directory with a PEFT checkpoint under each component subfolder. No other tool writes or reads that layout: PEFT names its subfolders after adapters, and diffusers / the Wan2.2 community ship one file per expert. A list of standard PEFT directories keeps the loader on PEFT's own format.
Files
miles/utils/arguments.py: the three flags becomenargs="+"lists (args.*_lora_adapter_paths); the count checks run once the component list is parsed.miles/backends/fsdp_utils/model_loader.py,actor.py: each component loads its own adapter directory.test_reference_arguments.py(count check),test_reference_models.pyand the GPU reference worker (per-component directories);tests/fast-gpu/backends/fsdp_utils/test_reference_models.py(PYTHONPATH).fsdp_model_roles.md,cli-reference.md.Checklist
pre-commit runpasses on the changed filespytest -xis green —test_reference_arguments.py,test_reference_models.pylocally; the GPU worker runs in CIpython3 train.py --helpstill parses — argparsenargs="+"checked standalone; the full parser runs in CI