Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
f7b79452
Unverified
Commit
f7b79452
authored
Sep 10, 2025
by
Sayak Paul
Committed by
GitHub
Sep 10, 2025
Browse files
[modular] fix flux modular pipelines for t2i and i2i (#12272)
fix flux modular pipelines for t2i and i2i
parent
43459079
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/diffusers/modular_pipelines/flux/before_denoise.py
src/diffusers/modular_pipelines/flux/before_denoise.py
+3
-2
src/diffusers/modular_pipelines/flux/modular_blocks.py
src/diffusers/modular_pipelines/flux/modular_blocks.py
+1
-1
No files found.
src/diffusers/modular_pipelines/flux/before_denoise.py
View file @
f7b79452
...
@@ -454,6 +454,9 @@ class FluxImg2ImgSetTimestepsStep(ModularPipelineBlocks):
...
@@ -454,6 +454,9 @@ class FluxImg2ImgSetTimestepsStep(ModularPipelineBlocks):
block_state
=
self
.
get_block_state
(
state
)
block_state
=
self
.
get_block_state
(
state
)
block_state
.
device
=
components
.
_execution_device
block_state
.
device
=
components
.
_execution_device
block_state
.
height
=
block_state
.
height
or
components
.
default_height
block_state
.
width
=
block_state
.
width
or
components
.
default_width
scheduler
=
components
.
scheduler
scheduler
=
components
.
scheduler
transformer
=
components
.
transformer
transformer
=
components
.
transformer
batch_size
=
block_state
.
batch_size
*
block_state
.
num_images_per_prompt
batch_size
=
block_state
.
batch_size
*
block_state
.
num_images_per_prompt
...
@@ -659,8 +662,6 @@ class FluxImg2ImgPrepareLatentsStep(ModularPipelineBlocks):
...
@@ -659,8 +662,6 @@ class FluxImg2ImgPrepareLatentsStep(ModularPipelineBlocks):
def
__call__
(
self
,
components
:
FluxModularPipeline
,
state
:
PipelineState
)
->
PipelineState
:
def
__call__
(
self
,
components
:
FluxModularPipeline
,
state
:
PipelineState
)
->
PipelineState
:
block_state
=
self
.
get_block_state
(
state
)
block_state
=
self
.
get_block_state
(
state
)
block_state
.
height
=
block_state
.
height
or
components
.
default_height
block_state
.
width
=
block_state
.
width
or
components
.
default_width
block_state
.
device
=
components
.
_execution_device
block_state
.
device
=
components
.
_execution_device
block_state
.
dtype
=
torch
.
bfloat16
# TODO: okay to hardcode this?
block_state
.
dtype
=
torch
.
bfloat16
# TODO: okay to hardcode this?
block_state
.
num_channels_latents
=
components
.
num_channels_latents
block_state
.
num_channels_latents
=
components
.
num_channels_latents
...
...
src/diffusers/modular_pipelines/flux/modular_blocks.py
View file @
f7b79452
...
@@ -148,8 +148,8 @@ TEXT2IMAGE_BLOCKS = InsertableDict(
...
@@ -148,8 +148,8 @@ TEXT2IMAGE_BLOCKS = InsertableDict(
[
[
(
"text_encoder"
,
FluxTextEncoderStep
),
(
"text_encoder"
,
FluxTextEncoderStep
),
(
"input"
,
FluxInputStep
),
(
"input"
,
FluxInputStep
),
(
"set_timesteps"
,
FluxSetTimestepsStep
),
(
"prepare_latents"
,
FluxPrepareLatentsStep
),
(
"prepare_latents"
,
FluxPrepareLatentsStep
),
(
"set_timesteps"
,
FluxSetTimestepsStep
),
(
"denoise"
,
FluxDenoiseStep
),
(
"denoise"
,
FluxDenoiseStep
),
(
"decode"
,
FluxDecodeStep
),
(
"decode"
,
FluxDecodeStep
),
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment