From a009e5ecae39b022479ef04bcff6d7dda78c0e10 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Sun, 28 Jan 2024 10:13:57 -0800 Subject: [PATCH] Update diffusers_patcher.py --- modules_forge/diffusers_patcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules_forge/diffusers_patcher.py b/modules_forge/diffusers_patcher.py index 1bca6d37..fd94cf1d 100644 --- a/modules_forge/diffusers_patcher.py +++ b/modules_forge/diffusers_patcher.py @@ -19,8 +19,9 @@ class DiffusersPatcher: with use_patched_ops(ops.manual_cast): with modeling_utils.no_init_weights(): - self.pipeline = pipeline_class.from_pretrained(*args, **kwargs).to(dtype) + self.pipeline = pipeline_class.from_pretrained(*args, **kwargs) + self.pipeline = self.pipeline.to(device=offload_device, dtype=dtype) self.pipeline.eval() self.patcher = ModelPatcher(