Diffusers-workflow is a declarative engine built on top of Hugging Face Diffusers that allows large language model agents to author, validate, run, and inspect image or video pipelines using JSON documents rather than Python scripts. It exposes an MCP server with approximately 50 tools as the primary interface, enabling unattended agent control over GPU resources.

  • The system includes a `validate_workflow` tool that checks schema and pipeline signatures without loading models to catch errors early.
  • Costly operations like running workflows or downloading models require an explicit `acknowledged_cost=true` flag to prevent unauthorized spending.
  • Workflows are defined as lists of named steps with variable references, making them composable, git-diffable, and repeatable with cached results.
  • The engine supports various quantization methods, cache accelerators, LoRA, IP-Adapter, and hardware backends like CUDA, MPS, and CPU.

This approach allows agents to manage multi-stage generation tasks, such as chaining text-to-image to video pipelines, while ensuring resource safety and reproducibility.