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. |
|
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. |
| def test_init_fallback_when_blocks_class_name_is_base_class(self, tmp_path): | ||
| # 1. Load pipeline and get a workflow (returns a base SequentialPipelineBlocks) | ||
| pipe = ModularPipeline.from_pretrained("hf-internal-testing/tiny-stable-diffusion-xl-pipe") |
There was a problem hiding this comment.
actually here it loads from a model_index.json too, can you just add the assert lines here? and drop the other tests?
assert pipe.__class__.__name__ ==
assert pipe.blocks.__class__.__name ==
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