Skip to content

Commit f2322ea

Browse files
committed
Update README and description
1 parent 597f56c commit f2322ea

File tree

3 files changed

+280
-129
lines changed

3 files changed

+280
-129
lines changed

README.md

Lines changed: 261 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -16,91 +16,271 @@ These nodes are very lightweight and require no additional dependencies.
1616

1717
# Features
1818

19-
- **STRING**: String manipulation nodes
20-
- Basic functions: capitalize, casefold, center, concat, count, encode/decode, find/rfind, join, lower/upper, replace, split, strip, etc.
21-
- String checking: contains, endswith, startswith
22-
- Case conversion: lower, upper, swapcase, title, capitalize
23-
- Validation: isalnum, isalpha, isdigit, isnumeric, etc.
24-
25-
- **LIST**: Python list manipulation nodes (as a single variable)
26-
- Conversion: convert to data list
27-
- Creation: any to LIST
28-
- Modification: append, extend, insert, remove, pop, clear, set_item
29-
- Access: get_item, slice, index, contains
30-
- Information: length, count
31-
- Operations: sort, reverse, min, max
32-
33-
- **SET**: Python set manipulation nodes (as a single variable)
34-
- Conversion: convert to data list, to LIST
35-
- Creation: any to SET, LIST to SET
36-
- Modification: add, remove, discard, pop, clear
37-
- Information: length, contains
38-
- Set operations: union, intersection, difference, symmetric_difference
39-
- Comparison: is_subset, is_superset, is_disjoint
40-
41-
- **data list**: ComfyUI list manipulation nodes (for processing individual items)
42-
- Creation: create_empty
43-
- Modification: append, filter, extend, insert, remove, pop, clear, set_item
44-
- Access: get_item, slice, index, contains
45-
- Information: length, count
46-
- Operations: sort, reverse, copy, zip, min, max
47-
48-
- **cast**: Type conversion nodes for ComfyUI data types
49-
- Basic conversions: to STRING, to INT, to FLOAT, to BOOLEAN
50-
- Collection conversions: to LIST, to SET, to DICT
51-
- Special conversions: data list to LIST, data list to SET
52-
53-
- **path**: File system path manipulation nodes
54-
- Basic operations: join, split, splitext, basename, dirname, normalize
55-
- Path information: abspath, exists, is_file, is_dir, is_absolute, get_size, get_extension
56-
- Directory operations: list_dir, get_cwd
57-
- Path searching: glob, common_prefix
58-
- Path conversions: relative, expand_vars
59-
60-
- **DICT**: Dictionary manipulation nodes
61-
- Creation: create, from_items, from_lists, fromkeys, any_to_DICT
62-
- Access: get, get_multiple, keys, values, items
63-
- Modification: set, update, setdefault, merge
64-
- Removal: pop, popitem, remove, clear
65-
- Information: length, contains_key
66-
- Operations: copy, filter_by_keys, exclude_keys, invert, compare
67-
- Conversion: get_keys_values
68-
69-
- **INT**: Integer operation nodes
70-
- Basic operations: add, subtract, multiply, divide, modulus, power
71-
- Bit operations: bit_length, to_bytes, from_bytes, bit_count
72-
73-
- **FLOAT**: Floating-point operation nodes
74-
- Basic operations: add, subtract, multiply, divide, power, round
75-
- Specialized: is_integer, as_integer_ratio, to_hex, from_hex
76-
77-
- **BOOLEAN**: Boolean logic nodes
78-
- Logic operations: and, or, not, xor, nand, nor
79-
80-
- **Comparison**: Value comparison nodes
81-
- Basic comparisons: equal (==), not equal (!=), greater than (>), less than (<), etc.
82-
- String comparison: case-sensitive/insensitive string comparison with various operators
83-
- Special comparisons: number in range, is null, compare length
84-
- Container operations: length comparison for strings, lists, and other containers
85-
86-
- **Flow Control**: Workflow control nodes
87-
- Conditional: if/else for branching logic based on conditions
88-
- Selection: switch/case for selecting from multiple options based on an index
89-
90-
- **Math**: Mathematical operations
91-
- Trigonometric: sin, cos, tan, asin, acos, atan, atan2
92-
- Logarithmic/Exponential: log, log10, exp, sqrt
93-
- Numerical: min, max
94-
- Constants: pi, e
95-
- Conversion: degrees/radians
96-
- Rounding: floor, ceil
97-
- Other: abs (absolute value)
19+
## Nodes
20+
21+
### BOOLEAN: Boolean logic nodes
22+
- Logic operations: and, or, not, xor, nand, nor
23+
24+
### cast: Type conversion nodes for ComfyUI data types
25+
- Basic data type conversions:
26+
- to BOOLEAN - Converts any input to a Boolean using Python's truthy/falsy rules
27+
- to FLOAT - Converts numeric input to a floating-point number (raises ValueError for invalid inputs)
28+
- to INT - Converts numeric input to an integer (raises ValueError for invalid inputs)
29+
- to STRING - Converts any input to a string using Python's str() function
30+
- Collection type conversions:
31+
- to DICT - Converts compatible inputs (mappings or lists of key-value pairs) to a dictionary
32+
- to LIST - Converts input to a LIST (wraps single items in a list, preserves existing lists)
33+
- to SET - Converts input to a SET (creates a set from single items or collections, removing duplicates)
34+
35+
### Comparison: Value comparison nodes
36+
- Basic comparisons: equal (==), not equal (!=), greater than (>), greater than or equal (>=), less than (<), less than or equal (<=)
37+
- String comparison: StringComparison node with case-sensitive/insensitive options and various operators (==, !=, >, <, >=, <=)
38+
- Special comparisons: NumberInRange (check if a value is within specified bounds), IsNull (check if a value is null)
39+
- Container operations: CompareLength (compare the length of strings, lists, and other containers)
40+
41+
### data list: ComfyUI list manipulation nodes (for processing individual items)
42+
- Creation:
43+
- create Data List - Generic creation from any type inputs (dynamically expandable)
44+
- Type-specific creation:
45+
- create Data List from BOOLEANs - Creates a data list from Boolean values
46+
- create Data List from FLOATs - Creates a data list from floating-point values
47+
- create Data List from INTs - Creates a data list from integer values
48+
- create Data List from STRINGs - Creates a data list from string values
49+
- Modification:
50+
- append - Adds an item to the end of a data list
51+
- extend - Combines elements from multiple data lists
52+
- insert - Inserts an item at a specified position
53+
- set item - Replaces an item at a specified position
54+
- remove - Removes the first occurrence of a specified value
55+
- pop - Removes and returns an item at a specified position
56+
- pop random - Removes and returns a random element
57+
- Filtering:
58+
- filter - Filters a data list using boolean values
59+
- filter select - Separates items into two lists based on boolean filters
60+
- Access:
61+
- get item - Retrieves an item at a specified position
62+
- first - Returns the first element in a data list
63+
- last - Returns the last element in a data list
64+
- slice - Creates a subset of a data list using start/stop/step parameters
65+
- index - Finds the position of a value in a data list
66+
- contains - Checks if a data list contains a specified value
67+
- Information:
68+
- length - Returns the number of items in a data list
69+
- count - Counts occurrences of a value in a data list
70+
- Operations:
71+
- sort - Orders items (with optional reverse parameter)
72+
- reverse - Reverses the order of items
73+
- zip - Combines multiple data lists element-wise
74+
- min - Finds the minimum value in a list of numbers
75+
- max - Finds the maximum value in a list of numbers
76+
- Conversion:
77+
- convert to LIST - Converts a data list to a LIST object
78+
- convert to SET - Converts a data list to a SET (removing duplicates)
79+
80+
### DICT: Dictionary manipulation nodes
81+
- Creation: create (generic and type-specific versions), create from items (data list and LIST versions), create from lists, fromkeys
82+
- Access: get, get_multiple, keys, values, items
83+
- Modification: set, update, setdefault, merge
84+
- Removal: pop, popitem, pop random, remove
85+
- Information: length, contains_key
86+
- Operations: filter_by_keys, exclude_keys, invert, compare
87+
- Conversion: get_keys_values
88+
89+
### FLOAT: Floating-point operation nodes
90+
- Creation: create FLOAT from string
91+
- Basic arithmetic: add, subtract, multiply, divide, divide (zero safe), power
92+
- Formatting: round (to specified decimal places)
93+
- Conversion: to_hex (hexadecimal representation), from_hex (create from hex string)
94+
- Analysis: is_integer (check if float has no fractional part), as_integer_ratio (get numerator/denominator)
95+
96+
### Flow Control: Workflow control nodes
97+
- Conditional branching:
98+
- if/else - Basic conditional that returns one of two values based on a condition
99+
- if/elif/.../else - Extended conditional with multiple conditions and outcomes
100+
- Selection:
101+
- switch/case - Selects from multiple options based on an integer index
102+
- flow select - Directs a value to either "true" or "false" output path based on a condition
103+
- Execution control:
104+
- force execution order - Coordinates the execution sequence of nodes in a workflow
105+
106+
### INT: Integer operation nodes
107+
- Creation: create INT (from string), create INT with base (convert string with specified base)
108+
- Basic arithmetic: add, subtract, multiply, divide, divide (zero safe), modulus, power
109+
- Bit operations: bit_length (bits needed to represent number), bit_count (count of 1 bits)
110+
- Byte conversion: to_bytes (convert integer to bytes), from_bytes (convert bytes to integer)
111+
112+
### LIST: Python list manipulation nodes (as a single variable)
113+
- Creation: create LIST (generic), create from type-specific values (BOOLEANs, FLOATs, INTs, STRINGs)
114+
- Modification: append, extend, insert, remove, pop, pop random, set_item
115+
- Access: get_item, first, last, slice, index, contains
116+
- Information: length, count
117+
- Operations: sort (with optional reverse), reverse, min, max
118+
- Conversion: convert to data list, convert to SET
119+
120+
### Math: Mathematical operations
121+
- Trigonometric functions:
122+
- Basic: sin, cos, tan - Calculate sine, cosine, and tangent of angles (in degrees or radians)
123+
- Inverse: asin, acos, atan - Calculate inverse sine, cosine, and tangent (returns degrees or radians)
124+
- Special: atan2 - Calculate arc tangent of y/x with correct quadrant handling
125+
- Logarithmic/Exponential functions:
126+
- log - Natural logarithm (base e) with optional custom base
127+
- log10 - Base-10 logarithm
128+
- exp - Exponential function (e^x)
129+
- sqrt - Square root
130+
- Constants:
131+
- pi - Mathematical constant π (3.14159...)
132+
- e - Mathematical constant e (2.71828...)
133+
- Angle conversion:
134+
- degrees - Convert radians to degrees
135+
- radians - Convert degrees to radians
136+
- Rounding operations:
137+
- floor - Return largest integer less than or equal to input
138+
- ceil - Return smallest integer greater than or equal to input
139+
- Min/Max functions:
140+
- min - Return minimum of two values
141+
- max - Return maximum of two values
142+
- Other:
143+
- abs - Absolute value (magnitude without sign)
144+
145+
### path: File system path manipulation nodes
146+
- Basic operations:
147+
- join - Joins multiple path components intelligently with correct separators
148+
- split - Splits a path into directory and filename components
149+
- splitext - Splits a path into name and extension components
150+
- basename - Extracts the filename component from a path
151+
- dirname - Extracts the directory component from a path
152+
- normalize - Collapses redundant separators and resolves up-level references
153+
- Path information:
154+
- abspath - Returns the absolute (full) path by resolving relative components
155+
- exists - Checks if a path exists in the filesystem
156+
- is_file - Checks if a path points to a regular file
157+
- is_dir - Checks if a path points to a directory
158+
- is_absolute - Checks if a path is absolute (begins at root directory)
159+
- get_size - Returns the size of a file in bytes
160+
- get_extension - Extracts the file extension from a path (including the dot)
161+
- Directory operations:
162+
- list_dir - Lists files and directories in a specified path with filtering options
163+
- get_cwd - Returns the current working directory
164+
- Path searching:
165+
- glob - Finds paths matching a pattern with wildcard support
166+
- common_prefix - Finds the longest common leading component of given paths
167+
- Path conversions:
168+
- relative - Computes a relative path from a start path to a target path
169+
- expand_vars - Replaces environment variables in a path with their values
170+
171+
### SET: Python set manipulation nodes (as a single variable)
172+
- Creation:
173+
- create SET - Generic creation from any type inputs (dynamically expandable)
174+
- Type-specific creation:
175+
- create SET from BOOLEANs - Creates a set from Boolean values
176+
- create SET from FLOATs - Creates a set from floating-point values
177+
- create SET from INTs - Creates a set from integer values
178+
- create SET from STRINGs - Creates a set from string values
179+
- Modification:
180+
- add - Adds an item to a set
181+
- remove - Removes an item from a set (raises error if not present)
182+
- discard - Removes an item if present (no error if missing)
183+
- pop - Removes and returns an arbitrary element
184+
- pop random - Removes and returns a random element
185+
- Information:
186+
- length - Returns the number of items in a set
187+
- contains - Checks if a set contains a specified value
188+
- Set operations:
189+
- union - Combines elements from multiple sets
190+
- intersection - Returns elements common to all input sets
191+
- difference - Returns elements in first set but not in second set
192+
- symmetric_difference - Returns elements in either set but not in both
193+
- Set comparison:
194+
- is_subset - Checks if first set is a subset of second set
195+
- is_superset - Checks if first set is a superset of second set
196+
- is_disjoint - Checks if two sets have no common elements
197+
- Conversion:
198+
- convert to data list - Converts a SET to a ComfyUI data list
199+
- convert to LIST - Converts a SET to a LIST
200+
201+
### STRING: String manipulation nodes
202+
Available nodes grouped by functionality:
203+
204+
#### Text case conversion
205+
- capitalize - Converts first character to uppercase, rest to lowercase
206+
- casefold - Aggressive lowercase for case-insensitive comparisons
207+
- lower - Converts string to lowercase
208+
- swapcase - Swaps case of all characters
209+
- title - Converts string to titlecase
210+
- upper - Converts string to uppercase
211+
212+
#### Text inspection and validation
213+
- contains (in) - Checks if string contains a substring
214+
- endswith - Checks if string ends with a specific suffix
215+
- find - Finds first occurrence of a substring
216+
- length - Returns the number of characters in the string
217+
- rfind - Finds last occurrence of a substring
218+
- startswith - Checks if string starts with a specific prefix
219+
220+
#### Character type checking
221+
- isalnum - Checks if all characters are alphanumeric
222+
- isalpha - Checks if all characters are alphabetic
223+
- isascii - Checks if all characters are ASCII
224+
- isdecimal - Checks if all characters are decimal
225+
- isdigit - Checks if all characters are digits
226+
- isidentifier - Checks if string is a valid Python identifier
227+
- islower - Checks if all characters are lowercase
228+
- isnumeric - Checks if all characters are numeric
229+
- isprintable - Checks if all characters are printable
230+
- isspace - Checks if all characters are whitespace
231+
- istitle - Checks if string is titlecased
232+
- isupper - Checks if all characters are uppercase
233+
234+
#### Text formatting and alignment
235+
- center - Centers text within specified width
236+
- expandtabs - Replaces tabs with spaces
237+
- ljust - Left-aligns text within specified width
238+
- rjust - Right-aligns text within specified width
239+
- zfill - Pads string with zeros on the left
240+
241+
#### Text splitting and joining
242+
- join (from data list) - Joins strings from a data list
243+
- join (from LIST) - Joins strings from a LIST
244+
- rsplit (from data list) - Splits string from right into a data list
245+
- rsplit (from LIST) - Splits string from right into a LIST
246+
- split (to data list) - Splits string into a data list
247+
- split (to LIST) - Splits string into a LIST
248+
- splitlines (from data list) - Splits string at line boundaries into a data list
249+
- splitlines (to LIST) - Splits string at line boundaries into a LIST
250+
251+
#### Text modification
252+
- concat - Combines two strings together
253+
- count - Counts occurrences of a substring
254+
- replace - Replaces occurrences of a substring
255+
- strip - Removes leading and trailing characters
256+
- lstrip - Removes leading characters
257+
- rstrip - Removes trailing characters
258+
- removeprefix - Removes prefix if present
259+
- removesuffix - Removes suffix if present
260+
261+
#### Encoding and escaping
262+
- decode - Converts bytes-like string to text
263+
- encode - Converts string to bytes
264+
- escape - Converts special characters to escape sequences
265+
- unescape - Converts escape sequences to actual characters
266+
- format_map - Formats string using values from dictionary
98267

99268
## Understanding LIST vs. data list vs. SET
100269

101270
ComfyUI has different data types that serve different purposes:
102271

103-
### 1. LIST datatype
272+
### 1. data list
273+
- A native ComfyUI list where **items are processed individually**
274+
- Acts like a standard array/list in most programming contexts
275+
- Items can be accessed individually by compatible nodes
276+
- Supports built-in ComfyUI iteration over each item
277+
- Best for:
278+
- Working directly with multiple items in parallel
279+
- Batch processing scenarios
280+
- When you need to apply the same operation to multiple inputs
281+
- When your operation needs to work with individual items separately
282+
283+
### 2. LIST datatype
104284
- A Python list represented as a **single variable** in the workflow
105285
- Treated as a self-contained object that can be passed between nodes
106286
- Cannot directly connect to nodes that expect individual items
@@ -110,7 +290,7 @@ ComfyUI has different data types that serve different purposes:
110290
- Passing collections between different parts of your workflow
111291
- Complex data storage that shouldn't be split apart
112292

113-
### 2. SET datatype
293+
### 3. SET datatype
114294
- A Python set represented as a **single variable** in the workflow
115295
- Stores unique values with no duplicates
116296
- Supports mathematical set operations (union, intersection, etc.)
@@ -120,23 +300,6 @@ ComfyUI has different data types that serve different purposes:
120300
- Set operations (union, difference, etc.)
121301
- When element order doesn't matter
122302

123-
### 3. data list
124-
- A native ComfyUI list where **items are processed individually**
125-
- Acts like a standard array/list in most programming contexts
126-
- Items can be accessed individually by compatible nodes
127-
- Supports built-in ComfyUI iteration over each item
128-
- Best for:
129-
- Working directly with multiple items in parallel
130-
- Batch processing scenarios
131-
- When you need to apply the same operation to multiple inputs
132-
- When your operation needs to work with individual items separately
133-
134-
### Converting between types
135-
- Use `convert to data list` node to transform a LIST or SET into a ComfyUI data list
136-
- Use `convert to LIST` node to transform a ComfyUI data list into a LIST object
137-
- Use `LIST to SET` to convert a LIST to a SET (removing duplicates)
138-
- Use `SET to LIST` to convert a SET to a LIST
139-
140303
### When to use which type
141304
- Use **LIST** when you need:
142305
- Ordered collection with potential duplicates

0 commit comments

Comments
 (0)