comfydv

comfydv
★ 2

字符串格式化随机选择模型记忆效率工具
为ComfyUI提供工作流效率节点:支持f-string与Jinja2格式化、带种子随机选择、模型记忆管理等便利功能。
💡 在工作流中格式化文本、可控随机选择并管理模型记忆。
🍴 1 Forks💻 Python🔄 2025-11-05
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/af9fbf81e746
📦 requirements.txt
#
This
file
was
autogenerated
by
uv
via
the
following
command:
#
uv
export
--no-editable
--no-hashes
.
colorama==0.4.6
termcolor==2.5.0
f-string
jinja2
random
📄 README

comfydv

A collection of workflow efficiency and quality of life nodes that I’ve created for personal use out of necessity.

  • String Formatting: Use either plain python f-strings or more advanced Jinja2 templating to format outputs.
  • Random Choice: Add an abitrary number of inputs and then, with seed control, randomly select one for an output.
  • Documentation

    Full documentation can be found: darth-veitcher.github.io/comfydv

    String Formatting

    The FormatString node provides flexible string formatting with dynamic input/output configuration.

    Python F-String

    A simple python f-string dynamically creates the necessary inputs/outputs for the detected keys.

    Jinja 2

    Switching to Jinja2 allows you to use more advanced control blocks and other filters/features of that templating language. See Jinja documentation for further details.

    Output Structure

    The node’s outputs are organized for maximum reliability and flexibility:

  • formatted_string (Output 0): The formatted result string – always in position 0
  • saved_file_path (Output 1): Path to saved state file (if save_path provided) – always in position 1
  • Variable outputs (Output 2+): Pass-through values for any variables detected in the template, enabling easy chaining
  • For example, with template "Hello {name}, you are {age}":

  • Output 0: The formatted string (e.g., “Hello Alice, you are 30”)
  • Output 1: The save file path (or empty string)
  • Output 2: The value of name (e.g., “Alice”)
  • Output 3: The value of age (e.g., “30”)
  • This structure ensures the primary outputs (formatted_string and saved_file_path) are always in predictable, fixed positions for reliable workflow connections.

    Random Choice

    Ability to take arbitrary length and type of inputs to then output a choice with a controllable seed.