The gap between building an AI image workflow and actually shipping it to users just got narrower. A new tutorial walks through converting Nathan Shipley’s Flux[dev] Redux + Flux[dev] Depth ComfyUI workflow — the one behind those striking optical illusion images — into a standalone Gradio application deployable on Hugging Face Spaces ZeroGPU for free. The process hinges on Peyton DeNiro’s ComfyUI-to-Python-Extension, which exports any node-based workflow into a pure Python script without needing to fire up Comfy’s interface. Install it through the Custom Nodes Manager, disable the new menu in settings, hit Save as Script, and you’ve got portable code.
From there, the tutorial gets tactical. You wrap the exported script in a Gradio interface, exposing only the parameters that make sense for end users. For the Flux workflow, that means a prompt field, a structure image input, a style image input, and two sliders: depth strength (0-50, default 15) and style strength (0-1, default 0.5). The generate button wires those inputs to a generate_image function that replaces the script’s original main() call. The author notes that LLMs like ChatGPT or Claude can scaffold a basic Gradio app from the exported script, but you’ll still need to correct the wiring yourself.
The ZeroGPU angle is what makes this genuinely practical. Hugging Face’s serverless GPU infrastructure means the app runs without a dedicated instance, scaling to zero when idle — no monthly bill for a demo you built in an afternoon. That’s a meaningful shift from the traditional deployment model where shipping a ComfyUI workflow meant either paying for a GPU server or convincing users to install Comfy themselves. The author teases an end-to-end workflow-to-app tool coming in early 2025, which would eliminate even the coding step. Until then, this tutorial is a solid blueprint for turning a weekend experiment into something you can actually share.