Skip to content

Commit

Permalink
Fix lowvram issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 12, 2024
1 parent 0eaa34e commit 605e64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy/ldm/modules/diffusionmodules/mmdit.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def forward(
context = self.context_processor(context)

hw = x.shape[-2:]
x = self.x_embedder(x) + self.cropped_pos_embed(hw, device=x.device).to(dtype=x.dtype)
x = self.x_embedder(x) + self.cropped_pos_embed(hw, device=x.device).to(dtype=x.dtype, device=x.device)
c = self.t_embedder(t, dtype=x.dtype) # (N, D)
if y is not None and self.y_embedder is not None:
y = self.y_embedder(y) # (N, D)
Expand Down

0 comments on commit 605e64f

Please sign in to comment.