mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-07-08 18:37:13 +08:00
maybe fix lora compile
This commit is contained in:
parent
6eb9211091
commit
8c590fd5a0
@ -5,6 +5,7 @@ import comfy.sd
|
|||||||
import torch
|
import torch
|
||||||
import folder_paths
|
import folder_paths
|
||||||
orig_attention = comfy_attention.optimized_attention
|
orig_attention = comfy_attention.optimized_attention
|
||||||
|
import comfy.model_management as mm
|
||||||
|
|
||||||
class BaseLoaderKJ:
|
class BaseLoaderKJ:
|
||||||
original_linear = None
|
original_linear = None
|
||||||
@ -155,7 +156,9 @@ def patched_patch_model(self, device_to=None, lowvram_model_memory=0, load_weigh
|
|||||||
full_load = True
|
full_load = True
|
||||||
else:
|
else:
|
||||||
full_load = False
|
full_load = False
|
||||||
|
|
||||||
|
device_to = mm.get_torch_device()
|
||||||
|
load_weights = True
|
||||||
if load_weights:
|
if load_weights:
|
||||||
self.load(device_to, lowvram_model_memory=lowvram_model_memory, force_patch_weights=force_patch_weights, full_load=full_load)
|
self.load(device_to, lowvram_model_memory=lowvram_model_memory, force_patch_weights=force_patch_weights, full_load=full_load)
|
||||||
for k in self.object_patches:
|
for k in self.object_patches:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user