ꘇ livecode
Write p5, GLSL or Three.js and get an IMAGE out of it
- image
- controls
- image
The most interesting node in the pack, and the most fragile
ꘇ livecode is a code editor in a Comfy node that renders in your browser and hands the result back to the graph as an IMAGE. Thirteen languages: p5, glsl, three, tixy, playcore, strudel, manim, markdown, latex, html, svg, orca, hyperframes.
So you can write a generative sketch, a shader, a Three.js scene or a Tixy one-liner, feed it an upstream image, and pipe the frames into the rest of your Comfy pipeline - with a Comfy-style parameter panel driving it. That's a genuinely different thing from anything in core ComfyUI, and it's the node that explains why the pack exists. The KB's frontend history is full of tools that wanted to be the whole application; this one instead drops a handful of other creative runtimes inside Comfy's graph as sources.
It's also the node that will break on you if you queue from anywhere other than an open browser window. More on that below.
How it works, and why that matters
Look at the shipped implementation and the shape is clear: the backend node sends a message over the websocket to a specific client and then waits for that browser to render and send an image back. There's a request ID, a future, and a 30-second timeout. If there's no client attached, it fails immediately with Keep the Comfy workflow open in a browser to render Livecode. If the render doesn't come back in time: Livecode render timed out. Keep this workflow open and check the node status.
Two consequences, and both are the kind of thing that makes people file bugs:
- You cannot run this headless. API queueing, a background job, a scheduled run with the tab closed - none of it renders. The node needs a live browser session.
- Frames come from whichever client queued the workflow. This is a rendering surface, not an inference node. Treat its output as "what my browser drew", not as a deterministic value.
The upside of that architecture is that it's fast and it's interactive. auto_update on and the sketch re-renders as you type; Cmd/Ctrl+Enter runs, Cmd/Ctrl+. stops and keeps the last frame.
Inputs and outputs
language- the combo above, defaultp5.width/height- INT, 64 to 4096, default 512. Tooltips confirm the mapping: these arewindowWidth/windowHeightin p5 and__.render.width/__.render.heightin the render API.auto_update- BOOLEAN, default on.code- the socketless editor widget, prefilled with a working p5 sketch so a fresh node does something.parameters- a JSON object widget,{}by default. This is your parameter panel: declare values here, read them from the sketch. Malformed JSON in it fails the node withLivecode parameters must be an object.image- optional IMAGE, exposed to your code asinputImagein p5,__.imagegenerally, andu_imagein GLSL. This is the piece that makes Livecode usable as a processing stage rather than just a source.controls- an autogrow input (up to 64) accepting FLOAT, INT, BOOLEAN or STRING, so a CHOP'svalueoutput or a primitive can drive a declared parameter live.performance- optional STRING, a JSON performance block.
One output: image, the rendered frame.
Install
Genereti only. Manager → search Genereti (liuboto) → install → restart → refresh the browser. The renderer is a vendored browser bundle that ships with the pack, so there's no npm step and no separate server. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/languel/genereti.git genereti
cd ..
./.venv/bin/python -m pip install -r custom_nodes/genereti/requirements.txt
Use ComfyUI's interpreter (.venv on a checkout, python_embeded\python.exe on Portable). Requirements: one line, comfyui-frontend-package>=1.53.6. No models. The GPU texture end of this pack wants WebGPU in your browser, and ComfyUI 0.38.2+ / Python 3.11+ are the floors; the reference platform is macOS/Apple Silicon, with Windows/Linux flagged as less tested.
Gotchas
- Browser required, every single time. Say it once more for the people coming from API workflows.
- A locked tab can time out. Browsers throttle background tabs; if your render loop starves, you get the 30-second timeout rather than a wrong image.
parametersmust be a JSON object.[]or a bare number is rejected.- Big canvases cost. 4096 works, but the frame has to travel back through the websocket as an image - keep
width/heightat graph scale unless you need otherwise. - Super alpha. The README's own warning, verbatim in spirit: early classroom testing, back up workflows before updating, expect changing interfaces. There is no Reddit discussion of this pack to fall back on - the bundled tutorials under Workflows → Genereti are your best documentation.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| language | COMBO | p5 | 13 options: p5, glsl, three, tixy, playcore, strudel, +7 |
| width | INT | 51264–4096 | Render width; windowWidth in p5 and __.render.width |
| height | INT | 51264–4096 | Render height; windowHeight in p5 and __.render.height |
| auto_update | BOOLEAN | true | — |
| code | STRING | function setup(){createCanvas(windowWidth,windowHeight);background(245)}function draw(){stroke(random(255));line(random(width),random(height),random(width),random(height));if(mouseIsPressed){noStroke();fill(random(255));circle(mouseX,mouseY,dist(mouseX,mouseY,pmouseX,pmouseY))}} | — |
| parameters | STRING | {} | — |
| imageopt | IMAGE | Available as inputImage / __.image / u_image in code | |
| controlsopt | COMFY_AUTOGROW_V3 | — | |
| performanceopt | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |