mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
Set clip vision model in eval mode so it works without inference mode.
This commit is contained in:
parent
adc40e3d7b
commit
719fa0866f
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user