Merge pull request #343 from davertor/fix_kontext_bs

fix: Guidance incorrect shape
This commit is contained in:
Jaret Burkett 2025-07-20 12:00:55 -06:00 committed by GitHub
commit b1bff66d52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -291,7 +291,8 @@ class FluxKontextModel(BaseModel):
else:
guidance = torch.tensor(
[guidance_embedding_scale], device=self.device_torch)
guidance = guidance.expand(latent_model_input.shape[0])
# Expand guidance to match original batch_size
guidance = guidance.expand(bs)
else:
guidance = None