Skip to content

hibikine/comfy-bool-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comfy Bool Filter

A simple ComfyUI custom node that filters arrays based on boolean masks.

Description

Comfy Bool Filter takes an input array and a boolean mask array of the same length, returning only the elements where the corresponding boolean value is True.

Usage

Inputs

Input Type Description
value_array LIST The input array to filter
bool_mask LIST A boolean array of the same length as array

Outputs

Output Type Description
FILTERED_ARRAY LIST Array containing only elements where bool_mask is True

Example

Input:
  array: ["apple", "banana", "cherry", "date"]
  bool_mask: [True, False, True, False]

Output:
  filtered_array: ["apple", "cherry"]

Notes

  • The array and bool_mask must have the same length
  • If lengths don't match, an error will be raised
  • An empty result is returned if all boolean values are False

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages