pydn/ComfyUI-to-Python-Extension
A powerful tool that translates ComfyUI visual workflows into executable Python code for automation and repeatable generation.
Core Features
Quick Start
uv run python -m comfyui_to_python --input_file workflow_api.json --output_file workflow_api.pyDetailed Introduction
This project serves as a crucial bridge, seamlessly connecting the intuitive visual node-based workflow design within ComfyUI with the power of programmatic execution. By intelligently translating intricate ComfyUI graphs into clean, executable Python code, it empowers users to significantly enhance their productivity. This enables robust automation of repetitive tasks, facilitates systematic experimentation with various parameters, and ensures highly repeatable content generation, all without the need for tedious manual recreation. Offering both a convenient Web UI extension for immediate, direct export and a robust Command Line Interface (CLI) for efficient batch processing, this tool fundamentally streamlines the transition from visual prototyping to scalable, script-driven operations, unlocking new levels of control and efficiency for ComfyUI users.