@@ -84,9 +84,9 @@ def description(self):
8484
8585# before_denoise: all task (text2img, img2img)
8686class FluxAutoBeforeDenoiseStep (AutoPipelineBlocks ):
87- block_classes = [FluxBeforeDenoiseStep , FluxImg2ImgBeforeDenoiseStep ]
88- block_names = ["text2image " , "img2img " ]
89- block_trigger_inputs = [None , "image_latents" ]
87+ block_classes = [FluxImg2ImgBeforeDenoiseStep , FluxBeforeDenoiseStep ]
88+ block_names = ["img2img " , "text2image " ]
89+ block_trigger_inputs = ["image_latents" , None ]
9090
9191 @property
9292 def description (self ):
@@ -124,16 +124,32 @@ def description(self):
124124 return "Decode step that decode the denoised latents into image outputs.\n - `FluxDecodeStep`"
125125
126126
127+ class FluxCoreDenoiseStep (SequentialPipelineBlocks ):
128+ block_classes = [FluxInputStep , FluxAutoBeforeDenoiseStep , FluxAutoDenoiseStep ]
129+ block_names = ["input" , "before_denoise" , "denoise" ]
130+
131+ @property
132+ def description (self ):
133+ return (
134+ "Core step that performs the denoising process. \n "
135+ + " - `FluxInputStep` (input) standardizes the inputs for the denoising step.\n "
136+ + " - `FluxAutoBeforeDenoiseStep` (before_denoise) prepares the inputs for the denoising step.\n "
137+ + " - `FluxAutoDenoiseStep` (denoise) iteratively denoises the latents.\n "
138+ + "This step support text-to-image and image-to-image tasks for Flux:\n "
139+ + " - for image-to-image generation, you need to provide `image_latents`\n "
140+ + " - for text-to-image generation, all you need to provide is prompt embeddings"
141+ )
142+
143+
127144# text2image
128145class FluxAutoBlocks (SequentialPipelineBlocks ):
129146 block_classes = [
130147 FluxTextEncoderStep ,
131148 FluxAutoVaeEncoderStep ,
132- FluxAutoBeforeDenoiseStep ,
133- FluxAutoDenoiseStep ,
149+ FluxCoreDenoiseStep ,
134150 FluxAutoDecodeStep ,
135151 ]
136- block_names = ["text_encoder" , "image_encoder" , "before_denoise" , " denoise" , "decoder " ]
152+ block_names = ["text_encoder" , "image_encoder" , "denoise" , "decode " ]
137153
138154 @property
139155 def description (self ):
@@ -171,8 +187,7 @@ def description(self):
171187 [
172188 ("text_encoder" , FluxTextEncoderStep ),
173189 ("image_encoder" , FluxAutoVaeEncoderStep ),
174- ("before_denoise" , FluxAutoBeforeDenoiseStep ),
175- ("denoise" , FluxAutoDenoiseStep ),
190+ ("denoise" , FluxCoreDenoiseStep ),
176191 ("decode" , FluxAutoDecodeStep ),
177192 ]
178193)
0 commit comments