How to rebuild AUTOMATIC1111 with Gradio Workflow and cut the boilerplate out of AI pipelines
Hugging Face rebuilt the stable-diffusion-webui feature set into a single 73-node graph. I show what changes for those building image pipelines in Brazil, with starter code, REST endpoints, and free MCP.

On September 10, 2026, the Gradio team published Workflow1111, a rebuild of most of the AUTOMATIC1111/stable-diffusion-webui feature set using gr.Workflow. The number that stands out: eleven media pipelines built with 73 nodes on a single canvas, running with no GPU of its own because model calls go out to Inference Providers and Spaces.
For those building AI and design tooling in Brazil, the point isn't "just another A1111 clone." It's the pitch that you describe the graph in plain Python and get a visual canvas, typed REST endpoints, and MCP tools without writing a single route. I'll break down how it works, what changes in your code, and where I'd be wary before putting it into production.
The four operator types (and why that matters)
The whole canvas is built with just four node types, and understanding this is understanding the entire mental model:
| Operator | What it is | Where it runs | |---|---|---| | fn | Common Python function | In your own process, no network | | model | Call via InferenceClient | Inference Providers | | space | Another Gradio Space on the Hub | The Space's hardware | | dataset | A row from a Hub dataset | Hub |
The practical consequence is strong: of the app's 36 operator nodes, 32 are fn and 22 run entirely in-process, with no network call. In other words, about two-thirds of the canvas keeps working if you lose your connection, and you can test these functions directly in pytest, with no canvas, server, or GPU. This is the opposite of ComfyUI's custom node model, where logic stays locked to the graph runtime.
Each node wraps an operator, and the operator's inputs/outputs become the ports where you connect edges. An LLM and a diffusion model are the two common model operators on the same canvas, with no custom node in between.
The smallest possible Workflow
Workflow1111 has 73 nodes, but it started with this, and this is where I'd start:
import gradio as gr
def your_function(text: str) -> str:
pass
gr.Workflow(bind=[your_function]).launch()The rule is: bind= turns your functions into nodes, edges= connects the nodes, and .launch() opens the canvas in your browser so you can keep editing visually. Once it's ready, gradio deploy pushes everything to a Space. This is the code-first loop with visual editing that the source describes, and it's the detail that sets this apart from a purely drag-and-drop editor.
How A1111's classic pipelines were remapped
The original text walks through the canvas pipeline by pipeline, and it's worth seeing how each familiar A1111 tab became a graph:
- Text-to-image: the prompt goes through an
fn(a prompt-builder that applies the style preset and cleans up the text), goes to amodelthat calls the checkpoint via Inference Providers, and a post-processingfnwrites the generation parameters into the output PNG's metadata. - Hi-res fix: instead of upscaling plus a second denoising pass, here it's a two-node detour that sends the result to a
FLUX.1-Kontextwith the instruction"enhance fine detail and micro-texture, keep the composition identical". - Interrogate: where A1111 used CLIP, here a VLM (
Qwen2.5-VL) writes the prompt that would have generated the image, and in parallel a ViT classifier returns labels (in the example:restaurant 51.9%,tobacco shop 15.6%,toyshop 9.1%). - Detection to inpaint mask: A1111 forces you to paint the mask by hand. Here, DETR finds the objects (in the example photo, three people, a dog, a bicycle, and a car) and the graph splits into two branches, one drawing the boxes and the other generating the mask, all locally with Pillow and NumPy.
- Annotators (ControlNet): Canny, line art, sketch, luma-depth, and posterize are pure NumPy
fns, with no model behind them, and each takes about half a second on CPU in the example.
Where the free parallelism comes from
This is the detail the community highlighted in the post's comments, and I agree it's the most interesting part for anyone who has already suffered through manual orchestration.
The part that stands out the most is how the graph structure gives you parallelism for free (the prompt-matrix and interrogate examples) with no extra orchestration code.
>
-- Comment on the Hugging Face post
Since gr.Workflow has no loop operator, the prompt matrix places four text-to-image nodes side by side on the canvas. Because they sit at the same dependency depth, the four run in parallel and all four images start generating at once. The same applies to interrogate: the VLM and the ViT classifier share the same image input, so they run together and you get both answers in roughly the time it takes for one. You didn't write asyncio.gather or manage a queue, the graph inferred it from the topology.
What I think changes the most: REST and MCP with no glue
Here's the point that justifies looking at this even if you don't use Stable Diffusion. Every output node becomes a typed REST endpoint, with no hand-written route. Workflow1111 exposes nine: /image, /edited_image, /generated_prompt, /recovered_prompt, /detected_objects, /x_y_grid, /upscaled_local, /annotator_map, and /png_info.
Calling it from code looks like this:
from gradio_client import Client
client = Client("ysharma/Workflow1111", oauth_token="hf_...")
image, params, hires = client.predict(
"a red fox in a snowy pine forest", # Prompt
"", # Negative prompt
"Cinematic", # Style preset
"enhance fine detail", # Hires refine instruction
api_name="/image",
)And the same endpoints become MCP tools. Just launch with mcp_server=True and each output node shows up as a tool that an assistant can call. The config to point Claude Code, Cursor, or any MCP client:
{
"mcpServers": {
"workflow1111": {
"url": "https://ysharma-workflow1111.hf.space/gradio_api/mcp/",
"headers": { "X-HF-Token": "hf_..." }
}
}
}A security detail I like: each caller sends its own token in the X-HF-Token header, so the Space stores no credentials at all. For anyone building an agent that needs to generate an image, read a prompt back, or run detection as steps in a larger task, this removes the glue-code layer that usually clogs up this kind of project.
Running on your own GPU
In the default setup, every model call goes to third-party hardware, which is why Workflow1111 can run without its own GPU. But an fn is just Python, so it can load a local checkpoint and run on your card. The source cites the app FastVideo/fastvideo-fasth3-preview, which runs FastH3 (a four-step distillation of MiniMax-H3) on ZeroGPU, boiled down to a bound function:
@spaces.GPU(duration=get_duration, size=GPU_SIZE)
def _generate(prompt_embeds, text_token_tags, height, width, num_frames, seed):
...
gr.Workflow(bind={"generate": generate, "status": status}).launch()gr.Workflow doesn't need to know that ZeroGPU allocates and releases the GPU on demand: it just calls the fn. Point bind= at a function that loads a local checkpoint, run .launch() on your own machine, and the canvas starts driving your GPU.
Where I'd be wary before production
The honest comparison is with ComfyUI, not with A1111 (which only donated the feature list). For a good chunk of what you'd want to ship, gr.Workflow covers the same ground with a clear advantage: custom-node flexibility coming from plain Python, plus zero-code REST and MCP.
But there are open questions the source itself doesn't measure. One came up directly in the discussion: how far can a canvas grow before performance or maintenance become a problem, has anyone gone past 73 nodes? The post doesn't answer that, and it's exactly the question I'd ask before moving a critical pipeline there. Add to that the dependency on Inference Providers for model nodes (latency and quota are out of your control) and you have your test plan: start by duplicating Workflow1111, swap one model for a checkpoint you already use, and measure end-to-end time before deciding. The official gr.Workflow guide has the JSON schema and all the operator types.
Translated from the Brazilian Portuguese original · Read the original
Convex Agent Component: how native memory and RAG work for AI agents
Convex's official component bundles threads, persistent memory, and hybrid vector/text search for those building AI agents, without setting up a parallel vector DB stack.
