From 719fa0866fcd7744de3bf5ffd9ddd076f7c36b98 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Fri, 15 Dec 2023 18:53:08 -0500 Subject: [PATCH] Set clip vision model in eval mode so it works without inference mode. --- comfy/clip_vision.py | 1 + 1 file changed, 1 insertion(+) diff --git a/comfy/clip_vision.py b/comfy/clip_vision.py index ba8a3a8d..85b017e0 100644 --- a/comfy/clip_vision.py +++ b/comfy/clip_vision.py @@ -39,6 +39,7 @@ class ClipVisionModel(): self.dtype = torch.float16 self.model = comfy.clip_model.CLIPVisionModelProjection(config, self.dtype, offload_device, comfy.ops.disable_weight_init) + self.model.eval() self.patcher = comfy.model_patcher.ModelPatcher(self.model, load_device=self.load_device, offload_device=offload_device) def load_sd(self, sd):