Skip to content
Node packVerifiedExternal
Open source

ComfyUI_cspnodes

ComfyUI node pack by cerspense

Maintainer@cerspenseBgrade

Package profile

Status
Verified
Publisher
@cerspense
Source
GitHub
Stars
36

README

cspnodes

A ComfyUI node pack by cerspense

This package contains a collection of custom nodes for ComfyUI, designed to enhance your workflow with additional functionalities. Below is a detailed description of each node and its parameters.

Table of Contents

  1. TextFileLineIterator
  2. ImageDirIterator
  3. VidDirIterator
  4. Modelscopet2v
  5. Modelscopev2v
  6. SplitImageChannels
  7. RemapRange
  8. ResizeByImage
  9. IncrementEveryN
  10. DepthToNormalMap

TextFileLineIterator

This node iterates through lines in a text file.

Parameters:

  • file_path (STRING): Path to the text file.
  • line_index (INT, default: 0): Index of the line to retrieve.

Output:

  • (STRING): The selected line from the text file.

ImageDirIterator

This node iterates through images in a directory or multiple directories, with various sorting and selection options.

Parameters:

  • directory_path (STRING): Path to the directory containing images.
  • glob_patterns (STRING, default: "**/.png, **/.jpg"): Comma-separated list of glob patterns for selecting files.
  • image_index (INT, default: 0): Starting index for image selection.
  • sort_by (["date_modified", "name", "size", "random"]): Method to sort the images.
  • sort_order (["ascending", "descending"]): Order of sorting.
  • batch_size (INT, default: 1, min: 1, max: 64): Number of images to select at once.
  • increment_by_batch (BOOLEAN, default: False): Whether to increment the index by batch size.
  • randomize_final_list (BOOLEAN, default: False): Whether to randomize the final list of images.

Output:

  • (IMAGE): List of selected images.
  • (STRING): List of filenames for the selected images.

VidDirIterator

This node iterates through video files in a directory or multiple directories, with various sorting and selection options.

Parameters:

  • directory_path (STRING): Path to the directory containing video files.
  • glob_patterns (STRING, default: "**/.mp4, **/.mov"): Comma-separated list of glob patterns for selecting files.
  • video_index (INT, default: 0): Index of the video to select.
  • sort_by (["date_modified", "name", "size", "random"]): Method to sort the videos.
  • sort_order (["ascending", "descending"]): Order of sorting.
  • randomize_final_list (BOOLEAN, default: False): Whether to randomize the final list of videos. This will allow full randomization across all specified folders and files. Otherwise, it will randomize within each folder before moving on to the next.

Output:

  • (STRING): Path to the selected video file.

Modelscopet2v

This node generates video frames from text using the Modelscope text-to-video model.

Parameters:

  • prompt (STRING): Text prompt for video generation.
  • negative_prompt (STRING, default: None): Negative prompt for generation.
  • model_path (STRING, default: "cerspense/zeroscope_v2_576w"): Path to the model.
  • num_inference_steps (INT, default: 25): Number of inference steps.
  • guidance_scale (FLOAT, default: 9.0): Guidance scale for generation.
  • seed (INT, default: 42): Seed for random generation.
  • width (INT, default: 576): Width of the generated video.
  • height (INT, default: 320): Height of the generated video.
  • num_frames (INT, default: 24): Number of frames to generate.

Output:

  • (IMAGE): Generated video frames.

Modelscopev2v

This node transforms video frames using the Modelscope video-to-video model.

Parameters:

  • video_frames (IMAGE): Input video frames.
  • prompt (STRING): Text prompt for video transformation.
  • negative_prompt (STRING, default: None): Negative prompt for transformation.
  • model_path (STRING, default: "cerspense/zeroscope_v2_XL"): Path to the model.
  • strength (FLOAT, default: 0.70): Strength of the transformation.
  • num_inference_steps (INT,

Nodes in this pack

13 nodes
  • CountTextLines
  • DepthToNormalMap
  • GetLastFrameFromBatch
  • GetMP4Prompt
  • ImageDirIterator
  • IncrementEveryN
  • Modelscopet2v
  • Modelscopev2v
  • RemapRange
  • RemoveBlankLines
  • ResizeByImage
  • SplitImageChannels
  • VidDirIterator

Related resources

1 connection

Sources

3 sources
GitHubSource
github.com/cerspense/ComfyUI_cspnodes

Verified Oct 6

GitHubSourceVersion fed138f01dcfae2f485e25b87872481363100e00
github.com/cerspense/ComfyUI_cspnodes

Verified Oct 9

Source excerpts

1 excerpt

Source context: Repo cerspense/ComfyUI_cspnodes