Uh oh!
There was an error while loading. Please reload this page.
[Modular] add explicit workflow support - #13028
Merged
Merged
Conversation
… into modular-doc-improv
HuggingFaceDocBuilderDev
commented
Jan 25, 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. |
yiyixuxu
commented
Feb 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
yiyixuxu
commented
Feb 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
yiyixuxu
commented
Feb 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
yiyixuxu
commented
Feb 15, 2026
| Inputs: | ||
| image (`None`, *optional*): | ||
| TODO: Add description. |
CollaboratorAuthor
There was a problem hiding this comment.
TODO: update InputParams/OutputParams to remove the TODO from doc strings
yiyixuxu
commented
Feb 15, 2026
| @@ -341,6 +349,34 @@ def test_save_from_pretrained(self): | |||
CollaboratorAuthor
There was a problem hiding this comment.
TODO: add a test the output from workflow blocks against the auto blocks
yiyixuxu
commented
Feb 15, 2026
| block_classes = AUTO_BLOCKS.values() | ||
| block_names = AUTO_BLOCKS.keys() | ||
| _workflow_map = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for explicitly defining and retrieving workflows (currently only added to SequentialPipelineBlocks).
Previously, to make sure users understand what workflows a pipeline supports, we:
descriptionproperty whenever we can (example https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/qwenimage/modular_blocks_qwenimage.py#L475)get_execution_blocksmethod for user to understand code path will execute based on specific inputs https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/modular_pipeline.py#L1059ALL_BLOCKS(example: flux/modular_blocks.py#L440) with TEXT2IMAGE_BLOCKS, IMAGE_CONDITIONED_BLOCKS, etc.WIth this PR, workflows are now:
_workflow_mapon the auto blocks class, see qwen example_workflow_mapwe defined above, the auto docstring look like this)workflow_namesandget_workflow()for example, to get the "controlnet_text2image" workflow from qwen
I will add a test suit for this too!