{{ message }}
Repository navigation
fix(bria_fibo): fix guidance_embeds, prompt_embeds, tensor-image and multi-image crashes - #13981
Merged
Merged
Conversation
…multi-image crashes
3 of 6 tasks
Contributor
yiyixuxu
reviewed
Jun 23, 2026
yiyixuxu
left a comment
Collaborator
There was a problem hiding this comment.
thanks, i left some comments
| @@ -260,6 +260,11 @@ def encode_prompt( | |||
| ) | |||
| prompt_embeds = prompt_embeds.to(dtype=self.transformer.dtype) | |||
| prompt_layers = [tensor.to(dtype=self.transformer.dtype) for tensor in prompt_layers] | |||
| else: | |||
Collaborator
There was a problem hiding this comment.
let's just remove this argument?
Contributor
Author
There was a problem hiding this comment.
Done! removed both prompt_embeds and negative_prompt_embeds (the latter was recomputed from negative_prompt and ignored anyway).
| @@ -773,10 +778,11 @@ def __call__( | |||
| for scaled_latent in latents_scaled: | |||
| curr_image = self.vae.decode(scaled_latent.unsqueeze(0), return_dict=False)[0] | |||
| curr_image = self.image_processor.postprocess(curr_image.squeeze(dim=2), output_type=output_type) | |||
| image.append(curr_image) | |||
Collaborator
There was a problem hiding this comment.
Is there any reason that they have to decode and post-process latent one each time?
Contributor
Author
There was a problem hiding this comment.
No, they're already a single batched tensor, so switched to one decode + postprocess
DN6
pushed a commit
that referenced
this pull request
Jul 1, 2026
…multi-image crashes (#13981) * fix(bria_fibo): fix guidance_embeds, prompt_embeds, tensor-image and multi-image crashes * remove unusable precomputed-embeds args and batch-decode output
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Part of #13618 (
bria_fiboreview). Fixes four runtime crashes:guidance_embeds=Truecouldn't construct the transformer: the guidance embedder was built without the requiredtime_theta, and the forward tested a tensor withif guidance:.prompt_embeds/negative_prompt_embedswere public inputs that can't work standalone: the transformer also needs the per-layer embeddings, which only come from encodingprompt. Removed both args from both pipelines.BriaFiboEditPipelinecrashed on tensorimageinputs, which referenced an undefinedself.latent_channels.num_images_per_prompt > 1returned a malformed output shape (extra batch axis for numpy, nested lists for PIL). The decode now runs once over the full latent batch and post-processes once, which gives the right shape.Verified each against the repros in the issue.
Before submitting
Who can review?
@yiyixuxu @sayakpaul