82 lines
1.7 KiB
Bash
82 lines
1.7 KiB
Bash
#!/bin/bash
|
|
# Test 3: Same prompt, different seed
|
|
COMFY="http://localhost:8188"
|
|
|
|
WORKFLOW='{
|
|
"1": {
|
|
"class_type": "CLIPLoaderGGUF",
|
|
"inputs": {
|
|
"clip_name": "Qwen_3_4b-Q8_0.gguf",
|
|
"type": "lumina2"
|
|
}
|
|
},
|
|
"2": {
|
|
"class_type": "CLIPTextEncode",
|
|
"inputs": {
|
|
"text": "a beautiful landscape with mountains and a lake, photorealistic",
|
|
"clip": ["1", 0]
|
|
}
|
|
},
|
|
"3": {
|
|
"class_type": "CLIPTextEncode",
|
|
"inputs": {
|
|
"text": "",
|
|
"clip": ["1", 0]
|
|
}
|
|
},
|
|
"4": {
|
|
"class_type": "UnetLoaderGGUF",
|
|
"inputs": {
|
|
"unet_name": "z_image_turbo-Q5_K_S.gguf"
|
|
}
|
|
},
|
|
"5": {
|
|
"class_type": "EmptyLatentImage",
|
|
"inputs": {
|
|
"width": 256,
|
|
"height": 256,
|
|
"batch_size": 1
|
|
}
|
|
},
|
|
"6": {
|
|
"class_type": "KSampler",
|
|
"inputs": {
|
|
"seed": 99999,
|
|
"steps": 4,
|
|
"cfg": 2.0,
|
|
"sampler_name": "euler",
|
|
"scheduler": "normal",
|
|
"denoise": 1.0,
|
|
"model": ["4", 0],
|
|
"positive": ["2", 0],
|
|
"negative": ["3", 0],
|
|
"latent_image": ["5", 0]
|
|
}
|
|
},
|
|
"7": {
|
|
"class_type": "VAELoader",
|
|
"inputs": {
|
|
"vae_name": "ae.safetensors"
|
|
}
|
|
},
|
|
"8": {
|
|
"class_type": "VAEDecode",
|
|
"inputs": {
|
|
"samples": ["6", 0],
|
|
"vae": ["7", 0]
|
|
}
|
|
},
|
|
"9": {
|
|
"class_type": "SaveImage",
|
|
"inputs": {
|
|
"filename_prefix": "bc250_landscape",
|
|
"images": ["8", 0]
|
|
}
|
|
}
|
|
}'
|
|
|
|
echo "Test 3: Landscape..."
|
|
curl -s -X POST "$COMFY/api/prompt" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"prompt\": $WORKFLOW}" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Prompt ID:', d.get('prompt_id','NONE'))"
|