Bernini Run Single GPU
The node that actually runs Bernini
- bernini_config
- bernini_case
- generation_args
- output_path
- case_json
- command
- log
This is the centerpiece of the pack, and the reason the other Bernini nodes exist. Bernini is a 14B renderer with its own Python 3.11 / CUDA 12.4 requirements, and bolting that onto ComfyUI's environment is a recipe for a broken install. Bernini Run Single GPU sidesteps the whole mess: it launches the upstream infer_single_gpu.py in a subprocess, streams the logs into your console, and lets ComfyUI keep running normally even if Bernini's dependencies aren't installed in ComfyUI's Python at all.
How it works
The node assembles a command - your configured Python, the repo's infer_single_gpu.py, --config, --case, and every generation flag - writes the case to a temporary JSON file, runs it with a timeout, and reaps the process if it hangs. Relative output paths are resolved under ComfyUI's output directory, output folders are created automatically, and a small progress bar ticks in the corner. It's the Kijai/WanVideoWrapper philosophy applied to a CLI script.
Prefer the typed inputs
Three optional inputs override the wall of fallback widgets:
- bernini_config (from Bernini Model Config) - repo path, Python, config dir, checkpoints, env vars.
- bernini_case (from Bernini Case Builder) - prompt, task type, guidance mode, media paths, output.
- generation_args (from Bernini Generation Settings) - frames, size, steps, seed, omegas, eta.
Connect all three and you can ignore most of the widgets. The fallback widgets exist so you can test a one-off prompt without building the whole graph.
The controls worth knowing
- dry_run - builds the full command and case but doesn't execute it. This is the most useful toggle in the node: it's how you verify your paths and flags before committing to a 30-minute render. Do this every time you change something.
- timeout_seconds - default 1800. Hung processes get killed and reaped instead of piling up.
- use_prompt_enhancer - passes
--use_pe, which needsBERNINI_PE_API_KEYin the env (set it in Bernini Model Config'senv_json). - negative_prompt / system_prompt - optional extra conditioning passed as CLI flags.
- extra_args - raw CLI flags for upstream options not yet exposed; shlex-split with Windows handling.
- show_preview - for image outputs inside ComfyUI's output dir, returns UI preview metadata so the result appears in the node.
Outputs
- output_path (STRING) - where the file landed. For
.png/.jpg/.webpresults, feed it to Bernini Load Output Image to get a real IMAGE tensor. For.mp4, keep the path for video helpers. - case_json (STRING) - the exact case that was run.
- command (STRING) - the exact command line, quoted and shell-safe. Invaluable when a render fails: you can run it by hand in the Bernini environment and see the real error.
- log (STRING) - the streamed subprocess output.
Gotchas
- The repo must exist - if
infer_single_gpu.pyis missing you get a clear "clone ByteDance/Bernini first" error, not a traceback. - Editing is slow by design: Bernini is Wan-2.2-derived, and the source video you're editing is part of the model input, so compute is roughly double a plain Wan generation. On consumer GPUs, budget accordingly (a single 3090 was reported around 55–60 s/it at 480×832/101 frames).
- The two-checkpoint rule follows you here too:
high_noise_ckpt/low_noise_ckptmust be set together.
Installing this node
One of the 16 nodes in the lzits Nodes pack (Lior Zitser, MIT). Install via ComfyUI Manager (search "lzits Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/lzitser23/lzits-nodes.git
Restart ComfyUI. The pack itself needs no Bernini Python deps, but you still need the upstream pieces: clone bytedance/Bernini, download ByteDance/Bernini-R-Diffusers (a real download), and have a Python 3.11 CUDA 12.4 environment. The Bernini Setup Commands node prints the exact commands.
Inputs (36)
| Name | Type | Default | Description |
|---|---|---|---|
| bernini_repo_dir | STRING | /root/Bernini | Fallback if bernini_config is not connected. |
| python_executable | STRING | /usr/bin/python | Fallback if bernini_config is not connected. |
| config | STRING | /root/Bernini-R-Diffusers | Fallback if bernini_config is not connected. |
| high_noise_ckpt | STRING | Optional fallback if bernini_config is not connected. | |
| low_noise_ckpt | STRING | Optional fallback if bernini_config is not connected. | |
| prompt | STRING | A cinematic shot of a marble statue coming to life. | — |
| task_type | COMBO | t2i | 7 options: t2i, i2i, t2v, v2v, rv2v, r2v, +1 |
| guidance_mode | COMBO | t2v | 7 options: rv2v, v2v, v2v_chain, t2v, r2v_apg, v2v_apg, +1 |
| output_path | STRING | outputs/bernini_output.png | — |
| num_frames | INT | 11–241 | — |
| width | INT | 84864–2048 | — |
| height | INT | 48064–2048 | — |
| num_inference_steps | INT | 401–100 | — |
| seed | INT | 420–2147483647 | — |
| timeout_seconds | INT | 180060–86400 | — |
| bernini_configopt | BERNINI_CONFIG | From Bernini Model Config. Overrides repo/python/config/checkpoint widgets. | |
| bernini_caseopt | BERNINI_CASE | From Bernini Case Builder. Overrides prompt/media widgets. | |
| generation_argsopt | BERNINI_GENARGS | From Bernini Generation Settings. Overrides generation widgets. | |
| case_json_overrideopt | STRING | Optional raw JSON override if not using bernini_case. | |
| image_pathopt | STRING | — | |
| video_pathsopt | STRING | — | |
| reference_imagesopt | STRING | — | |
| negative_promptopt | STRING | — | |
| system_promptopt | STRING | — | |
| max_image_sizeopt | INT | 84864–4096 | — |
| fpsopt | INT | 161–120 | — |
| flow_shiftopt | FLOAT | 5.00–20 | — |
| omega_Vopt | FLOAT | 1.250–20 | — |
| omega_Iopt | FLOAT | 4.500–20 | — |
| omega_TIopt | FLOAT | 4.000–20 | — |
| omega_scaleopt | FLOAT | 0.800–20 | — |
| etaopt | FLOAT | 0.500–1 | — |
| use_prompt_enhanceropt | BOOLEAN | false | — |
| dry_runopt | BOOLEAN | false | Build command/case but do not execute. Useful while wiring workflows. |
| extra_argsopt | STRING | Advanced: extra CLI args appended with platform-aware shlex splitting. | |
| show_previewopt | BOOLEAN | true | For image outputs inside ComfyUI/output, return UI preview metadata. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |
| case_json | STRING | — |
| command | STRING | — |
| log | STRING | — |