ComfyUI_FearnworksNodes

ComfyUI_FearnworksNodes
★ 21

多模态节点集合扩展插件fearnworks
为ComfyUI提供多种多模态节点,简化图像、文本与音频等数据在流程中的转换与联动,扩展工作流能力与互操作性。
💡 在ComfyUI中构建图像与文本/音频的混合处理流程。
🍴 5 Forks💻 Python🔄 2024-08-05
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/f414772aa5c3
Token Count Nodes
📄 README

Fearnworks Custom Nodes

A collection of ComfyUI nodes. These nodes are tailored for specific tasks, such as counting files in directories and sorting text segments based on token counts.

Currently this is only tested on SDXL 1.0 models. An additional swich is needed to hand 1.x

Installation

  • Clone this repository into your ComfyUI custom nodes directory.
  • Nodes:

    CountTokens

    This node counts the number of tokens in a given text string using the CLIP tokenizer from the transformers library. It’s useful for analyzing text complexity and preprocessing text data.

  • Inputs: CLIP model, Text (String)
  • Outputs: Token Count (Integer)
  • TokenCountRanker

    Sorts segments and words within a text string by their token count, providing two lists: one for segments and one for words. This node aids in text analysis by highlighting the most complex parts of a given text.

  • Inputs: CLIP model, Text (String)
  • Outputs: Sorted Text by Token Count (String)
  • TrimToTokens

    Trims a text string to include only a specified number of tokens. This node is particularly useful in scenarios where you need to limit the length of text inputs to certain token thresholds.

  • Inputs: CLIP model, Text (String), Number of Tokens (Integer)
  • Outputs: Trimmed Text (String)
  • FileCountInDirectory

    Counts the number of files within a given directory, with an option to filter by file type. This node is essential for managing and analyzing file systems, ensuring efficient handling of directories and files.

  • Inputs: Directory Path (String), File Types (String, optional)
  • Outputs: File Count (Integer)