Skip to content

Commit

Permalink
docs for gradient map
Browse files Browse the repository at this point in the history
node list updated
version up
  • Loading branch information
Amorano committed Jul 14, 2024
1 parent b53458b commit 22e12f5
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 66 deletions.
2 changes: 2 additions & 0 deletions core/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def run(self, **kw) -> Tuple[torch.Tensor, torch.Tensor]:
full_text = parse_param(kw, Lexicon.STRING, EnumConvertType.STRING, "")
font_idx = parse_param(kw, Lexicon.FONT, EnumConvertType.STRING, self.FONT_NAMES[0])
autosize = parse_param(kw, Lexicon.AUTOSIZE, EnumConvertType.BOOLEAN, False)
print(kw[Lexicon.LETTER])
letter = parse_param(kw, Lexicon.LETTER, EnumConvertType.BOOLEAN, False)
color = parse_param(kw, Lexicon.RGBA_A, EnumConvertType.VEC4INT, [(255,255,255,255)], 0, 255)
matte = parse_param(kw, Lexicon.MATTE, EnumConvertType.VEC3INT, [(0,0,0)], 0, 255)
Expand Down Expand Up @@ -423,6 +424,7 @@ def run(self, **kw) -> Tuple[torch.Tensor, torch.Tensor]:
edge = EnumEdge[edge]
full_text = str(full_text)

print(letter, autosize)
if letter:
full_text = full_text.replace('\n', '')
if autosize:
Expand Down
66 changes: 33 additions & 33 deletions node_list.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{
"ADJUST (JOV) \ud83d\udd78\ufe0f": "Enhance and modify images with various effects using the Adjust Node",
"AKASHIC (JOV) \ud83d\udcd3": "The Akashic node processes input data and prepares it for visualization",
"ADJUST (JOV) \ud83d\udd78\ufe0f": "Enhance and modify images with various effects such as blurring, sharpening, color tweaks, and edge detection",
"AKASHIC (JOV) \ud83d\udcd3": "Visualize data",
"ARRAY (JOV) \ud83d\udcda": "Processes a batch of data based on the selected mode, such as merging, picking, slicing, random selection, or indexing",
"BLEND (JOV) \u2697\ufe0f": "Combines two input images using various blending modes, such as normal, screen, multiply, overlay, etc",
"COLOR BLIND (JOV) \ud83d\udc41\u200d\ud83d\udde8": "Use the Color Blind Node to simulate color blindness effects on images",
"BLEND (JOV) \u2697\ufe0f": "Combine two input images using various blending modes, such as normal, screen, multiply, overlay, etc",
"COLOR BLIND (JOV) \ud83d\udc41\u200d\ud83d\udde8": "Simulate color blindness effects on images",
"COLOR MATCH (JOV) \ud83d\udc9e": "Adjust the color scheme of one image to match another with the Color Match Node",
"COLOR THEORY (JOV) \ud83d\udede": "Apply various color harmony schemes to an input image using the Color Theory Node, generating multiple color variants based on the selected scheme",
"COMPARISON (JOV) \ud83d\udd75\ud83c\udffd": "The Comparison node evaluates two inputs based on a specified operation",
"CONSTANT (JOV) \ud83d\udfea": "The Constant node generates constant images or masks of a specified size and color",
"COLOR THEORY (JOV) \ud83d\udede": "Generate a color harmony based on the selected scheme",
"COMPARISON (JOV) \ud83d\udd75\ud83c\udffd": "Evaluates two inputs (A and B) with a specified comparison operators and optional values for successful and failed comparisons",
"CONSTANT (JOV) \ud83d\udfea": "Generate a constant image or mask of a specified size and color",
"CROP (JOV) \u2702\ufe0f": "Extract a portion of an input image or resize it",
"DELAY (JOV) \u270b\ud83c\udffd": "Delay node used to introduce pauses in the workflow",
"EXPORT (JOV) \ud83d\udcfd": "The Export node is responsible for saving images or animations to disk",
"DELAY (JOV) \u270b\ud83c\udffd": "Introduce pauses in the workflow that accept an optional input to pass through and a timer parameter to specify the duration of the delay",
"EXPORT (JOV) \ud83d\udcfd": "Responsible for saving images or animations to disk",
"FILTER MASK (JOV) \ud83e\udd3f": "Create masks based on specific color ranges within an image",
"FLATTEN (JOV) \u2b07\ufe0f": "Combine multiple input images into a single image by summing their pixel values",
"GLSL (JOV) \ud83c\udf69": "The GLSL Node executes custom GLSL (OpenGL Shading Language) fragment shaders to generate images or apply effects",
"GRADIENT MAP (JOV) \ud83c\uddf2\ud83c\uddfa": "Remaps an input image using a gradient lookup table (LUT) to allow precise control over color mapping by applying the gradient to the input image",
"GRAPH (JOV) \ud83d\udcc8": "The Graph node visualizes a series of data points over time",
"LERP (JOV) \ud83d\udd30": "The Lerp Node calculates linear interpolation between two values or vectors based on a blending factor (alpha)",
"MIDI FILTER (JOV) \u2733\ufe0f": "The MIDI Filter node provides advanced filtering capabilities for MIDI messages based on various criteria, including MIDI mode (such as note on or note off), MIDI channel, control number, note number, value, and normalized value",
"MIDI FILTER EZ (JOV) \u2747\ufe0f": "The MIDI Filter EZ node allows you to filter MIDI messages based on various criteria, including MIDI mode (such as note on or note off), MIDI channel, control number, note number, value, and normalized value",
"MIDI MESSAGE (JOV) \ud83c\udf9b\ufe0f": "The MIDI Message node processes MIDI messages received from an external MIDI controller or device",
"MIDI READER (JOV) \ud83c\udfb9": "The MIDI Reader node captures MIDI messages from an external MIDI device or controller",
"OP BINARY (JOV) \ud83c\udf1f": "The Binary Operation node executes binary operations like addition, subtraction, multiplication, division, and bitwise operations on input values, supporting various data types and vector sizes",
"OP UNARY (JOV) \ud83c\udfb2": "The Unary Operation node performs unary operations like absolute value, mean, median, mode, magnitude, normalization, maximum, or minimum on input values",
"GLSL (JOV) \ud83c\udf69": "Execute custom GLSL (OpenGL Shading Language) fragment shaders to generate images or apply effects",
"GRADIENT MAP (JOV) \ud83c\uddf2\ud83c\uddfa": "Remaps an input image using a gradient lookup table (LUT)",
"GRAPH (JOV) \ud83d\udcc8": "Visualize a series of data points over time",
"LERP (JOV) \ud83d\udd30": "Calculate linear interpolation between two values or vectors based on a blending factor (alpha)",
"MIDI FILTER (JOV) \u2733\ufe0f": "Provides advanced filtering capabilities for MIDI messages based on various criteria, including MIDI mode (such as note on or note off), MIDI channel, control number, note number, value, and normalized value",
"MIDI FILTER EZ (JOV) \u2747\ufe0f": "Filter MIDI messages based on various criteria, including MIDI mode (such as note on or note off), MIDI channel, control number, note number, value, and normalized value",
"MIDI MESSAGE (JOV) \ud83c\udf9b\ufe0f": "Processes MIDI messages received from an external MIDI controller or device",
"MIDI READER (JOV) \ud83c\udfb9": "Captures MIDI messages from an external MIDI device or controller",
"OP BINARY (JOV) \ud83c\udf1f": "Execute binary operations like addition, subtraction, multiplication, division, and bitwise operations on input values, supporting various data types and vector sizes",
"OP UNARY (JOV) \ud83c\udfb2": "Perform single function operations like absolute value, mean, median, mode, magnitude, normalization, maximum, or minimum on input values",
"PIXEL MERGE (JOV) \ud83e\udec2": "Combines individual color channels (red, green, blue) along with an optional mask channel to create a composite image",
"PIXEL SPLIT (JOV) \ud83d\udc94": "Takes an input image and splits it into its individual color channels (red, green, blue), along with a mask channel",
"PIXEL SWAP (JOV) \ud83d\udd03": "Swap pixel values between two input images based on specified channel swizzle operations",
"QUEUE (JOV) \ud83d\uddc3": "The Queue node manages a queue of items, such as file paths or data",
"QUEUE (JOV) \ud83d\uddc3": "Manage a queue of items, such as file paths or data",
"ROUTE (JOV) \ud83d\ude8c": "Routes the input data from the optional input ports to the output port, preserving the order of inputs",
"SAVE OUTPUT (JOV) \ud83d\udcbe": "Save the output image along with its metadata to the specified path",
"SHAPE GEN (JOV) \u2728": "The Shape Generation node creates images representing various shapes such as circles, squares, rectangles, ellipses, and polygons",
"SPOUT WRITER (JOV) \ud83c\udfa5": "The Spout Writer node sends frames to a specified Spout receiver application for real-time video sharing",
"SHAPE GEN (JOV) \u2728": "Create n-sided polygons",
"SPOUT WRITER (JOV) \ud83c\udfa5": "Sends frames to a specified Spout receiver application for real-time video sharing",
"STACK (JOV) \u2795": "Merge multiple input images into a single composite image by stacking them along a specified axis",
"STEREOGRAM (JOV) \ud83d\udcfb": "The Stereogram node creates stereograms, generating 3D images from 2D input",
"STEREOSCOPIC (JOV) \ud83d\udd76\ufe0f": "The Stereoscopic node simulates depth perception in images by generating stereoscopic views",
"STREAM READER (JOV) \ud83d\udcfa": "The Stream Reader node captures frames from various sources such as URLs, cameras, monitors, windows, or Spout streams",
"STREAM WRITER (JOV) \ud83c\udf9e\ufe0f": "The Stream Writer node sends frames to a specified route, typically for live streaming or recording purposes",
"SWIZZLE (JOV) \ud83d\ude35": "The Swap Node swaps components between two vectors based on specified swizzle patterns and values",
"TEXT GEN (JOV) \ud83d\udcdd": "The Text Generation node generates images containing text based on user-defined parameters such as font, size, alignment, color, and position",
"THRESHOLD (JOV) \ud83d\udcc9": "Use the Threshold Node to define a range and apply it to an image for segmentation and feature extraction",
"TICK (JOV) \u23f1": "The `Tick` node acts as a timer and frame counter, emitting pulses or signals based on time intervals or BPM settings",
"TRANSFORM (JOV) \ud83c\udfdd\ufe0f": "Applies various geometric transformations to images, including translation, rotation, scaling, mirroring, tiling, perspective projection, and more",
"VALUE (JOV) \ud83e\uddec": "The Value Node supplies raw or default values for various data types, supporting vector input with components for X, Y, Z, and W",
"WAVE GEN (JOV) \ud83c\udf0a": "The `Wave Generator` node produces waveforms like sine, square, or sawtooth with adjustable frequency, amplitude, phase, and offset",
"STEREOGRAM (JOV) \ud83d\udcfb": "Generates false perception 3D images from 2D input",
"STEREOSCOPIC (JOV) \ud83d\udd76\ufe0f": "Simulates depth perception in images by generating stereoscopic views",
"STREAM READER (JOV) \ud83d\udcfa": "Capture frames from various sources such as URLs, cameras, monitors, windows, or Spout streams",
"STREAM WRITER (JOV) \ud83c\udf9e\ufe0f": "Sends frames to a specified route, typically for live streaming or recording purposes",
"SWIZZLE (JOV) \ud83d\ude35": "Swap components between two vectors based on specified swizzle patterns and values",
"TEXT GEN (JOV) \ud83d\udcdd": "Generates images containing text based on parameters such as font, size, alignment, color, and position",
"THRESHOLD (JOV) \ud83d\udcc9": "Define a range and apply it to an image for segmentation and feature extraction",
"TICK (JOV) \u23f1": "A timer and frame counter, emitting pulses or signals based on time intervals",
"TRANSFORM (JOV) \ud83c\udfdd\ufe0f": "Apply various geometric transformations to images, including translation, rotation, scaling, mirroring, tiling and perspective projection",
"VALUE (JOV) \ud83e\uddec": "Supplies raw or default values for various data types, supporting vector input with components for X, Y, Z, and W",
"WAVE GEN (JOV) \ud83c\udf0a": "Produce waveforms like sine, square, or sawtooth with adjustable frequency, amplitude, phase, and offset",
"WAVE GRAPH (JOV) \u25b6 \u0131l\u0131\u0131l\u0131": "The Wave Graph node visualizes audio waveforms as bars"
}
49 changes: 23 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
[project]
name = "jovimetrix"
description = "Compose like Substance Designer. Webcams, Media Streams (in/out), Tick animation, Color correction, Geometry manipulation, Pixel shader, Polygonal shape generator, Remap images gometry and color, Heavily inspired by WAS and MTB Node Suites."
version = "1.2.1"
description = "Integrates Webcam, MIDI, Spout and GLSL shader support. Animation via tick. Parameter manipulation with wave generator. Math operations with Unary and Binary support. Value converstion for all major types (int, string, list, dict, Image, Mask). Shape mask generation, image stacking and channel ops, batch splitting, merging and randomizing, load images and video from anywhere, dynamic bus routing with a single node, export support for GIPHY, save output anywhere! flatten, crop, transform; check colorblindness, make stereogram or stereoscopic images, or liner interpolate values and more."
version = "1.2.2"
license = "MIT"
dependencies = [
"aenum<4,>=3.1.15",
"blendmodes>=2024.1",
"numpy>=1.26.4",
"matplotlib>=3.8.3",
"opencv-contrib-python>=4.9.0.80",
"ffmpeg-python>=0.2.0",
"librosa>=0.10.2",
"loguru>=0.7.2",
"moderngl>=5.10.0",
"mss>=9.0.1",
"requests>=2.31.0",
"pillow>=10.2.0",
"pywin32>=306; platform_system==\"Windows\"",
"scikit-image>=0.22.0",
"mido[ports-rtmidi]>=1.3.2",
"PyAudio>=0.2.14",
"daltonlens>=0.1.5",
"numba>=0.59.0",
"PyOpenGL>=3.1.7",
"PyOpenGL-accelerate>=3.1.7",
"glfw>=2.7.0",
"SpoutGL>=0.0.6; platform_system==\"Windows\"",
"vnoise>=0.1.0",
"stereoscopy[auto_align]>=2.0.1"
aenum>=3.1.15, <4
blendmodes>=2024.1.1
daltonlens>=0.1.5
glfw>=2.7.0
loguru>=0.7.2
matplotlib>=3.8.4
mido[ports-rtmidi]>=1.3.2
mss>=9.0.1
numba>=0.59.1
numpy>=1.26.4,<2.0.0
opencv-contrib-python>=4.10.0.82
Pillow>=10.2.0
PyOpenGL>=3.1.7
PyOpenGL-accelerate>=3.1.7
pywin32>=306; platform_system=="Windows"
requests>=2.32.3
scikit-image>=0.23.2
scikit-learn>=1.5.1
SpoutGL>=0.0.6; platform_system=="Windows"
stereoscopy[auto_align]>=2.0.1
vnoise>=0.1.0
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion sup/lexicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class Lexicon(metaclass=LexiconMeta):
@classmethod
def _parse(cls, node: dict, node_cls: object) -> dict:
name_url = node_cls.NAME.split(" (JOV)")[0]
url = name_url.replace(" ", "%20")
url = name_url.replace(" ", "-")
cat = node_cls.CATEGORY.split('/')[1]
data = {"_": f"{cat}#-{url}", "*": f"node/{name_url}/{name_url}.md", "outputs": {}}
for cat, entry in node.items():
Expand Down
10 changes: 4 additions & 6 deletions sup/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,15 @@ def parse_value(val:Any, typ:EnumConvertType, default: Any,
elif typ == EnumConvertType.STRING:
new_val = ", ".join(map(str, new_val)) if not isinstance(new_val, str) else new_val
elif typ == EnumConvertType.BOOLEAN:
ret = False
if isinstance(new_val, (torch.Tensor,)):
ret = True
new_val = True
elif isinstance(new_val, (dict,)):
ret = len(new_val.keys()) > 0
new_val = len(new_val.keys()) > 0
elif isinstance(new_val, (list, tuple,)) and len(new_val) > 0 and (nv := new_val[0]) is not None:
if isinstance(nv, (bool, str,)):
ret = bool(nv)
new_val = bool(nv)
elif isinstance(nv, (int, float,)):
ret = nv > 0
new_val = ret
new_val = nv > 0
elif typ == EnumConvertType.LATENT:
# covert image into latent
if isinstance(new_val, (torch.Tensor,)):
Expand Down

0 comments on commit 22e12f5

Please sign in to comment.