From 1b38f5bf57ca07490e616dd58ec3004d05de0655 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Mon, 6 Jan 2025 17:11:12 -0600 Subject: [PATCH] removed 4 whitespace lines to satisfy Ruff, --- comfy/hooks.py | 4 ++-- comfy/samplers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comfy/hooks.py b/comfy/hooks.py index cc9f6cd5..46fc06bd 100644 --- a/comfy/hooks.py +++ b/comfy/hooks.py @@ -255,7 +255,7 @@ class TransformerOptionsHook(Hook): registered.add(self) comfy.patcher_extension.merge_nested_dicts(model_options, add_model_options, copy_dict1=False) return True - + def on_apply_hooks(self, model: ModelPatcher, transformer_options: dict[str]): comfy.patcher_extension.merge_nested_dicts(transformer_options, self.transformers_dict, copy_dict1=False) @@ -290,7 +290,7 @@ class SetInjectionsHook(Hook): class HookGroup: ''' Stores groups of hooks, and allows them to be queried by type. - + To prevent breaking their functionality, never modify the underlying self.hooks or self._hook_dict vars directly; always use the provided functions on HookGroup. ''' diff --git a/comfy/samplers.py b/comfy/samplers.py index 43a735c6..a725d518 100644 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -855,7 +855,7 @@ def cast_to_load_options(model_options: dict[str], device=None, dtype=None): to_load_options = model_options.get("to_load_options", None) if to_load_options is None: return - + casts = [] if device is not None: casts.append(device) @@ -864,7 +864,7 @@ def cast_to_load_options(model_options: dict[str], device=None, dtype=None): # if nothing to apply, do nothing if len(casts) == 0: return - + # Try to call .to on patches if "patches" in to_load_options: patches = to_load_options["patches"]