Move LTX2Guidance Guider to guiders/ Folder - #14558
Conversation
…LTX-2 guiders to be correctly loaded from checkpoint
…ponents Covers the round trip this move fixes: a checkpoint that declares `guider` and `audio_guider` in `modular_model_index.json` must record a resolvable (library, class_name) pair and reload its non-default guidance scales. The existing `test_modular_index_consistency` skips components without a `pretrained_model_name_or_path`, so `from_config` guiders were uncovered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Self-Review ReportSelf-reviewRan the repo's self-review rubric ( Verdict: READY — no blocking issues, no dead code to remove. Non-blocking issues1. One assertion tests
2. Placement: LTX-2-specific vs. generalized. The failure mode — a 3. The design note sits in a public module where autodoc won't render it. The module-level comment carries the substantive explanation of how the guider is driven, but the autodoc directive renders the class docstring ( 4. Suggestions5. Record the rule in 6. Dead code (advisory)
No new code paths — the source diff is a relocation plus export wiring. Notes for the reviewer
Verification
|
What does this PR do?
This PR moves the LTX-2.X guider
LTX2Guidancefromsrc/diffusers/modular_pipelines/ltx2/guider.pytosrc/diffusers/guiders/ltx2_guidance.py. The main motivation is to make LTX-2.X modular repos which explicitly specify guiders loadable without an error (a hypothetical use case for this is shipping new guidance parameters with a finetuned LTX-2.X checkpoint).Because
LTX2Guidancecurrently lives in/modular_pipelines/ltx2, itstype_hintwill be resolved as("ltx2", "LTX2Guidance")because/pipelines/ltx2also exists. When we then load a guider configured with this type hint, the loading code then expects it to live atdiffusers.pipelines.ltx2.LTX2Guidance, which causes an error to be raised when creating the modular pipeline.This PR fixes this by moving
LTX2Guidanceto theguiders/folder and making it importable fromdiffusers(like other guiders) so that its resultingtype_hintresolves correctly.Before submitting
self-reviewskill on the diff?documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@yiyixuxu
@sayakpaul