From 74458b7410d192ee5aab0935a5363cd620352200 Mon Sep 17 00:00:00 2001 From: Margen67 Date: Wed, 26 Feb 2025 19:40:58 -0800 Subject: [PATCH] More consistent formatting --- .github/workflows/stable-release.yml | 1 - comfy/hooks.py | 2 +- comfy/supported_models.py | 12 ++++++------ comfy/utils.py | 4 ++-- comfy_extras/nodes_morphology.py | 2 +- folder_paths.py | 2 +- nodes.py | 4 ++-- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 9de458b1..55738238 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -1,4 +1,3 @@ - name: "Release Stable Version" on: diff --git a/comfy/hooks.py b/comfy/hooks.py index 9d073107..0436e74a 100644 --- a/comfy/hooks.py +++ b/comfy/hooks.py @@ -587,7 +587,7 @@ def get_sorted_list_via_attr(objects: list, attr: str) -> list: sorted_list.extend(object_list) return sorted_list -def create_transformer_options_from_hooks(model: ModelPatcher, hooks: HookGroup, transformer_options: dict[str]=None): +def create_transformer_options_from_hooks(model: ModelPatcher, hooks: HookGroup, transformer_options: dict[str]=None): # if no hooks or is not a ModelPatcher for sampling, return empty dict if hooks is None or model.is_clip: return {} diff --git a/comfy/supported_models.py b/comfy/supported_models.py index a8212c1f..f4dba625 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -602,10 +602,10 @@ class PixArtAlpha(supported_models_base.BASE): } sampling_settings = { - "beta_schedule" : "sqrt_linear", - "linear_start" : 0.0001, - "linear_end" : 0.02, - "timesteps" : 1000, + "beta_schedule": "sqrt_linear", + "linear_start": 0.0001, + "linear_end": 0.02, + "timesteps": 1000, } unet_extra_config = {} @@ -665,8 +665,8 @@ class HunyuanDiT1(HunyuanDiT): unet_extra_config = {} sampling_settings = { - "linear_start" : 0.00085, - "linear_end" : 0.03, + "linear_start": 0.00085, + "linear_end": 0.03, } class Flux(supported_models_base.BASE): diff --git a/comfy/utils.py b/comfy/utils.py index df7057c6..6794bf04 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -443,8 +443,8 @@ PIXART_MAP_BLOCK = { ("mlp.fc1.bias", "ff.net.0.proj.bias"), ("mlp.fc2.weight", "ff.net.2.weight"), ("mlp.fc2.bias", "ff.net.2.bias"), - ("cross_attn.proj.weight" ,"attn2.to_out.0.weight"), - ("cross_attn.proj.bias" ,"attn2.to_out.0.bias"), + ("cross_attn.proj.weight", "attn2.to_out.0.weight"), + ("cross_attn.proj.bias", "attn2.to_out.0.bias"), } def pixart_to_diffusers(mmdit_config, output_prefix=""): diff --git a/comfy_extras/nodes_morphology.py b/comfy_extras/nodes_morphology.py index b1372b8c..5013de0c 100644 --- a/comfy_extras/nodes_morphology.py +++ b/comfy_extras/nodes_morphology.py @@ -8,7 +8,7 @@ class Morphology: @classmethod def INPUT_TYPES(s): return {"required": {"image": ("IMAGE",), - "operation": (["erode", "dilate", "open", "close", "gradient", "bottom_hat", "top_hat"],), + "operation": (["erode", "dilate", "open", "close", "gradient", "bottom_hat", "top_hat"],), "kernel_size": ("INT", {"default": 3, "min": 3, "max": 999, "step": 1}), }} diff --git a/folder_paths.py b/folder_paths.py index 72c70f59..560c561a 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -84,7 +84,7 @@ class CacheHelper: cache_helper = CacheHelper() extension_mimetypes_cache = { - "webp" : "image", + "webp": "image", } def map_legacy(folder_name: str) -> str: diff --git a/nodes.py b/nodes.py index f7f6cb15..bd6d440d 100644 --- a/nodes.py +++ b/nodes.py @@ -1988,7 +1988,7 @@ NODE_CLASS_MAPPINGS = { "ImageBatch": ImageBatch, "ImagePadForOutpaint": ImagePadForOutpaint, "EmptyImage": EmptyImage, - "ConditioningAverage": ConditioningAverage , + "ConditioningAverage": ConditioningAverage, "ConditioningCombine": ConditioningCombine, "ConditioningConcat": ConditioningConcat, "ConditioningSetArea": ConditioningSetArea, @@ -2075,7 +2075,7 @@ NODE_DISPLAY_NAME_MAPPINGS = { "LatentUpscaleBy": "Upscale Latent By", "LatentComposite": "Latent Composite", "LatentBlend": "Latent Blend", - "LatentFromBatch" : "Latent From Batch", + "LatentFromBatch": "Latent From Batch", "RepeatLatentBatch": "Repeat Latent Batch", # Image "SaveImage": "Save Image",