From 11dcc6c96c11ebb4558b457279d057114f9071a4 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Sun, 11 Feb 2024 16:53:19 -0800 Subject: [PATCH] solve lereas++ device #174 --- .../forge_legacy_preprocessors/annotator/leres/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions-builtin/forge_legacy_preprocessors/annotator/leres/__init__.py b/extensions-builtin/forge_legacy_preprocessors/annotator/leres/__init__.py index 2b5d43cd..7c177170 100644 --- a/extensions-builtin/forge_legacy_preprocessors/annotator/leres/__init__.py +++ b/extensions-builtin/forge_legacy_preprocessors/annotator/leres/__init__.py @@ -76,6 +76,7 @@ def apply_leres(input_image, thr_a, thr_b, boost=False): with torch.no_grad(): if boost: + pix2pixmodel.netG.to(devices.get_device_for("controlnet")) depth = estimateboost(input_image, model, 0, pix2pixmodel, max(width, height)) else: depth = estimateleres(input_image, model, width, height)