File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/diffusers/models/transformers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,6 @@ def forward(
293293 timesteps_proj = self .time_proj (timestep )
294294 timesteps_emb = self .timestep_embedder (timesteps_proj .to (dtype = pooled_projection .dtype )) # (N, D)
295295 pooled_projections = self .text_embedder (pooled_projection )
296- conditioning = timesteps_emb + pooled_projections
297296
298297 token_replace_emb = None
299298 if self .image_condition_type == "token_replace" :
@@ -305,8 +304,9 @@ def forward(
305304 if self .guidance_embedder is not None :
306305 guidance_proj = self .time_proj (guidance )
307306 guidance_emb = self .guidance_embedder (guidance_proj .to (dtype = pooled_projection .dtype ))
308- conditioning = conditioning + guidance_emb
309-
307+ conditioning = timesteps_emb + guidance_emb + pooled_projections
308+ else :
309+ conditioning = timesteps_emb + pooled_projections
310310 return conditioning , token_replace_emb
311311
312312
You can’t perform that action at this time.
0 commit comments