mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 05:22:34 +08:00
Update model.py
This commit is contained in:
parent
4f242de56f
commit
24d1b6b88a
@ -350,6 +350,11 @@ class HunyuanVideo(nn.Module):
|
|||||||
|
|
||||||
txt = self.txt_in(txt, timesteps, txt_mask, transformer_options=transformer_options)
|
txt = self.txt_in(txt, timesteps, txt_mask, transformer_options=transformer_options)
|
||||||
|
|
||||||
|
if self.cond_type_embedding is not None:
|
||||||
|
self.cond_type_embedding.to(txt.device)
|
||||||
|
cond_emb = self.cond_type_embedding(torch.zeros_like(txt[:, :, 0], device=txt.device, dtype=torch.long))
|
||||||
|
txt = txt + cond_emb.to(txt.dtype)
|
||||||
|
|
||||||
if self.byt5_in is not None and txt_byt5 is not None:
|
if self.byt5_in is not None and txt_byt5 is not None:
|
||||||
txt_byt5 = self.byt5_in(txt_byt5)
|
txt_byt5 = self.byt5_in(txt_byt5)
|
||||||
if self.cond_type_embedding is not None:
|
if self.cond_type_embedding is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user