#7878th of 89 in Image and video
comfyui-to-python-extension
Exports ComfyUI node workflows as standalone runnable Python scripts
- Stars
- 2.4k
- License
- MIT
- Last commit
- Apr 2026
- Last release
- Mar 2026
- Language
- Python
2,293 on 25 Apr 20262,394 on 14 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
A ComfyUI custom node that adds File -> Save As Script to the web UI, downloading the current workflow as a .py file. A CLI (python -m comfyui_to_python) also converts workflows saved in API-format JSON, with a configurable queue size. Generated scripts still need a working ComfyUI install and accept ComfyUI memory flags such as --lowvram and --cpu.
Who it is for: ComfyUI users who want to run or automate workflows as Python scripts
Strengths
- Adds Save As Script to the ComfyUI File menu, plus a CLI for API-format JSON
- Generated scripts accept ComfyUI flags like --highvram, --lowvram, --cpu and --disable-smart-memory
- Images saved by UI-exported scripts reopen in ComfyUI with the original workflow metadata
- Cleans up models and cache after each run; optional unload via COMFYUI_TOPYTHON_UNLOAD_MODELS=1
Weaknesses
- Generated scripts need a full ComfyUI runtime, including torch, to run
- Requires Python 3.12 or newer, installed into the interpreter that launches ComfyUI
- Workflow inputs are not exposed as command-line arguments in the exported script
- Scripts are single-shot runners with no prompt or result caching across repeated calls
What it needs
- GPU optional
- Needs ComfyUI, Python 3.12+, uv, torch
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Also in Image and video
See all 89| Rank | Project | Score |
|---|---|---|
| 1 | frigateLocal NVR with realtime object detection for IP cameras | 93 out of 100 |
| 2 | MoneyPrinterTurboGenerates short videos from a topic, with script, footage, voiceover and subtitles | 88 out of 100 |
| 3 | toonflow-appInfinite-canvas tool for AI short drama and comic video production | 88 out of 100 |
| #4 | InvokeAIWeb UI for diffusion image generation with inpainting canvas and node workflows | 87 out of 100 |
| #5 | ComfyUINode-graph editor for running diffusion image, video, audio and 3D workflows | 85 out of 100 |