(self, device_to=None, unpatch_weights=True)
| 67 | comfy.utils.set_attr_param(self.model, key, out_weight) |
| 68 | |
| 69 | def unpatch_model(self, device_to=None, unpatch_weights=True): |
| 70 | if unpatch_weights: |
| 71 | for p in self.model.parameters(): |
| 72 | if is_torch_compatible(p): |
| 73 | continue |
| 74 | patches = getattr(p, "patches", []) |
| 75 | if len(patches) > 0: |
| 76 | p.patches = [] |
| 77 | # TODO: Find another way to not unload after patches |
| 78 | return super().unpatch_model(device_to=device_to, unpatch_weights=unpatch_weights) |
| 79 | |
| 80 | |
| 81 | def pin_weight_to_device(self, key): |
nothing calls this directly
no test coverage detected