Commit 719fa086 authored by comfyanonymous's avatar comfyanonymous
Browse files

Set clip vision model in eval mode so it works without inference mode.

parent adc40e3d
...@@ -39,6 +39,7 @@ class ClipVisionModel(): ...@@ -39,6 +39,7 @@ class ClipVisionModel():
self.dtype = torch.float16 self.dtype = torch.float16
self.model = comfy.clip_model.CLIPVisionModelProjection(config, self.dtype, offload_device, comfy.ops.disable_weight_init) 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) self.patcher = comfy.model_patcher.ModelPatcher(self.model, load_device=self.load_device, offload_device=offload_device)
def load_sd(self, sd): def load_sd(self, sd):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment