Make force_clear_cache default False across nodes

This commit is contained in:
silveroxides
2026-10-03 02:14:14 +02:00
parent ae2858bf6b
commit 4f600761dd
9 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -2720,7 +2720,7 @@ def _common_inputs(
),
io.Boolean.Input(
"force_clear_cache",
default=True,
default=False,
tooltip="Run Python garbage collection and clear the CUDA allocator cache before each layer. Reduces retained memory but can substantially slow merging.",
),
io.Boolean.Input(
@@ -2922,7 +2922,7 @@ class CWBLoRAMultiMerger(io.ComfyNode):
io.String.Input("discard_patterns", default="", multiline=True, tooltip="Omit matching tensors or logical groups from the output."),
io.Boolean.Input("glob_patterns", default=False, tooltip="Interpret filter entries as shell-style globs instead of regular expressions."),
io.Boolean.Input("lazy_load", default=True, tooltip="Use bounded UEL work-unit streaming and release each completed input layer."),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Collect Python and CUDA caches before each layer at a potential speed cost."),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Collect Python and CUDA caches before each layer at a potential speed cost."),
io.Boolean.Input("override_dtype", default=False, tooltip="Force generated floating factors to the requested save dtype."),
io.Boolean.Input("include_1d_diffs", default=False, tooltip="CWB-merge 1D direct differences as FP32 instead of preserving the anchor."),
io.Boolean.Input("counterfactual_weight_sweep", default=False, tooltip="Evaluate alpha, beta, similarity-threshold, DSC, and comfort-bandpass weight combinations from each already-computed consensus similarity vector and append them to the report without additional model loads or saved outputs."),
@@ -2993,7 +2993,7 @@ def _embedding_coalesce_controls(default_filename: str):
io.Combo.Input("save_dtype", options=["fp32", "fp16", "bf16"], default="fp32", tooltip="Requested dtype for generated floating embedding tensors."),
io.Combo.Input("process_device", options=["cuda", "cpu"], default="cuda", tooltip="Per-tensor FP32 CWB arithmetic device; CUDA OOM retries that tensor on CPU."),
io.Boolean.Input("lazy_load", default=True, tooltip="Use bounded UEL streaming and release each tensor after its work unit."),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear Python and CUDA caches before each tensor at a possible speed cost."),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear Python and CUDA caches before each tensor at a possible speed cost."),
io.Boolean.Input("override_dtype", default=False, tooltip="Force generated floating tensors to Save Dtype."),
]
+1 -1
View File
@@ -640,7 +640,7 @@ def _fixed_inputs(count, default_filename):
),
io.Boolean.Input(
"force_clear_cache",
default=True,
default=False,
tooltip="Clear Python and CUDA caches before each layer to reduce retained memory.",
),
io.Boolean.Input(
+1 -1
View File
@@ -498,7 +498,7 @@ def extract_dora_from_files(
chunk_large_layers: bool = True,
svd_niter: int = 2,
lazy_load: bool = True,
force_clear_cache: bool = True,
force_clear_cache: bool = False,
glob_skip_patterns: bool = False,
knee_probe_offset: int = 32,
include_mode: bool = False,
+1 -1
View File
@@ -355,7 +355,7 @@ def extract_dora_learned_from_files(
chunk_large_layers: bool = True,
svd_niter: int = 2,
lazy_load: bool = True,
force_clear_cache: bool = True,
force_clear_cache: bool = False,
glob_skip_patterns: bool = False,
knee_probe_offset: int = 32,
include_mode: bool = False,
+1 -1
View File
@@ -498,7 +498,7 @@ def extract_lora_from_files(
chunk_large_layers: bool = True,
svd_niter: int = 2,
lazy_load: bool = True,
force_clear_cache: bool = True,
force_clear_cache: bool = False,
glob_skip_patterns: bool = False,
include_1d_diffs: bool = False,
knee_probe_offset: int = 32,
+10 -10
View File
@@ -514,7 +514,7 @@ class CheckpointTwoMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -584,7 +584,7 @@ class ModelTwoMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -654,7 +654,7 @@ class TextEncoderTwoMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -724,7 +724,7 @@ class LoRATwoMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force merged non-1D tensors to save_dtype. Enabled 1D direct diffs remain FP32."),
io.Boolean.Input("include_1d_diffs", default=False,
tooltip="Merge 1D tensors. When disabled, preserve Model A's 1D tensors unchanged."),
@@ -798,7 +798,7 @@ class EmbeddingTwoMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -871,7 +871,7 @@ class CheckpointThreeMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -942,7 +942,7 @@ class ModelThreeMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -1013,7 +1013,7 @@ class TextEncoderThreeMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
@@ -1084,7 +1084,7 @@ class LoRAThreeMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force merged non-1D tensors to save_dtype. Enabled 1D direct diffs remain FP32."),
io.Boolean.Input("include_1d_diffs", default=False,
tooltip="Merge 1D tensors. When disabled, preserve Model A's 1D tensors unchanged."),
@@ -1159,7 +1159,7 @@ class EmbeddingThreeMerger(io.ComfyNode):
tooltip="When True, exclude/discard patterns use glob syntax (* = any sequence, dots are literal). "
"When False (default), patterns are Python regex matched as substrings."),
io.Boolean.Input("lazy_load", default=True, tooltip="Low memory mode: load tensors from disk on demand"),
io.Boolean.Input("force_clear_cache", default=True, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("force_clear_cache", default=False, tooltip="Clear CUDA cache after each layer"),
io.Boolean.Input("override_dtype", default=False, tooltip="Force the entire model to be saved as the selected save_dtype. If False (default), higher precision dtypes are preserved."),
io.Boolean.Input("include_mode", default=False, tooltip="Use Exclude Patterns as a whitelist instead. Only matching tensors are merged; nonmatching tensors are preserved from Model A."),
parameter_input("merge"),
+1 -1
View File
@@ -1243,7 +1243,7 @@ def _common_inputs(model_type: str, *, alignment_control: bool):
),
io.Boolean.Input(
"force_clear_cache",
default=True,
default=False,
tooltip="Run garbage collection and clear the CUDA allocator cache after every analyzed work unit. Saves retained memory but slows analysis.",
),
io.String.Input(
+1 -1
View File
@@ -79,7 +79,7 @@ def extract_te_from_files(
chunk_large_layers: bool = True,
svd_niter: int = 2,
lazy_load: bool = True,
force_clear_cache: bool = True,
force_clear_cache: bool = False,
glob_skip_patterns: bool = False,
knee_probe_offset: int = 32,
include_mode: bool = False,
+1 -1
View File
@@ -390,7 +390,7 @@ def test_exact_node_schema_contract(delta_cwb):
assert schemas[0].inputs[7].default == "full_difference"
assert schemas[0].inputs[8].default == 384
assert schemas[0].inputs[9].default == "cuda"
assert schemas[0].inputs[-2].default is True
assert schemas[0].inputs[-2].default is False
assert schemas[0].inputs[-1].default is False
assert "agreement" in schemas[0].inputs[2].tooltip
assert "Only a failed CUDA layer retries on CPU" in schemas[0].inputs[9].tooltip