From 8d723d2caa959a8c4b14050c30dd83cf931e3dc1 Mon Sep 17 00:00:00 2001 From: rattus <46076784+rattus128@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:43:24 -0700 Subject: [PATCH 1/3] Fix/tweak pinned memory accounting (#13221) * mm: Lower windows pin threshold Some workflows have more extranous use of shared GPU memory than is accounted for in the 5% pin headroom. Lower this for safety. * mm: Remove pin count clearing threshold. TOTAL_PINNED_MEMORY is shared between the legacy and aimdo pinning systems, however this catch-all assumes only the legacy system exists. Remove the catch-all as the PINNED_MEMORY buffer is coherent already. --- comfy/model_management.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index ce079cf2f879..0eebf1deded0 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -1326,9 +1326,9 @@ def cast_to_device(tensor, device, dtype, copy=False): if not args.disable_pinned_memory: if is_nvidia() or is_amd(): if WINDOWS: - MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.45 # Windows limit is apparently 50% + MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.40 # Windows limit is apparently 50% else: - MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.95 + MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.90 logging.info("Enabled pinned memory {}".format(MAX_PINNED_MEMORY // (1024 * 1024))) PINNING_ALLOWED_TYPES = set(["Tensor", "Parameter", "QuantizedTensor"]) @@ -1403,8 +1403,6 @@ def unpin_memory(tensor): if torch.cuda.cudart().cudaHostUnregister(ptr) == 0: TOTAL_PINNED_MEMORY -= PINNED_MEMORY.pop(ptr) - if len(PINNED_MEMORY) == 0: - TOTAL_PINNED_MEMORY = 0 return True else: logging.warning("Unpin error.") From 537c10d231cf691ada070fa98978a2ddadb064fc Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Sun, 29 Mar 2026 19:07:38 -0700 Subject: [PATCH 2/3] Update README.md with latest AMD Linux pytorch. (#13228) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62c4f528cc6b..021f88a310ef 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ Put your VAE in: models/vae AMD users can install rocm and pytorch with pip if you don't have it already installed, this is the command to install the stable version: -```pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.1``` +```pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.2``` This is the command to install the nightly with ROCm 7.2 which might have some performance improvements: From 55e6478526590572b88272045b5014d9b60fa2a0 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Sun, 29 Mar 2026 21:02:44 -0700 Subject: [PATCH 3/3] Rename utils/string nodes with Text prefix and add search aliases (#13227) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename all 11 nodes in the utils/string category to include a "Text" prefix for better discoverability and natural sorting. Regex nodes get user-friendly names without "Regex" in the display name. Renames: - Concatenate → Text Concatenate - Substring → Text Substring - Length → Text Length - Case Converter → Text Case Converter - Trim → Text Trim - Replace → Text Replace - Contains → Text Contains - Compare → Text Compare - Regex Match → Text Match - Regex Extract → Text Extract Substring - Regex Replace → Text Replace (Regex) All renamed nodes include their old display name as a search alias so users can still find them by searching the original name. Regex nodes also include "regex" as a search alias. --- comfy_extras/nodes_string.py | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/comfy_extras/nodes_string.py b/comfy_extras/nodes_string.py index b4e5f148adf0..75a8bb4eeda4 100644 --- a/comfy_extras/nodes_string.py +++ b/comfy_extras/nodes_string.py @@ -9,9 +9,9 @@ class StringConcatenate(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringConcatenate", - display_name="Concatenate", + display_name="Text Concatenate", category="utils/string", - search_aliases=["text concat", "join text", "merge text", "combine strings", "concat", "concatenate", "append text", "combine text", "string"], + search_aliases=["Concatenate", "text concat", "join text", "merge text", "combine strings", "concat", "concatenate", "append text", "combine text", "string"], inputs=[ io.String.Input("string_a", multiline=True), io.String.Input("string_b", multiline=True), @@ -32,8 +32,8 @@ class StringSubstring(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringSubstring", - search_aliases=["extract text", "text portion"], - display_name="Substring", + search_aliases=["Substring", "extract text", "text portion"], + display_name="Text Substring", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -55,8 +55,8 @@ class StringLength(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringLength", - search_aliases=["character count", "text size"], - display_name="Length", + search_aliases=["character count", "text size", "string length"], + display_name="Text Length", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -76,8 +76,8 @@ class CaseConverter(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="CaseConverter", - search_aliases=["text case", "uppercase", "lowercase", "capitalize"], - display_name="Case Converter", + search_aliases=["Case Converter", "text case", "uppercase", "lowercase", "capitalize"], + display_name="Text Case Converter", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -109,8 +109,8 @@ class StringTrim(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringTrim", - search_aliases=["clean whitespace", "remove whitespace"], - display_name="Trim", + search_aliases=["Trim", "clean whitespace", "remove whitespace", "strip"], + display_name="Text Trim", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -140,8 +140,8 @@ class StringReplace(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringReplace", - search_aliases=["find and replace", "substitute", "swap text"], - display_name="Replace", + search_aliases=["Replace", "find and replace", "substitute", "swap text"], + display_name="Text Replace", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -163,8 +163,8 @@ class StringContains(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringContains", - search_aliases=["text includes", "string includes"], - display_name="Contains", + search_aliases=["Contains", "text includes", "string includes"], + display_name="Text Contains", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -191,8 +191,8 @@ class StringCompare(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="StringCompare", - search_aliases=["text match", "string equals", "starts with", "ends with"], - display_name="Compare", + search_aliases=["Compare", "text match", "string equals", "starts with", "ends with"], + display_name="Text Compare", category="utils/string", inputs=[ io.String.Input("string_a", multiline=True), @@ -227,8 +227,8 @@ class RegexMatch(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="RegexMatch", - search_aliases=["pattern match", "text contains", "string match"], - display_name="Regex Match", + search_aliases=["Regex Match", "regex", "pattern match", "text contains", "string match"], + display_name="Text Match", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -268,8 +268,8 @@ class RegexExtract(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="RegexExtract", - search_aliases=["pattern extract", "text parser", "parse text"], - display_name="Regex Extract", + search_aliases=["Regex Extract", "regex", "pattern extract", "text parser", "parse text"], + display_name="Text Extract Substring", category="utils/string", inputs=[ io.String.Input("string", multiline=True), @@ -343,8 +343,8 @@ class RegexReplace(io.ComfyNode): def define_schema(cls): return io.Schema( node_id="RegexReplace", - search_aliases=["pattern replace", "find and replace", "substitution"], - display_name="Regex Replace", + search_aliases=["Regex Replace", "regex", "pattern replace", "regex replace", "substitution"], + display_name="Text Replace (Regex)", category="utils/string", description="Find and replace text using regex patterns.", inputs=[