Uh oh!
There was an error while loading. Please reload this page.
[Modular] update the auto pipeline blocks doc - #13148
Conversation
Uh oh!
There was an error while loading. Please reload this page.
HuggingFaceDocBuilderDev
commented
Feb 15, 2026
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. |
| ``` | ||
| It is **very** important to include a `description` to avoid any confusion over how to run a block and what inputs are required. While [`~modular_pipelines.AutoPipelineBlocks`] are convenient, it's conditional logic may be difficult to figure out if it isn't properly explained. | ||
| It is **very** important to include a `description` to avoid any confusion over how to run a block and what inputs are required. While [`~modular_pipelines.AutoPipelineBlocks`] are convenient, its conditional logic may be difficult to figure out if it isn't properly explained. |
There was a problem hiding this comment.
Should we consider providing some kinda of templating in this case? DOesn't have to be in this PR, though.
| ```py | ||
| auto_blocks.get_execution_blocks("mask") | ||
| auto_blocks.get_execution_blocks(mask=True) |
There was a problem hiding this comment.
Out of curiosity. What was the reasoning behind shifting towards a flag based configuration as opposed to strings (mask=True as opposed to just "mask")?
There was a problem hiding this comment.
It supports conditions based on value, e.g. get_execution_blocks(type="a") — AutoPipeline was quite limited for more than 2 workflows beause it only supported a single trigger keyword. I wanted a class that can support more flexible conditional paths where we're able to traverse into each one. It was also the easiest to implement this way: https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L704
We could probably extend AutoPipeline to support trigger keyward sets though, it's the most common use cases we have
sayakpaul
left a comment
There was a problem hiding this comment.
Super neat features. I would like to write a test suite around conditional blocks and the workflow selection. Is it okay if I opened a PR?
yiyixuxu
commented
Feb 16, 2026
@sayakpaul sounds good
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
* update * Apply suggestion from @yiyixuxu * Update docs/source/en/modular_diffusers/auto_pipeline_blocks.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/en/modular_diffusers/auto_pipeline_blocks.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/en/modular_diffusers/auto_pipeline_blocks.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Update docs/source/en/modular_diffusers/auto_pipeline_blocks.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * add to api --------- Co-authored-by: yiyi@huggingface.co <yiyi@ip-26-0-160-103.ec2.internal> Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: yiyi@huggingface.co <yiyi@ip-26-0-161-123.ec2.internal>
No description provided.