mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-12 07:37:05 +08:00
Update model_patcher.py
This commit is contained in:
parent
d24e99bcbe
commit
a605201278
@ -413,9 +413,9 @@ class ModelPatcher:
|
|||||||
The value of the requested attribute
|
The value of the requested attribute
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
model = MyModel()
|
patcher = ModelPatcher()
|
||||||
weight = get_attr(model, "layer1.conv.weight")
|
weight = patcher.get_model_object("layer1.conv.weight")
|
||||||
# Equivalent to: model.layer1.conv.weight
|
# Equivalent to: patcher.model.layer1.conv.weight
|
||||||
"""
|
"""
|
||||||
if name in self.object_patches:
|
if name in self.object_patches:
|
||||||
return self.object_patches[name]
|
return self.object_patches[name]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user