Skip to content

Commit

Permalink
fix device:
Browse files Browse the repository at this point in the history
  • Loading branch information
continue-revolution committed Mar 4, 2024
1 parent d72347e commit 420013e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldm_patched/modules/model_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def timestep(self, sigma):
w = (low - log_sigma) / (low - high)
w = w.clamp(0, 1)
t = (1 - w) * low_idx + w * high_idx
return t.view(sigma.shape)
return t.view(sigma.shape).to(sigma.device)

def sigma(self, timestep):
t = torch.clamp(timestep.float().to(self.log_sigmas.device), min=0, max=(len(self.sigmas) - 1))
Expand Down

0 comments on commit 420013e

Please sign in to comment.