try fix cpu tree

This commit is contained in:
lllyasviel 2023-12-12 14:14:30 -08:00
parent 47441736ae
commit 9c3fb90df3

View File

@ -181,6 +181,9 @@ class BrownianTreeNoiseSamplerPatched:
@staticmethod
def global_init(x, sigma_min, sigma_max, seed=None, transform=lambda x: x, cpu=False):
if ldm_patched.modules.model_management.directml_enabled:
cpu = True
t0, t1 = transform(torch.as_tensor(sigma_min)), transform(torch.as_tensor(sigma_max))
BrownianTreeNoiseSamplerPatched.transform = transform