Repository navigation
fix(bria_fibo): fix guidance_embeds, prompt_embeds, tensor-image and multi-image crashes - #13981
Conversation
…multi-image crashes
|
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. |
yiyixuxu
left a comment
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: | |||
There was a problem hiding this comment.
let's just remove this argument?
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) | |||
There was a problem hiding this comment.
Is there any reason that they have to decode and post-process latent one each time?
There was a problem hiding this comment.
No, they're already a single batched tensor, so switched to one decode + postprocess
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…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
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