Nodes/comfyui-mixlab-nodes/P5 Input ♾️Mixlab for test
ComfyUI Node Runs on cloud

P5 Input ♾️Mixlab for test

P5 Input — Piping a p5.js Sketch Into ComfyUI

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
P5 Input ♾️Mixlab for test
  • frames
  • frames

Read the display name carefully: "P5 Input ♾️Mixlab for test." That last bit isn't a typo or a translation artifact - it's the author telling you straight up that this one is experimental. Keep that in mind before you build anything you care about around it.

What it actually does is genuinely interesting, though. p5.js is a popular JavaScript library for creative coding - generative art, real-time visuals, interactive canvas sketches, the kind of thing you see in browser-based demoscene and live-visuals communities. This node bridges that world into ComfyUI: the README lists it under "added p5.js as an input node," with example workflows for both a static and a video-style p5 pipeline. The idea is that instead of loading a static file, you write or load a p5.js sketch that renders live in the browser, and its rendered canvas frames get captured and piped into ComfyUI as actual IMAGE data your workflow can process further - feed it into img2img, a ControlNet preprocessor, or Mixlab's own live-output-to-background feature for a TouchDesigner-style setup.

The schema reflects that it's a bridge, not a generator: the only input is frames, typed IMAGEBASE64 - the browser-side p5 canvas is captured and handed over as base64-encoded image data, similar in spirit to how Load And Combined Audio receives its AUDIOBASE64 input from Mixlab's own front-end widgets rather than a standard file loader. The output, frames, comes back as a proper ComfyUI IMAGE. One detail worth knowing: this node is flagged is_output_node: true in its own schema, which in ComfyUI terms means it's treated as an endpoint the graph will always execute, even if nothing downstream is consuming its output - typical for nodes tied to live front-end capture rather than pure data transformation.

Worth being honest about where this sits in the broader ecosystem: p5.js-in-ComfyUI isn't unique to Mixlab. Other, more actively maintained tools cover the same creative-coding niche - dedicated bridges that combine GLSL shaders and p5.js support with a full code editor have picked up real community traction and positive reception specifically for this use case. If real-time generative-art-into-ComfyUI is what you're after and P5 Input's "for test" status gives you pause, it's worth knowing you're not stuck with just this one option - this corner of the ecosystem has other players worth a look.

Install is the standard Mixlab path. Through ComfyUI Manager: search "comfyui-mixlab-nodes," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git
cd comfyui-mixlab-nodes
install.bat

or pip3 install -r requirements.txt in a venv, or the embedded-python pip call on a portable build. No separate model download - this is a browser-capture bridge, not an inference node - but given its "for test" labeling, expect rough edges: front-end JS bridges like this are exactly the kind of feature that breaks first when ComfyUI's own frontend gets updated, since they depend on hooking into internals rather than a stable public API. If it stops working after updating ComfyUI itself, that's a more likely explanation than a problem with your sketch.

Category♾️Mixlab/Input

Inputs (1)

NameTypeDefaultDescription
framesIMAGEBASE64

Outputs (1)

NameTypeDescription
framesIMAGE