mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-17 09:40:50 +08:00
Set the compute type on CLIP MPs
So that the loader can know the size of weights for dequant accounting.
This commit is contained in:
parent
5a7e929849
commit
9663183774
@ -127,6 +127,8 @@ class CLIP:
|
||||
|
||||
self.tokenizer = tokenizer(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data)
|
||||
self.patcher = comfy.model_patcher.ModelPatcher(self.cond_stage_model, load_device=load_device, offload_device=offload_device)
|
||||
#Match torch.float32 hardcode upcast in TE implemention
|
||||
self.patcher.set_model_compute_dtype(torch.float32)
|
||||
self.patcher.hook_mode = comfy.hooks.EnumHookMode.MinVram
|
||||
self.patcher.is_clip = True
|
||||
self.apply_hooks_to_conds = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user