mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-05-01 03:31:35 +00:00
Merge pull request #343 from davertor/fix_kontext_bs
fix: Guidance incorrect shape
This commit is contained in:
@@ -291,7 +291,8 @@ class FluxKontextModel(BaseModel):
|
|||||||
else:
|
else:
|
||||||
guidance = torch.tensor(
|
guidance = torch.tensor(
|
||||||
[guidance_embedding_scale], device=self.device_torch)
|
[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:
|
else:
|
||||||
guidance = None
|
guidance = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user