mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-12 04:40:03 +08:00
Allow patches applied to ModelPatcher to be implemented in a general form as functions.
This commit is contained in:
parent
71ec5b144e
commit
9350384f6e
@ -487,6 +487,9 @@ class ModelPatcher:
|
||||
weight += ((strength * alpha) * lora_diff).type(weight.dtype)
|
||||
except Exception as e:
|
||||
logging.error("ERROR {} {} {}".format(patch_type, key, e))
|
||||
|
||||
elif patch_type == "patch_function":
|
||||
weight = v(p, weight, key)
|
||||
else:
|
||||
logging.warning("patch type not recognized {} {}".format(patch_type, key))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user