mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 21:37:00 +08:00
Allow the model patch to be used generally in the form of a function.
This commit is contained in:
parent
71ec5b144e
commit
e6d9aa12e0
@ -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