#!/usr/bin/env python3 """ Debug script - check ComfyUI API response """ import requests import json COMFYUI_URL = "http://127.0.0.1:8000" print("=" * 70) print("🔍 ComfyUI API Debug") print("=" * 70) # Check system stats try: response = requests.get(f"{COMFYUI_URL}/system_stats") print(f"✅ System Stats: {response.status_code}") print(json.dumps(response.json(), indent=2)) except Exception as e: print(f"❌ System Stats Error: {e}") print("\n" + "=" * 70) # Try minimal workflow minimal_workflow = { "prompt": { "3": { "inputs": { "seed": 123, "steps": 20, "cfg": 7.0, "sampler_name": "euler", "scheduler": "normal", "denoise": 1, "model": ["4", 0], "positive": ["6", 0], "negative": ["7", 0], "latent_image": ["5", 0] }, "class_type": "KSampler" }, "4": { "inputs": { "ckpt_name": "sd_xl_base_1.0.safetensors" }, "class_type": "CheckpointLoaderSimple" }, "5": { "inputs": { "width": 128, "height": 128, "batch_size": 1 }, "class_type": "EmptyLatentImage" }, "6": { "inputs": { "text": "test cow sprite", "clip": ["4", 1] }, "class_type": "CLIPTextEncode" }, "7": { "inputs": { "text": "bad quality", "clip": ["4", 1] }, "class_type": "CLIPTextEncode" }, "8": { "inputs": { "samples": ["3", 0], "vae": ["4", 2] }, "class_type": "VAEDecode" }, "9": { "inputs": { "filename_prefix": "test", "images": ["8", 0] }, "class_type": "SaveImage" } } } print("🚀 Testing prompt queue...") try: response = requests.post( f"{COMFYUI_URL}/prompt", json=minimal_workflow ) print(f"Status Code: {response.status_code}") print(f"Response: {response.text}") if response.status_code == 200: print(f"JSON: {json.dumps(response.json(), indent=2)}") except Exception as e: print(f"❌ Error: {e}")