Use upstream precompiled Qwen AOTI runtime while preserving MCP tools

#5
by evalstate HF Staff - opened
MCP Tools org

Port the runtime setup from the currently RUNNING original linoyts/Qwen-Image-Edit-Angles, while preserving this Space's MCP API and UI.

Changes:

  • Load precompiled blocks via spaces.aoti_blocks_load(pipe.transformer, "zerogpu-aoti/Qwen-Image", variant="fa3"), matching upstream, instead of running local startup AOTI compilation and manually installing a FlashAttention processor.
  • Match upstream's torch==2.8 requirement. TorchAO is not added: the active upstream initialization no longer imports its optimization helper.
  • Return the generated seed as an integer, matching the declared MCP return type and Gradio slider.

Preserved: Gradio 6.26.0, mcp_server=True, existing function signatures/docstrings, current tool/UI bindings, model and LoRA choices. No secrets, hardware settings, video features, or third-party UI scripts changed.

Validation:

  • Python source compilation passed.
  • AST comparison confirms unchanged MCP function arguments and documentation.
  • Dependency metadata resolution for Python 3.10 including Gradio 6.26.0 and spaces succeeded: torch 2.8.0, torchvision 0.23.0, spaces 0.51.3, peft 0.20.0, transformers 5.16.1. This is a resolver check, not a reproduction of the platform's installation or proof of runtime import compatibility.

Not yet verified: target clean build, AOTI artifact compatibility with the assigned GPU, or real image inference. The original is RUNNING, but that alone is not proof these artifacts work on every ZeroGPU allocation. After merge, verify the MCP schema and a nonzero-angle image request before calling this recovered.

evalstate changed pull request status to merged

Sign up or log in to comment