### Example Wildcard File: color.txt (Plain Text) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ZenkaiWildcardV2.md This snippet displays the content of an example `color.txt` wildcard file. Each line provides a simple, non-nested color option, demonstrating basic wildcard replacement values for the `$$color` wildcard. ```Plain Text red blue green ``` -------------------------------- ### Example Wildcard File: animal.txt (Plain Text) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ZenkaiWildcardV2.md This snippet illustrates the content of an example `animal.txt` wildcard file. Each line represents a distinct replacement option for the `$$animal` wildcard, showcasing how nested wildcards can be used by referencing `$$color`. ```Plain Text $$color dog $$color cat $$color bird ``` -------------------------------- ### Example Wildcard File Content (color.txt) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ZenkaiWildcard.md This snippet shows the content of an example wildcard file named `color.txt`. Each line represents a possible replacement option for the `$$color` wildcard in a prompt. The ZenkaiWildcard node will randomly select one of these lines to replace the wildcard token in the prompt. ```Text red blue green ``` -------------------------------- ### Example Generated Folder Path - Plain Text Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ProjectFolderPathNode.md This snippet illustrates an example of the folder path generated by the node when using its default settings. The path combines 'output' as the root, 'MyProject' as the project name, and 'images' as the subfolder, using forward slashes as the separator. ```Plain Text output/MyProject/images ``` -------------------------------- ### Installing DJZ-Nodes via Git Clone (ComfyUI) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/README.md This snippet provides the recommended method for installing the DJZ-Nodes custom node collection for ComfyUI. It involves navigating to the ComfyUI's custom_nodes directory, cloning the DJZ-Nodes repository, and then installing its Python dependencies using pip. This method ensures all required libraries are present for the nodes to function correctly. ```bash cd custom_nodes git clone https://github.com/MushroomFleet/DJZ-Nodes cd DJZ-Nodes pip install -r requirements.txt ``` -------------------------------- ### Example of Text Injection with PromptInject Node Source: https://github.com/mushroomfleet/djz-nodes/blob/main/PromptInject.md This example demonstrates how the PromptInject node modifies a given `text` by inserting an `injection` string immediately before a specified `target` phrase. The output shows the resulting prompt with the injected content, illustrating the node's automatic spacing and placement. ```Text text: "A beautiful landscape where the scene is captured in stunning detail" target: "the scene is captured" injection: "during sunset" ``` ```Text "A beautiful landscape where during sunset the scene is captured in stunning detail" ``` -------------------------------- ### Project Organization Directory Structure Example Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ProjectFilePathNode.md Illustrates the recommended hierarchical structure for organizing project files using the ComfyUI node's output. It shows how the root, project name, subfolder, and filename components combine to form a structured path. ```Text root/ ├── project_name/ │ ├── subfolder/ │ │ └── filename ``` -------------------------------- ### Creating a Pulsing Circle Visualization - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VIZ/README.md This example illustrates a simple WinampViz V2 visualization that renders a pulsing circle. It uses `numpy` for image creation and `cv2` for drawing, with the circle's radius modulated by the 'bass' audio feature from the `features` dictionary. ```Python import numpy as np import cv2 def render(features, width, height, color_palette): image = np.zeros((height, width, 3), dtype=np.uint8) center = (width // 2, height // 2) radius = int(100 * (1 + features['bass'])) color = color_palette[0] cv2.circle(image, center, radius, color, -1) return image ``` -------------------------------- ### Initializing VoiceEffects2 Node and Preparing Audio Input in Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VoiceEffects2.md This snippet demonstrates how to import the `VoiceEffects2` node and prepare a sample audio input using PyTorch. It creates a dictionary containing a random waveform and its sample rate, and specifies a preset filename for effect application. This setup is a prerequisite for processing audio with the `VoiceEffects2` node. ```Python import torch from VoiceEffects2 import VoiceEffects2 # Create a sample audio input (1 second of random noise at 44100 Hz) audio_input = { "waveform": torch.randn(1, 1, 44100), "sample_rate": 44100 } # Choose a preset from the 'voice-effects' folder preset_filename = "ethereal.py" ``` -------------------------------- ### Example UncleanSpeech Preset - Old Telephone Effect - JSON Source: https://github.com/mushroomfleet/djz-nodes/blob/main/presets/readme.md This example demonstrates a complete UncleanSpeech preset configuration designed to simulate an old telephone effect. It sets specific values for compression, frequency cuts, distortion, noise, and reverb, and includes detailed metadata describing its category, era, quality, characteristics, and technical specifications, illustrating how to create a specific audio profile. ```JSON { "name": "Old Telephone", "description": "Simulates an old telephone connection with limited bandwidth and noise", "compression_ratio": 4.0, "compression_threshold": -15.0, "low_cut": 300.0, "high_cut": 3400.0, "distortion_amount": 0.2, "noise_level": 0.05, "noise_color": "white", "reverb_amount": 0.1, "room_size": 0.3, "metadata": { "category": "Communication", "era": "1950s", "quality": "Telephone Network", "characteristics": [ "bandwidth limited", "line noise", "slight distortion" ], "technical_specs": { "frequency_response": "300Hz-3.4kHz", "dynamic_range": "~30dB" } } } ``` -------------------------------- ### Example Workflow for Wavelet Image Composition Source: https://github.com/mushroomfleet/djz-nodes/blob/main/WaveletCompose.md This conceptual workflow illustrates the typical sequence of operations when using the WaveletCompose node. An initial image is first decomposed into its frequency components using WaveletDecompose. These components can then undergo further processing or modification before being fed into the WaveletCompose node for reconstruction into the final image. ```Workflow [Image] → [WaveletDecompose] → [Your Processing] → [WaveletCompose] → [Final Image] ``` -------------------------------- ### Film Grain Effect V2: Preset Expression Examples (Python) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGrainEffect_v2.md This snippet provides examples of mathematical expressions used to define various film grain patterns within the Film Grain Effect V2 node. These expressions demonstrate how to combine random distributions (normal, uniform) with periodic functions (sin, exp) and the time variable 't' to create 'Subtle grain', 'Vintage film', and 'Unstable signal' effects. They serve as a reference for users creating custom grain patterns, illustrating the use of available functions and constants. ```python # Subtle grain 0.08 * normal(0.5, 0.15) * (1 + 0.2 * sin(t/25)) # Vintage film 0.15 * normal(0.5, 0.25) * (1 + 0.3 * sin(t/12)) + 0.05 * exp(-(t % 40)/10) # Unstable signal 0.15 * normal(0.5, 0.3) * (1 + 0.5 * sin(t/5)) + 0.1 * sin(t/3) * exp(-t/100 % 20) + 0.05 * uniform(-1, 1) * sin(t/7)**2 ``` -------------------------------- ### Defining a Custom Screensaver Class in Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ScreenGen/README.md This snippet defines the basic structure for a custom screensaver preset. It includes the constructor (__init__) to set the screensaver's name, description, and define UI-exposed parameters. It also outlines init_state for initial state setup and render for per-frame image generation, handling frame dimensions, color palettes, speed, and state management. ```Python import cv2 import numpy as np class MyCustomScreensaver: def __init__(self): self.name = "My Custom" # Name shown in the preset dropdown self.description = "Description of your screensaver" # Define parameters that will be exposed in the UI self.parameters = { "param_name": { "type": "INT", # INT, FLOAT, or STRING "default": 10, "min": 1, "max": 100, "step": 1 } # Add more parameters as needed } def init_state(self): """Return initial state for the screensaver""" return { # Add any state variables needed } def render(self, width, height, frame, colors, speed, state, params): """Render a frame of the screensaver Args: width (int): Frame width height (int): Frame height frame (int): Current frame number colors (list): List of (R,G,B) tuples for the color palette speed (float): Global speed multiplier state (dict): State from previous frame (or None for first frame) params (dict): Current parameter values Returns: tuple: (frame_image, new_state) - frame_image: numpy array of shape (height, width, 3) - new_state: Updated state dict for next frame """ if not state: state = self.init_state() # Create frame image img = np.zeros((height, width, 3), dtype=np.uint8) # Render your effect here using the parameters # ... return img, state ``` -------------------------------- ### Basic Duplicate Removal - Text Transformation Source: https://github.com/mushroomfleet/djz-nodes/blob/main/PromptDupeRemoverV2.md Demonstrates the node's core functionality: removing duplicate words from an input text while preserving punctuation and spacing. In this example, 'beautiful' is removed as a duplicate. ```Text Transformation Input Text: A beautiful beautiful girl with blue eyes and blue hair Result: A beautiful girl with blue eyes and hair ``` -------------------------------- ### Example Custom Film Grain Expression Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VideoNoiseFactory.md This mathematical expression demonstrates how to create a custom film grain pattern. It combines a normal distribution for base intensity with a sine wave to introduce periodic fluctuations over time. Variables like 't' (time) and functions such as 'normal' and 'sin' can be used to define complex grain behaviors. ```Custom Expression 0.08 * normal(0.5, 0.15) * (1 + 0.2 * sin(t/25)) ``` -------------------------------- ### Default Custom Film Weave Expression - Expression Language Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGateWeave.md This expression defines the default sinusoidal motion for custom film weave patterns. It uses the time variable 't' to generate a basic oscillating movement with a specific frequency and amplitude, serving as a starting point for user-defined animations. ```Expression Language sin(t * 0.1) * 5 ``` -------------------------------- ### Initializing and Processing Audio with VoiceEffects2 Node (Python) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VoiceEffects2.md This snippet demonstrates how to initialize the `VoiceEffects2` node and process an audio input using a specified preset file. It then prints the resulting dictionary, which contains the processed waveform, sample rate, and a file path placeholder. ```Python voice_effect_node = VoiceEffects2() result = voice_effect_node.process(audio_input, preset_filename) print(result) ``` -------------------------------- ### Implementing Custom Visualizations in Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/WinampVizV2.md This Python function signature defines the interface for custom visualization plugins. Plugins must implement this `render` function, which receives audio features, output dimensions, a color palette, and an optional state. It is expected to return a NumPy array representing the visualization frame and an updated state if persistence is required. ```Python def render(features, width, height, color_palette, state=None): """ Parameters: - features: Dict containing 'spectrum', 'waveform', 'bass', 'mids', 'highs' - width: Output image width - height: Output image height - color_palette: List of RGB tuples for visualization - state: Optional persistent state between frames Returns: - frame: numpy array of shape (height, width, 3) - state: Optional state to persist (if needed) """ ``` -------------------------------- ### Defining the WinampViz V2 Render Function - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VIZ/README.md This function is the core of a WinampViz V2 visualization, responsible for rendering a single frame. It takes audio features, dimensions, a color palette, and an optional state dictionary as input, returning an image or an image with updated state. ```Python def render(features, width, height, color_palette, state=None): """ Renders a frame of the visualization. Args: features (dict): Audio features including: - 'waveform': numpy array of raw audio samples - 'spectrum': numpy array of frequency spectrum - 'bass': float value representing bass intensity (0-1) - 'mids': float value representing mids intensity (0-1) - 'highs': float value representing highs intensity (0-1) width (int): Output image width height (int): Output image height color_palette (list): List of (R,G,B) tuples for colors state (dict, optional): State dictionary for maintaining visualization state between frames. If provided, the function should return (image, state) Returns: numpy.ndarray or tuple: RGB image of the visualization, or (image, state) tuple if state management is needed """ ``` -------------------------------- ### Using Whitelist for Term Preservation - Text Transformation Source: https://github.com/mushroomfleet/djz-nodes/blob/main/PromptDupeRemoverV2.md Illustrates how to use the 'Whitelist' parameter to prevent specific words or multi-word phrases from being removed, even if they are duplicates. Here, 'blue' and 'beautiful girl' are preserved. ```Text Transformation Input Text: A beautiful beautiful girl with blue eyes and blue hair Whitelist: blue, "beautiful girl" Result: A beautiful girl with blue eyes and blue hair ``` -------------------------------- ### Implementing State Management in WinampViz V2 Visualizations - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VIZ/README.md This snippet demonstrates how to manage persistent state across frames within a WinampViz V2 visualization. The `state` dictionary allows for maintaining variables like particle positions or animation phases between calls to the `render` function. ```Python def render(features, width, height, color_palette, state=None): if state is None: state = {'my_state_var': initial_value} # Use and update state state['my_state_var'] = new_value return image, state ``` -------------------------------- ### Configuring RetroVideoText for High-Tech Cyan Display (ComfyUI Node Configuration) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/RetroVideoText.md This configuration snippet shows how to achieve a high-tech cyan display using the RetroVideoText node. It applies a cyan text color with a strong glow, fine scanlines, and pronounced chromatic aberration, positioning the text at the top. ```ComfyUI Node Configuration - text: "INITIALIZING" - text_color: "cyan" - glow_radius: 5 - glow_intensity: 0.8 - scanline_spacing: 2 - chromatic_aberration: 3 - position: "top" ``` -------------------------------- ### UncleanSpeech Preset File Format - JSON Source: https://github.com/mushroomfleet/djz-nodes/blob/main/presets/readme.md This snippet defines the complete JSON structure for an UncleanSpeech preset file. It includes core audio processing parameters such as compression, filtering (low/high cut), distortion, noise, and reverb, along with an optional metadata object for categorization and technical specifications. This structure serves as a template for all .preset files. ```JSON { "name": "Preset Name", "description": "Description of the audio effect", "compression_ratio": 1.0, "compression_threshold": -20.0, "low_cut": 20.0, "high_cut": 20000.0, "distortion_amount": 0.0, "noise_level": 0.0, "noise_color": "white", "reverb_amount": 0.0, "room_size": 0.5, "metadata": { "category": "Category", "era": "Time period", "quality": "Quality level", "characteristics": [ "characteristic 1", "characteristic 2" ], "technical_specs": { "spec1": "value1", "spec2": "value2" } } } ``` -------------------------------- ### Defining Screensaver Parameters in Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/ScreenGen/README.md This snippet demonstrates how to define various parameter types (INT, FLOAT, STRING with choices) within the self.parameters dictionary of a screensaver class. These definitions expose configurable options to the user interface, allowing customization of the screensaver's behavior. ```Python self.parameters = { # Integer parameter "count": { "type": "INT", "default": 10, "min": 1, "max": 100, "step": 1 }, # Float parameter "speed": { "type": "FLOAT", "default": 1.0, "min": 0.1, "max": 5.0, "step": 0.1 }, # Choice parameter "mode": { "type": "STRING", "default": "mode1", "choices": ["mode1", "mode2", "mode3"] } } ``` -------------------------------- ### Configuring RetroVideoText for Classic Terminal Look (ComfyUI Node Configuration) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/RetroVideoText.md This configuration snippet demonstrates how to set up the RetroVideoText node to achieve a classic green terminal display. It specifies green text with a subtle glow and visible scanlines, positioned at the bottom of the image. ```ComfyUI Node Configuration - text: "SYSTEM READY" - text_color: "green" - glow_radius: 3 - glow_intensity: 0.5 - scanline_spacing: 3 - position: "bottom" ``` -------------------------------- ### Formatting Multi-line Text with StringWeights Node Source: https://github.com/mushroomfleet/djz-nodes/blob/main/StringWeights.md This snippet demonstrates how the StringWeights node processes multi-line input text. The node concatenates the lines with newline characters and then wraps the entire block with the specified weight, formatting the output as (text\ntext:weight). ```Text masterpiece high quality ``` ```Text (masterpiece high quality:1.2) ``` -------------------------------- ### Controlling Case Preservation - Text Transformation Source: https://github.com/mushroomfleet/djz-nodes/blob/main/PromptDupeRemoverV2.md Shows the effect of the 'Preserve Original Case' parameter. When true, original capitalization is maintained. When false, non-whitelisted words are converted to lowercase, demonstrating text normalization. ```Text Transformation Input Text: The Blue BLUE blue Bird flies With Preserve Case = True: The Blue Bird flies With Preserve Case = False: the blue bird flies ``` -------------------------------- ### Alpha Blending Formula - Pseudocode Source: https://github.com/mushroomfleet/djz-nodes/blob/main/BatchAlphaComposite.md This formula represents the standard alpha compositing calculation used to blend foreground and background pixel values based on the foreground's alpha channel. It determines the resulting pixel by weighting the foreground and background contributions according to the alpha value, where alpha=1 means full foreground and alpha=0 means full background. ```Pseudocode result = (alpha * foreground) + ((1 - alpha) * background) ``` -------------------------------- ### Configuring RetroVideoText for Vintage Amber Display (ComfyUI Node Configuration) Source: https://github.com/mushroomfleet/djz-nodes/blob/main/RetroVideoText.md This configuration snippet illustrates how to configure the RetroVideoText node for a vintage amber monitor effect. It sets the text to amber, increases glow, and adds chromatic aberration, centering the text on the image. ```ComfyUI Node Configuration - text: "LOADING..." - text_color: "amber" - glow_radius: 4 - glow_intensity: 0.7 - chromatic_aberration: 2 - position: "center" ``` -------------------------------- ### Simple Custom Film Weave Pattern - Expression Language Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGateWeave.md This basic sinusoidal expression demonstrates how to create a straightforward oscillating film weave pattern. It uses the 't' variable to generate a simple, repetitive motion, ideal for understanding the fundamentals of custom expression design. ```Expression Language sin(t) * 5 ``` -------------------------------- ### Vintage Film Weave Custom Expression - Expression Language Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGateWeave.md This complex expression is suggested for simulating vintage projection effects. It combines two sinusoidal waves with different frequencies and amplitudes, creating a more varied and less predictable motion pattern typical of older or less stable projectors. ```Expression Language sin(t * 1.2) * 4 + sin(t * 0.4) * 2 ``` -------------------------------- ### Simple Oscillation Custom Expression - Mathematical Expression Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VideoVignettingV1.md This expression creates a simple sinusoidal oscillation for temporal variation. It uses the 't' variable, representing time, to produce a smooth, repeating change in the vignette effect. The amplitude of the oscillation is scaled by 0.3. ```Mathematical Expression sin(t) * 0.3 ``` -------------------------------- ### Decay Pattern Custom Expression - Mathematical Expression Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VideoVignettingV1.md This expression creates a decaying pattern for temporal variation, where the effect diminishes over time within each cycle. It uses the exponential function and the modulo operator to simulate a periodic decay. The amplitude of the decay is scaled by 0.3. ```Mathematical Expression exp(-t % 1) * 0.3 ``` -------------------------------- ### Random-like Custom Film Weave Pattern - Expression Language Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGateWeave.md This expression generates a more unpredictable, 'random-like' film weave pattern by modulating a sine wave's amplitude with another sine wave. It's useful for simulating subtle irregularities and organic variations in the projection movement, mimicking real-world imperfections. ```Expression Language sin(t) * (3 + sin(t * 2) * 2) ``` -------------------------------- ### Smooth Sinusoidal Variation - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/CathodeRayEffect.md This expression creates a smooth, sinusoidal variation in effect intensity over time. The variable 't' represents the current frame index, and the sine function modulates the intensity, resulting in a gentle pulsing effect. ```Python sin(t/10) * 0.1 + 0.2 ``` -------------------------------- ### Gradual Decay Effect - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/CathodeRayEffect.md This expression creates a gradual decay effect, where the intensity of the CRT simulation diminishes over time. It ensures the intensity does not fall below a minimum value of 0.2, simulating a worn-out or failing display. ```Python max(0.2, 1 - t/100) ``` -------------------------------- ### Complex Custom Film Weave Pattern - Expression Language Source: https://github.com/mushroomfleet/djz-nodes/blob/main/FilmGateWeave.md This expression illustrates a more intricate film weave pattern by combining sine and cosine functions with different frequencies and amplitudes. It allows for the creation of richer, non-uniform movements, providing greater control over the simulated film motion. ```Expression Language sin(t * 1.5) * 4 + cos(t * 0.7) * 2 ``` -------------------------------- ### Random Fluctuations - Python Source: https://github.com/mushroomfleet/djz-nodes/blob/main/CathodeRayEffect.md This expression generates random fluctuations in effect intensity. It uses a random number generator to introduce unpredictable variations, simulating screen interference or an unstable CRT display. ```Python random() * 0.3 + 0.7 ``` -------------------------------- ### Complex Oscillation Custom Expression - Mathematical Expression Source: https://github.com/mushroomfleet/djz-nodes/blob/main/VideoVignettingV1.md This expression generates a more complex, multi-frequency oscillation pattern for temporal variation. It combines two sinusoidal functions with different frequencies, resulting in a richer and less predictable dynamic effect. The overall amplitude is scaled by 0.2. ```Mathematical Expression sin(t) * sin(t * 2) * 0.2 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.