Skip to content

Commit a3672f1

Browse files
committed
fix flux modular pipelines for t2i and i2i
1 parent 4acbfbf commit a3672f1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/diffusers/modular_pipelines/flux/before_denoise.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ def __call__(self, components: FluxModularPipeline, state: PipelineState) -> Pip
454454
block_state = self.get_block_state(state)
455455
block_state.device = components._execution_device
456456

457+
block_state.height = block_state.height or components.default_height
458+
block_state.width = block_state.width or components.default_width
459+
457460
scheduler = components.scheduler
458461
transformer = components.transformer
459462
batch_size = block_state.batch_size * block_state.num_images_per_prompt
@@ -659,8 +662,6 @@ def intermediate_outputs(self) -> List[OutputParam]:
659662
def __call__(self, components: FluxModularPipeline, state: PipelineState) -> PipelineState:
660663
block_state = self.get_block_state(state)
661664

662-
block_state.height = block_state.height or components.default_height
663-
block_state.width = block_state.width or components.default_width
664665
block_state.device = components._execution_device
665666
block_state.dtype = torch.bfloat16 # TODO: okay to hardcode this?
666667
block_state.num_channels_latents = components.num_channels_latents

src/diffusers/modular_pipelines/flux/modular_blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def description(self):
148148
[
149149
("text_encoder", FluxTextEncoderStep),
150150
("input", FluxInputStep),
151-
("set_timesteps", FluxSetTimestepsStep),
152151
("prepare_latents", FluxPrepareLatentsStep),
152+
("set_timesteps", FluxSetTimestepsStep),
153153
("denoise", FluxDenoiseStep),
154154
("decode", FluxDecodeStep),
155155
]

0 commit comments

Comments
 (0)