[Modular] update the auto pipeline blocks doc#13148
Conversation
|
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?
|
@sayakpaul sounds good
|
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>
No description provided.