Skip to content

Commit 2451124

Browse files
authored
Merge pull request #18 from StableLlama/load_nodes
Load nodes
2 parents d9163fe + 8bbb237 commit 2451124

File tree

5 files changed

+762
-4
lines changed

5 files changed

+762
-4
lines changed

.github/workflows/build-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install .[dev]
29+
pip install .[dev] numpy torch pillow
3030
- name: Run Linting
3131
run: |
3232
ruff check .

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ These nodes are very lightweight and require no additional dependencies.
173173
- Path conversions:
174174
- relative - Computes a relative path from a start path to a target path
175175
- expand_vars - Replaces environment variables in a path with their values
176+
- File loading:
177+
- load STRING from file - Loads a text file and returns its content as a STRING
178+
- load IMAGE from file (RGB) - Loads an image and returns RGB channels as a tensor
179+
- load IMAGE+MASK from file (RGBA) - Loads an image and returns RGB channels as a tensor and alpha channel as a mask
180+
- load MASK from alpha channel - Loads an image and extracts its alpha channel as a mask
181+
- load MASK from greyscale/red - Loads an image and creates a mask from its greyscale or red channel
182+
- File saving:
183+
- save STRING to file - Saves a string to a text file with optional directory creation
184+
- save IMAGE to file - Saves an image tensor to a file in various formats (PNG, JPG, WEBP, JXL)
185+
- save IMAGE+MASK to file - Saves an image with transparency using a mask as the alpha channel
176186

177187
### SET: Python set manipulation nodes (as a single variable)
178188
- Creation:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "basic_data_handling"
7-
version = "0.4.3"
7+
version = "0.4.4"
88
description = """Basic Python functions for manipulating data that every programmer is used to, lightweight with no additional dependencies.
99
1010
Supported data types:
@@ -20,7 +20,7 @@ Feature categories:
2020
- Mathematical operations
2121
- Mathematical formula node in a safe implementation
2222
- String manipulation
23-
- File system path handling
23+
- File system path handling, including STRING, IMAGE and MASK load and save
2424
- SET operations"""
2525
authors = [
2626
{name = "StableLlama"}

0 commit comments

Comments
 (0)