fix(bria_fibo): honor timesteps, fix edit num_images batching, add _no_split_modules, fix docstring#13983
Conversation
…o_split_modules, fix docstring
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
| @@ -1044,6 +1038,9 @@ def prepare_image_latents( | |||
| image_latents_cthw = torch.concat(latents_scaled, dim=0) | |||
| image_latents_bchw = image_latents_cthw[:, :, 0, :, :] | |||
|
|
|||
| repeat_by = batch_size // image_latents_bchw.shape[0] | |||
There was a problem hiding this comment.
we talked about standardlize this across pipelines using a function like this https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ideogram4/pipeline_ideogram4.py#L115
maybe we can start addingthat while you're doing these pipeline refactors?
| @@ -898,7 +892,7 @@ def __call__( | |||
| self.scheduler, | |||
| num_inference_steps=num_inference_steps, | |||
| device=device, | |||
| timesteps=None, | |||
| timesteps=timesteps, | |||
There was a problem hiding this comment.
we can just deprecate timesteps instead (it has not been used so far)
There was a problem hiding this comment.
What does this PR do?
Part of #13618 (
bria_fiboreview), follow-up to #13981:BriaFiboEditPipelinecrashed withnum_images_per_prompt > 1: the encoded image latents kept the original image batch and weren't repeated to the prompt batch before packing. Now repeated.timestepsis accepted and documented but has never been used; passing it now raises a deprecation warning instead of silently doing nothing.vae_scale_factor = 16instead of reading the VAE'sscale_factor_spatial; now read from config.BriaFiboTransformer2DModelwas missing_no_split_modules, sodevice_map/offload could split residual transformer blocks. Declared the two block classes the model uses (this also enables 4 previously-skipped sharding tests, which pass).# TODOand called the unimportedModularPipelineBlocks; switched to the importedModularPipelineand removed the TODO.Before submitting
Who can review?
@yiyixuxu @sayakpaul