← mxjxn.com

The Glitch Pipeline

An image manipulation playground running entirely on Farcaster.

Reply to any cast with a command and get back a glitched, distorted, or entirely generated image. No apps, no uploads, no friction. Just words on a timeline.

How it works

Mention @suchbot with a command. The webhook parses it, downloads attached images (or generates new ones), runs them through a pipeline of effects, and posts the result back to the thread.

Everything runs on a single server. No external image APIs, no cloud GPU inference for effects — just raw pixel manipulation in Node.js with sharp. The only external call is to an image generation model when you use generate.

@suchbot generate cosmic void | kaleidoscope::8 | posterize::3

Effects

There are 17 built-in effects, split between color manipulation and geometry:

Color

  • rgb-shift
  • pixel-sort
  • posterize
  • invert
  • colorswap
  • noise
  • dither
  • halftone

Geometry

  • kaleidoscope
  • lens-distortion
  • pixelate
  • wave
  • swirl
  • barrel
  • spherical
  • globe
  • slice

Each effect has its own parameter space. Some are simple — posterize takes a levels count. Others are deep — lens-distortion has 5 sub-modes with chromatic aberration, radius, frequency, and falloff. The kaleidoscope alone has segments, zoom, rotation, angle offsets, source panning, and source rotation.

Pipelines

The real power is chaining effects with pipes. Each pipe feeds the output of one step into the next. You can stack as many as you want.

@suchbot >>
generate dark forest
mask {:mode noise :scale 0.02}
kaleidoscope {:segments 6 :zoom 1.5}
rgb-shift {:masked true :shift 25}

There's also parallel blending — run multiple independent pipelines and composite them together with blend modes like screen, multiply, overlay, difference, and more:

[plasma | swirl] [grid | invert]::screen

Masking

This is where it gets interesting. Masks let you apply effects to specific regions of an image while leaving the rest untouched. There are 7 mask modes:

saturation luminosity color radial noise edges blocks spiral grid circles stripes hexgrid ring diamond waves crosshatch

Set a mask, apply effects with {:masked true}, then clear it. You can layer multiple masks with different effects on the same image:

mask {:mode blocks :count 5}
kaleidoscope {:masked true :segments 6}
mask clear
mask {:mode noise :scale 0.02}
dither {:masked true}

That gives you kaleidoscope in geometric block regions and dither in organic noise regions, on the same image, in a single command.

AI-powered steps

On top of the local effects, the pipeline includes AI-powered steps:

  • generate — text-to-image via Flux (Schnell or Dev). Create something from nothing and pipe it into effects.
  • img2img — transform an existing image with a text prompt. Supports SDXL via fal.ai and ControlNet for structure-preserving edits.
  • inpaint — AI inpainting within a masked region. Paint out parts of an image and fill them with something new, guided by a text prompt.

These steps cost credits (the local effects are free). The system estimates cost before running and deducts after completion.

Remix

Remix pulls images from the conversation thread — parent casts, the thread root, or quoted casts. Inject them mid-pipeline to glitch something someone else posted:

@suchbot remix | posterize | invert

You can target specific images: remix quote grabs from a quoted cast, remix root from the thread root, and remix last(2) gets the second image from the parent.

The bare glitch

When you just say @suchbot glitch with no effects specified, it doesn't apply a random pile. It generates a structured composition: a randomized mask, a color effect within the mask, a second mask with a different mode, and a distortion effect. Each cast gets a unique seed so the same image glitched twice produces different results.

Presets

There are 126 presets across all effects — curated parameter combinations that hit specific aesthetics. Syntax is effect/preset:

channel-shift/diagonal
duotone/cyber
kaleidoscope/star
datamosh/bleed
dither/atkinson

Preset params merge first, then your custom {:} params override them. So you can use a preset as a starting point and tweak from there.

Reference & docs

Full parameter documentation for every effect, mask mode, source generator, and blend mode — including the pipeline syntax, EDN params, and all the presets:

bot.mxjxn.com/glitch →