feat(mcp-image-gen): add test suite (19 tests) and Lumen profile pictures

This commit is contained in:
Patrick Plate
2026-04-04 14:09:11 +02:00
parent f24aafec69
commit 64c0a62b49
8 changed files with 31 additions and 10 deletions
+5 -2
View File
@@ -40,7 +40,9 @@ class ComfyUIClient:
async def queue_prompt(self, workflow: dict) -> str:
"""Submit a workflow to ComfyUI and return the prompt_id."""
payload = {"prompt": workflow}
# Strip internal metadata keys (e.g. "_meta") — they are not ComfyUI nodes
clean_workflow = {k: v for k, v in workflow.items() if not k.startswith("_")}
payload = {"prompt": clean_workflow}
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.post(f"{self.base_url}/api/prompt", json=payload)
resp.raise_for_status()
@@ -115,7 +117,8 @@ def build_flux_workflow(
wf["27"]["inputs"]["height"] = height
wf["13"]["inputs"]["steps"] = steps
wf["13"]["inputs"]["seed"] = actual_seed
wf["30"]["inputs"]["ckpt_name"] = model
# Node 32 = UNETLoader (flux1-schnell.safetensors is UNet-only, not all-in-one checkpoint)
wf["32"]["inputs"]["unet_name"] = model
# Attach the actual seed as metadata so callers can retrieve it
wf["_meta"] = {"actual_seed": actual_seed}