Skip to content

Commit df6516a

Browse files
samutammyiyixuxu
andauthored
Align HunyuanVideoConditionEmbedding with CombinedTimestepGuidanceTextProjEmbeddings (#12316)
conditioning additions inline with CombinedTimestepGuidanceTextProjEmbeddings Co-authored-by: Samu Tamminen <samutamm@users.noreply.github.com> Co-authored-by: YiYi Xu <yixu310@gmail.com>
1 parent 5794fff commit df6516a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/diffusers/models/transformers/transformer_hunyuan_video.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ def forward(
312312
timesteps_proj = self.time_proj(timestep)
313313
timesteps_emb = self.timestep_embedder(timesteps_proj.to(dtype=pooled_projection.dtype)) # (N, D)
314314
pooled_projections = self.text_embedder(pooled_projection)
315-
conditioning = timesteps_emb + pooled_projections
316315

317316
token_replace_emb = None
318317
if self.image_condition_type == "token_replace":
@@ -324,8 +323,9 @@ def forward(
324323
if self.guidance_embedder is not None:
325324
guidance_proj = self.time_proj(guidance)
326325
guidance_emb = self.guidance_embedder(guidance_proj.to(dtype=pooled_projection.dtype))
327-
conditioning = conditioning + guidance_emb
328-
326+
conditioning = timesteps_emb + guidance_emb + pooled_projections
327+
else:
328+
conditioning = timesteps_emb + pooled_projections
329329
return conditioning, token_replace_emb
330330

331331

0 commit comments

Comments
 (0)