From 44a80a4929702c9207ecdd840402af41eee84f64 Mon Sep 17 00:00:00 2001 From: user1 Date: Wed, 27 Sep 2023 18:06:22 -0700 Subject: [PATCH] For now, changing DWPose preprocessor to alway use 'cpu' device. --- invokeai/app/invocations/controlnet_image_processors.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invokeai/app/invocations/controlnet_image_processors.py b/invokeai/app/invocations/controlnet_image_processors.py index 83b0e90892..1565e20693 100644 --- a/invokeai/app/invocations/controlnet_image_processors.py +++ b/invokeai/app/invocations/controlnet_image_processors.py @@ -127,7 +127,7 @@ class ControlNetInvocation(BaseInvocation): @invocation( - "image_processor", title="Base Image Processor", tags=["controlnet"], category="controlnet", version="1.0.0" + "image_processor", title="Base Image Processorwp", tags=["controlnet"], category="controlnet", version="1.0.0" ) class ImageProcessorInvocation(BaseInvocation): """Base class for invocations that preprocess images for ControlNet""" @@ -607,7 +607,9 @@ class DWPoseImageProcessorInvocation(ImageProcessorInvocation): image_resolution: int = InputField(default=512, ge=0, description=FieldDescriptions.image_res) def run_processor(self, image): - device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + # for now, executing DWPose processing on CPU only + device = "cpu" dwpose_processor = DWposeDetector(device=device) processed_image = dwpose_processor( image,