From 9c3fb90df3a38b71664c03d116bea3ac1d8f341a Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Tue, 12 Dec 2023 14:14:30 -0800 Subject: [PATCH] try fix cpu tree --- modules/patch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/patch.py b/modules/patch.py index 14f5852e..198e0100 100644 --- a/modules/patch.py +++ b/modules/patch.py @@ -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