split samplers into one more files for k-diffusion

This commit is contained in:
AUTOMATIC
2023-01-30 10:11:30 +03:00
parent 274474105a
commit 4df63d2d19
4 changed files with 22 additions and 348 deletions

View File

@@ -1,4 +1,4 @@
from collections import namedtuple, deque
from collections import namedtuple
import numpy as np
import torch
from PIL import Image
@@ -64,6 +64,7 @@ class InterruptedException(BaseException):
# MPS fix for randn in torchsde
# XXX move this to separate file for MPS
def torchsde_randn(size, dtype, device, seed):
if device.type == 'mps':
generator = torch.Generator(devices.cpu).manual_seed(int(seed))