Model Bending (ComfyUI)
Ever wished you could tinker with the insides of an AI model?
Model bending refers to manipulating a model's activations (the numbers it generates as input passes through it) at specific points during generation. It’s a low-level kind of control that is useful for creating experimental variations on an output, or for testing out, breaking, or tinkering with models.
This is an example of bending a layer in the middle of an SDXL-tubo model by adding -10 to 30.
You can try it through this interactive demo:
https://diffusion-bending-demo.netlify.app/
The demo uses pre-computed results to demonstrate the concept. But you can run it on your own model in the node-based environment of ComfyUI by following installing a plugin from this page: https://github.com/abuzreq/ComfyUI-Model-Bending
The term bending itself originates in the practices of circuit bending of electronic devices, which was introduced into GAN models by Terrance Broad. In fact, the Layer Transformation in Autolume is a form of model bending for GAN models!
You can learn more about the approach from an arts/explainability lens through this talk: https://www.youtube.com/watch?v=7YDn__R-IbE or by reading the accompanying paper at https://arxiv.org/abs/2508.07183
This is an example of bending different layers in a Stable Diffusion 1.4 model with different multiplication values. All results are produces with the prompt “Analog portrait of a person.”
Happy bending!
Credits:
Ahmed Abuzuraiq