Extensions/Network Bending for ComfyUI
ComfyUI Extension

Network Bending for ComfyUI

A custom node pack for ComfyUI that enables creative manipulation and 'bending' of neural network models. Perform various operations on loaded model checkpoints to create unique and experimental effects.

By DavidPiazza·Created about a year ago·Updated 9 months ago· 0
DavidPiazza/network_bending
Nodes18
On cloudLocal install
Categoryaudio/analysis, audio/latent
Stars0
Updated9 months ago

Nodes (18)

Audio Feature Extractor

The node that turns a waveform into something you can wire into a visual effect

audio/analysis
Audio Latent Blend

Audio Latent Blend is deprecated — here's what it did and what replaced it

audio/latent
Audio Latent Guidance

Steer an audio diffusion model toward a reference sound

audio/conditioning
Audio Latent Interpolate

Morph one sound into another in the latent space

audio/latent
Audio Latent Manipulator

An effects rack for audio latents, not audio files

audio/latent
Audio Reference Encoder

Turn up to four reference tracks into one steerable latent

audio/reference
Audio Style Transfer

Put the texture of one sound onto another

audio/style
Audio VAE Decode

Bring an audio latent back to a waveform you can hear

audio/latent
Audio VAE Encode

The front door to the audio latent space

audio/latent
Inverted Pruning

Prune the wrong weights on purpose

network_bending
Latent Format Converter

The bridge between image latents and audio latents

network_bending
Model Mixer

Merge two checkpoints without leaving your workflow

network_bending
Network Bending

The 'break it on purpose' node that started this pack

network_bending
Network Bending (Advanced)

The advanced node that's honest about being unfinished

network_bending
VAE Channel Manipulator

Rearrange the channels of a latent like they're audio faders

network_bending/vae
VAE Latent Bending

Corrupt the latent itself, leave the model alone

network_bending/vae
VAE Mixer

Blend two VAEs like you'd blend two checkpoints

network_bending/vae
VAE Network Bending

Surgery on the VAE itself, not the images it produces

network_bending/vae
Readme

Network Bending for ComfyUI

A custom node pack for ComfyUI that enables the creative manipulation of generative models. Allows you to corrupt, modify, and blend neural networks.

Features

  • Add Noise: Inject Gaussian noise into model weights
  • Scale Weights: Scale model weights up or down to amplify or dampen features
  • Prune Weights: Remove small weights for sparsification
  • Randomize Weights: Replace portions of weights with random values
  • Smooth Weights: Apply spatial smoothing to weight matrices
  • Quantize Weights: Reduce weight precision to discrete levels
  • Layer Swap: Swap weights between similar layers
  • Activation Replace: Replace activation functions
  • Weight Transpose: Transpose weight matrices
  • Channel Shuffle: Randomly shuffle channels in convolutional layers
  • Frequency Filter: Apply frequency domain filtering
  • Weight Clustering: Group similar weights together

Mix two models together with various blending modes:

  • Linear Interpolation: Simple weighted average of weights
  • Weighted Sum: Weighted sum with normalization
  • Layer-wise Mix: Different mix ratios for different layers
  • Frequency Blend: Mix models in frequency domain
  • Random Mix: Randomly select weights from either model

Audio Processing Nodes

The package also includes comprehensive audio processing capabilities for Stable Audio models:

Audio VAE Nodes

  • Audio VAE Encode: Encode audio waveforms into latent space
  • Audio VAE Decode: Decode latent representations back to audio

Audio Latent Manipulation

  • Audio Latent Interpolate: Smoothly interpolate between audio latents
  • Audio Latent Blend: Blend multiple audio latents with various modes
  • Audio Latent Manipulator: Direct manipulation of audio latent features
  • Audio Feature Extractor: Extract specific features from audio latents

Audio Style Transfer

  • Audio Style Transfer: Transfer style from one audio to another
  • Audio Latent Guidance: Guide generation with reference audio
  • Audio Reference Encoder: Encode reference audio for style transfer

Installation

Basic Installation

  1. Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/DavidPiazza/network_bending.git
  1. Restart ComfyUI

Audio Network Bending

  1. Load an audio model (e.g., Stable Audio VAE)
  2. Add audio processing nodes from the network_bending/audio category
  3. Connect audio inputs either from file loaders or generated audio
  4. Apply bending operations to the audio latents
  5. Decode back to audio using Audio VAE Decode

Cross-Modal Bending

Apply image model bending techniques to audio models or vice versa for experimental results.

License

This project is licensed under the GNU General Public License v3 (GPL-3.0) - see the LICENSE file for details.