Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-12-11 14:08:13 +03:00 committed by GitHub
commit 604ba22315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 7 deletions

View File

@ -58,8 +58,13 @@ class InternalRoutes:
return web.json_response({"error": "Invalid directory type"}, status=400) return web.json_response({"error": "Invalid directory type"}, status=400)
directory = get_directory_by_type(directory_type) directory = get_directory_by_type(directory_type)
def is_visible_file(entry: os.DirEntry) -> bool:
"""Filter out hidden files (e.g., .DS_Store on macOS)."""
return entry.is_file() and not entry.name.startswith('.')
sorted_files = sorted( sorted_files = sorted(
(entry for entry in os.scandir(directory) if entry.is_file()), (entry for entry in os.scandir(directory) if is_visible_file(entry)),
key=lambda entry: -entry.stat().st_mtime key=lambda entry: -entry.stat().st_mtime
) )
return web.json_response([entry.name for entry in sorted_files], status=200) return web.json_response([entry.name for entry in sorted_files], status=200)

View File

@ -549,8 +549,10 @@ class VAE:
ddconfig = {"dim": dim, "z_dim": self.latent_channels, "dim_mult": [1, 2, 4, 4], "num_res_blocks": 2, "attn_scales": [], "temperal_downsample": [False, True, True], "dropout": 0.0} ddconfig = {"dim": dim, "z_dim": self.latent_channels, "dim_mult": [1, 2, 4, 4], "num_res_blocks": 2, "attn_scales": [], "temperal_downsample": [False, True, True], "dropout": 0.0}
self.first_stage_model = comfy.ldm.wan.vae.WanVAE(**ddconfig) self.first_stage_model = comfy.ldm.wan.vae.WanVAE(**ddconfig)
self.working_dtypes = [torch.bfloat16, torch.float16, torch.float32] self.working_dtypes = [torch.bfloat16, torch.float16, torch.float32]
self.memory_used_encode = lambda shape, dtype: 6000 * shape[3] * shape[4] * model_management.dtype_size(dtype) self.memory_used_encode = lambda shape, dtype: (1500 if shape[2]<=4 else 6000) * shape[3] * shape[4] * model_management.dtype_size(dtype)
self.memory_used_decode = lambda shape, dtype: 7000 * shape[3] * shape[4] * (8 * 8) * model_management.dtype_size(dtype) self.memory_used_decode = lambda shape, dtype: (2200 if shape[2]<=4 else 7000) * shape[3] * shape[4] * (8*8) * model_management.dtype_size(dtype)
# Hunyuan 3d v2 2.0 & 2.1 # Hunyuan 3d v2 2.0 & 2.1
elif "geo_decoder.cross_attn_decoder.ln_1.bias" in sd: elif "geo_decoder.cross_attn_decoder.ln_1.bias" in sd:

View File

@ -541,7 +541,7 @@ class SD3(supported_models_base.BASE):
unet_extra_config = {} unet_extra_config = {}
latent_format = latent_formats.SD3 latent_format = latent_formats.SD3
memory_usage_factor = 1.2 memory_usage_factor = 1.6
text_encoder_key_prefix = ["text_encoders."] text_encoder_key_prefix = ["text_encoders."]
@ -1026,7 +1026,7 @@ class ZImage(Lumina2):
"shift": 3.0, "shift": 3.0,
} }
memory_usage_factor = 1.7 memory_usage_factor = 2.0
supported_inference_dtypes = [torch.bfloat16, torch.float16, torch.float32] supported_inference_dtypes = [torch.bfloat16, torch.float16, torch.float32]

View File

@ -1815,7 +1815,7 @@ class NodeOutput(_NodeOutputInternal):
ui = data["ui"] ui = data["ui"]
if "expand" in data: if "expand" in data:
expand = data["expand"] expand = data["expand"]
return cls(args=args, ui=ui, expand=expand) return cls(*args, ui=ui, expand=expand)
def __getitem__(self, index) -> Any: def __getitem__(self, index) -> Any:
return self.args[index] return self.args[index]

View File

@ -2056,7 +2056,7 @@ class KlingExtension(ComfyExtension):
OmniProImageToVideoNode, OmniProImageToVideoNode,
OmniProVideoToVideoNode, OmniProVideoToVideoNode,
OmniProEditVideoNode, OmniProEditVideoNode,
# OmniProImageNode, # need support from backend OmniProImageNode,
] ]