Skip to content

Commit

Permalink
[Torch compile] Fix torch compile for controlnet (#4795)
Browse files Browse the repository at this point in the history
Fix torch compile for controlnete
  • Loading branch information
patrickvonplaten authored and sayakpaul committed Aug 28, 2023
1 parent e3380c0 commit 5725b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diffusers/models/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def forward(
class_emb = self.class_embedding(class_labels).to(dtype=self.dtype)
emb = emb + class_emb

if "addition_embed_type" in self.config:
if self.config.addition_embed_type is not None:
if self.config.addition_embed_type == "text":
aug_emb = self.add_embedding(encoder_hidden_states)

Expand Down

0 comments on commit 5725b50

Please sign in to comment.