fix modular pipeline class resolution for families outside the auto-pipeline mappings - #14736
fix modular pipeline class resolution for families outside the auto-pipeline mappings#14736akshan-main wants to merge 4 commits into
Conversation
…ne mappings and fail clearly without blocks
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an issue (or gets the |
|
hi @akshan-main however, agree that we should have better warn/error message for this case |
|
done, added LTXPipeline and LTXImageToVideoPipeline to the text2video/image2video auto mappings and dropped the folder lookup. kept the error. |
| blocks = blocks_class() | ||
|
|
||
| if workflow is not None: | ||
| if blocks is None: |
There was a problem hiding this comment.
i think we can remove this code now
| with pytest.raises(ValueError, match="No pipeline blocks could be resolved"): | ||
| ModularPipeline() | ||
|
|
||
| def test_from_pretrained_resolves_family_outside_auto_pipeline_mappings(self, tmp_path): |
There was a problem hiding this comment.
renamed to test_from_pretrained_resolves_video_pipeline_from_model_index
What does this PR do?
ModularPipeline.from_pretrainedon a standard repo finds the modular class through the auto-pipeline mappings. LTX isn't in them, so it fell back to the baseModularPipeline, which has no default blocks, and__init__crashed on an unbound variable:Bare
ModularPipeline()crashed the same way. This addsLTXPipelineandLTXImageToVideoPipelineto the text2video and image2video auto mappings, so LTX-Video loads asLTXModularPipelinewithLTXAutoBlocks, and raises a clearValueErrorwhen no blocks class can be resolved (the old warning branch was unreachable, and the next line dereferencesself._blocksanyway).Found while verifying #14730 on real checkpoints.
Before submitting
Who can review?
@yiyixuxu