Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7b499de
up
yiyixuxu Jan 10, 2026
b29873d
up up
yiyixuxu Jan 10, 2026
fbfe5c8
Merge branch 'main' into modular-doc-improv
yiyixuxu Jan 10, 2026
43ab148
update outputs
yiyixuxu Jan 10, 2026
34a743e
style
yiyixuxu Jan 10, 2026
ff09bf1
add modular_auto_docstring!
yiyixuxu Jan 10, 2026
d20f413
more auto docstring
yiyixuxu Jan 10, 2026
2a81f2e
style
yiyixuxu Jan 10, 2026
f0555af
up up up
yiyixuxu Jan 10, 2026
507953f
more more
yiyixuxu Jan 10, 2026
1c90ce3
up
yiyixuxu Jan 10, 2026
aea0d04
address feedbacks
yiyixuxu Jan 17, 2026
25c968a
add TODO in the description for empty docstring
yiyixuxu Jan 17, 2026
de03d7f
refactor based on dhruv's feedback: remove the class method
yiyixuxu Jan 17, 2026
002c3e8
add template method
yiyixuxu Jan 19, 2026
1f2dbc9
up
yiyixuxu Jan 19, 2026
fb15752
up up up
yiyixuxu Jan 19, 2026
8d45ff5
apply auto docstring
yiyixuxu Jan 19, 2026
f056af1
make style
yiyixuxu Jan 19, 2026
9452520
rmove space in make docstring
yiyixuxu Jan 19, 2026
7e9d2b9
Apply suggestions from code review
yiyixuxu Jan 19, 2026
b7127ce
revert change in z
yiyixuxu Jan 19, 2026
d75fbc4
Merge branch 'modular-doc-improv' of github.com:huggingface/diffusers…
yiyixuxu Jan 19, 2026
1f9576a
fix
yiyixuxu Jan 19, 2026
aba551c
Merge branch 'main' into modular-doc-improv
yiyixuxu Jan 19, 2026
23d0642
Apply style fixes
github-actions[bot] Jan 19, 2026
412e51c
include auto-docstring check in the modular ci. (#13004)
sayakpaul Jan 24, 2026
6a549f5
initial support: workflow
yiyixuxu Jan 25, 2026
20c35da
up up
yiyixuxu Jan 25, 2026
b73cc50
Merge branch 'main' into modular-workflow
yiyixuxu Jan 31, 2026
32677c7
Merge branch 'main' into modular-workflow
yiyixuxu Feb 11, 2026
3c3b56c
treeat loop sequential pipeline blocks as leaf
Feb 12, 2026
ba41614
update qwen image docstring note
Feb 12, 2026
1f8dc96
add workflow support for sdxl
Feb 12, 2026
b0b8fcf
add a test suit
Feb 12, 2026
fab1013
add test for qwen-image
Feb 12, 2026
931d62c
refactor flux a bit, seperate modular_blocks into modular_blocks_flux…
Feb 12, 2026
1017e8a
refactor flux2: seperate blocks for klein_base + workflow
Feb 13, 2026
53fbb40
qwen: remove import support for stuff other than the default blocks
Feb 13, 2026
26a34c3
add workflow support for wan
Feb 13, 2026
0d44493
sdxl: remove some imports:
Feb 13, 2026
14466c8
refactor z
Feb 13, 2026
63deec8
update flux2 auto core denoise
Feb 14, 2026
5c7adeb
add workflow test for z and flux2
Feb 14, 2026
1059825
Merge branch 'main' into modular-workflow
yiyixuxu Feb 14, 2026
fb83b63
Apply suggestions from code review
yiyixuxu Feb 14, 2026
c396a66
Apply suggestions from code review
yiyixuxu Feb 14, 2026
65a33e9
add test for flux
Feb 14, 2026
3ec2dea
Merge branch 'main' into modular-workflow
yiyixuxu Feb 14, 2026
791e2a3
add workflow test for flux
Feb 14, 2026
97111e0
add test for flux-klein
Feb 14, 2026
2fd2632
sdxl: modular_blocks.py -> modular_blocks_stable_diffusion_xl.py
Feb 14, 2026
c0b5820
style
Feb 14, 2026
c68127a
up
Feb 14, 2026
fc5951b
add auto docstring
Feb 14, 2026
48fa52d
workflow_names -> available_workflows
Feb 14, 2026
ecb00b9
fix workflow test for klein base
Feb 14, 2026
3e9ec6f
Apply suggestions from code review
yiyixuxu Feb 14, 2026
f41441a
fix workflow tests
Feb 14, 2026
a6670ce
qwen: edit -> image_conditioned to be consistent with flux kontext/2 …
Feb 14, 2026
3ee203f
Merge branch 'main' into modular-workflow
yiyixuxu Feb 14, 2026
2007559
remove Optional
Feb 14, 2026
45c250e
update type hints
Feb 14, 2026
e3e99bb
update guider update_components
Feb 14, 2026
224904b
fix more
Feb 14, 2026
a66c159
update docstring auto again
Feb 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions docs/source/en/modular_diffusers/guiders.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,15 @@ t2i_pipeline.guider

## Changing guider parameters

The guider parameters can be adjusted with either the [`~ComponentSpec.create`] method or with [`~ModularPipeline.update_components`]. The example below changes the `guidance_scale` value.
The guider parameters can be adjusted with the [`~ComponentSpec.create`] method and [`~ModularPipeline.update_components`]. The example below changes the `guidance_scale` value.

<hfoptions id="switch">
<hfoption id="create">

```py
guider_spec = t2i_pipeline.get_component_spec("guider")
guider = guider_spec.create(guidance_scale=10)
t2i_pipeline.update_components(guider=guider)
```

</hfoption>
<hfoption id="update_components">

```py
guider_spec = t2i_pipeline.get_component_spec("guider")
guider_spec.config["guidance_scale"] = 10
t2i_pipeline.update_components(guider=guider_spec)
```

</hfoption>
</hfoptions>

## Uploading custom guiders

Call the [`~utils.PushToHubMixin.push_to_hub`] method on a custom guider to share it to the Hub.
Expand Down
17 changes: 1 addition & 16 deletions docs/source/zh/modular_diffusers/guiders.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,14 @@ t2i_pipeline.guider

## 更改引导器参数

引导器参数可以通过 [`~ComponentSpec.create`] 方法或 [`~ModularPipeline.update_components`] 方法进行调整。下面的示例更改了 `guidance_scale` 值。

<hfoptions id="switch">
<hfoption id="create">
引导器参数可以通过 [`~ComponentSpec.create`] 方法以及 [`~ModularPipeline.update_components`] 方法进行调整。下面的示例更改了 `guidance_scale` 值。

```py
guider_spec = t2i_pipeline.get_component_spec("guider")
guider = guider_spec.create(guidance_scale=10)
t2i_pipeline.update_components(guider=guider)
```

</hfoption>
<hfoption id="update_components">

```py
guider_spec = t2i_pipeline.get_component_spec("guider")
guider_spec.config["guidance_scale"] = 10
t2i_pipeline.update_components(guider=guider_spec)
```

</hfoption>
</hfoptions>

## 上传自定义引导器

在自定义引导器上调用 [`~utils.PushToHubMixin.push_to_hub`] 方法,将其分享到 Hub。
Expand Down
34 changes: 4 additions & 30 deletions src/diffusers/modular_pipelines/flux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,8 @@

_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_objects))
else:
_import_structure["encoders"] = ["FluxTextEncoderStep"]
_import_structure["modular_blocks"] = [
"ALL_BLOCKS",
"AUTO_BLOCKS",
"AUTO_BLOCKS_KONTEXT",
"FLUX_KONTEXT_BLOCKS",
"TEXT2IMAGE_BLOCKS",
"FluxAutoBeforeDenoiseStep",
"FluxAutoBlocks",
"FluxAutoDecodeStep",
"FluxAutoDenoiseStep",
"FluxKontextAutoBlocks",
"FluxKontextAutoDenoiseStep",
"FluxKontextBeforeDenoiseStep",
]
_import_structure["modular_blocks_flux"] = ["FluxAutoBlocks"]
_import_structure["modular_blocks_flux_kontext"] = ["FluxKontextAutoBlocks"]
_import_structure["modular_pipeline"] = ["FluxKontextModularPipeline", "FluxModularPipeline"]

if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
Expand All @@ -45,21 +32,8 @@
except OptionalDependencyNotAvailable:
from ...utils.dummy_torch_and_transformers_objects import * # noqa F403
else:
from .encoders import FluxTextEncoderStep
from .modular_blocks import (
ALL_BLOCKS,
AUTO_BLOCKS,
AUTO_BLOCKS_KONTEXT,
FLUX_KONTEXT_BLOCKS,
TEXT2IMAGE_BLOCKS,
FluxAutoBeforeDenoiseStep,
FluxAutoBlocks,
FluxAutoDecodeStep,
FluxAutoDenoiseStep,
FluxKontextAutoBlocks,
FluxKontextAutoDenoiseStep,
FluxKontextBeforeDenoiseStep,
)
from .modular_blocks_flux import FluxAutoBlocks
from .modular_blocks_flux_kontext import FluxKontextAutoBlocks
from .modular_pipeline import FluxKontextModularPipeline, FluxModularPipeline
else:
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/modular_pipelines/flux/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState):
return components, state


class FluxVaeEncoderDynamicStep(ModularPipelineBlocks):
class FluxVaeEncoderStep(ModularPipelineBlocks):
model_name = "flux"

def __init__(
Expand Down
7 changes: 4 additions & 3 deletions src/diffusers/modular_pipelines/flux/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState) -> Pip


# Adapted from `QwenImageAdditionalInputsStep`
class FluxInputsDynamicStep(ModularPipelineBlocks):
class FluxAdditionalInputsStep(ModularPipelineBlocks):
model_name = "flux"

def __init__(
Expand Down Expand Up @@ -243,7 +243,7 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState) -> Pip
return components, state


class FluxKontextInputsDynamicStep(FluxInputsDynamicStep):
class FluxKontextAdditionalInputsStep(FluxAdditionalInputsStep):
model_name = "flux-kontext"

def __call__(self, components: FluxModularPipeline, state: PipelineState) -> PipelineState:
Expand All @@ -256,7 +256,7 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState) -> Pip
continue

# 1. Calculate height/width from latents
# Unlike the `FluxInputsDynamicStep`, we don't overwrite the `block.height` and `block.width`
# Unlike the `FluxAdditionalInputsStep`, we don't overwrite the `block.height` and `block.width`
height, width = calculate_dimension_from_latents(image_latent_tensor, components.vae_scale_factor)
if not hasattr(block_state, "image_height"):
block_state.image_height = height
Expand Down Expand Up @@ -303,6 +303,7 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState) -> Pip
class FluxKontextSetResolutionStep(ModularPipelineBlocks):
model_name = "flux-kontext"

@property
def description(self):
return (
"Determines the height and width to be used during the subsequent computations.\n"
Expand Down
Loading