A version of ComfyUI-to-Python-Extension that works as a custom node. Adds a button in the UI that saves the current workflow as a Python file, a CLI for converting workflows, and slightly better custom node support.
https://github.com/atmaranto/ComfyUI-SaveAsScript
git clone https://github.com/atmaranto/ComfyUI-SaveAsScript
comfy node install ComfyUI-SaveAsScript