From c422553b0bb9324401c5d717f6fc8dcaaf36e210 Mon Sep 17 00:00:00 2001 From: "kosinkadink1@gmail.com" Date: Tue, 24 Sep 2024 16:20:53 +0900 Subject: [PATCH] Added get_attachment func on ModelPatcher --- comfy/model_patcher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index cfea74796..b0bc09297 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -823,10 +823,13 @@ class ModelPatcher: def set_attachments(self, key: str, attachment): self.attachments[key] = attachment - + def remove_attachments(self, key: str): if key in self.attachments: self.attachments.pop(key) + + def get_attachment(self, key: str): + return self.attachments.get(key, None) def set_injections(self, key: str, injections: List[PatcherInjection]): self.injections[key] = injections