Default device for sigma tensor to CPU

* Consistent with implementations in k-diffusion.
* Makes this compatible with https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15823
This commit is contained in:
Logan 2024-05-18 09:09:57 +10:00
parent d6b4444069
commit 1d74482817

View File

@ -33,7 +33,7 @@ def sgm_uniform(n, sigma_min, sigma_max, inner_model, device):
sigs += [0.0]
return torch.FloatTensor(sigs).to(device)
def get_align_your_steps_sigmas(n, sigma_min, sigma_max, device):
def get_align_your_steps_sigmas(n, sigma_min, sigma_max, device='cpu'):
# https://research.nvidia.com/labs/toronto-ai/AlignYourSteps/howto.html
def loglinear_interp(t_steps, num_steps):
"""