Doomplayer commited on
Commit
5fbdbc7
·
verified ·
1 Parent(s): 3178f02

Add Qwen-Image-2.1 on RTX 5060 Ti: 2026-09-21 (cu128) and 2026-09-22 (cu130 rerun)

Browse files

Two sessions, 13 runs. The cu128 session's int8 ran on comfy-kitchen's eager path (ComfyUI's own cu130 warning is in its log); the cu130 rerun is the one to use for int8 speed. Redacted: Windows user, host, GPU UUID, build-machine path. No generated images; third-party workflow sources stripped.

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +2 -0
  2. runs.csv +13 -0
  3. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/README.md +57 -0
  4. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/README-harness.md +30 -0
  5. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/attempts.jsonl +16 -0
  6. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/comfyui_log.jsonl +563 -0
  7. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/config.json +356 -0
  8. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/environment_20260921T194127Z.json +460 -0
  9. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/events.jsonl +11 -0
  10. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/README.md +424 -0
  11. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/RUN_qwen-image-2-1_2026-09-21.md +93 -0
  12. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/comfy_measure.py +1202 -0
  13. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/krea-2_rtx-5060-ti.json +97 -0
  14. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/minimax-h3_rtx-5060-ti.json +113 -0
  15. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/qwen-image-2-1_rtx-5060-ti.json +167 -0
  16. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/qwen3-8-27b_rtx-5060-ti.json +93 -0
  17. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/wan-2-2_rtx-5060-ti.json +121 -0
  18. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/llama_measure.py +807 -0
  19. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/__init__.py +16 -0
  20. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/comfy_api.py +182 -0
  21. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/gpu.py +371 -0
  22. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/outputs.py +157 -0
  23. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/platform_util.py +105 -0
  24. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/runner_common.py +228 -0
  25. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/schema.py +352 -0
  26. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/session.py +190 -0
  27. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/spill.py +169 -0
  28. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/ui2api.py +492 -0
  29. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/weights.py +312 -0
  30. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/workflow.py +409 -0
  31. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/run_night.py +106 -0
  32. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_llama_bench.py +51 -0
  33. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_llama_server.py +97 -0
  34. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_nvidia_smi.py +68 -0
  35. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fixtures/object_info_comfyui-0.35.0_subset.json +2433 -0
  36. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/mock_comfy.py +401 -0
  37. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/test_selftest.py +732 -0
  38. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tools/build_workflows.py +149 -0
  39. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/build.json +36 -0
  40. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/build.qwen-image-2-1.json +29 -0
  41. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/krea-2_turbo-fp8_alperkts.api.json +126 -0
  42. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/krea-2_turbo-fp8_alperkts.provenance.json +39 -0
  43. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/minimax-h3_t2v_turbo-branch-pruned.api.json +313 -0
  44. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/minimax-h3_t2v_turbo-branch-pruned.provenance.json +76 -0
  45. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json +137 -0
  46. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.provenance.json +52 -0
  47. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json +137 -0
  48. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.provenance.json +52 -0
  49. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-template.api.json +137 -0
  50. sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-template.provenance.json +44 -0
README.md CHANGED
@@ -69,6 +69,8 @@ harness/ the current measurement harnesses
69
  | [`2026-09-14_krea-2_rtx-5060-ti`](sessions/2026-09-14_krea-2_rtx-5060-ti) | Krea 2 Turbo FP8 (image) | RTX 5060 Ti 16GB | 5 | no OOM, up to 1920x1088 |
70
  | [`2026-09-14_wan-2-2_rtx-5060-ti`](sessions/2026-09-14_wan-2-2_rtx-5060-ti) | Wan 2.2 TI2V-5B (video) | RTX 5060 Ti 16GB | 6 | no OOM, 720p 5 s on FP16 and Q8_0 GGUF |
71
  | [`2026-09-14_qwen3-8-27b_rtx-5060-ti`](sessions/2026-09-14_qwen3-8-27b_rtx-5060-ti) | Qwen3.8-27B (vision LLM) | RTX 5060 Ti 16GB | 5 | fits in VRAM with vision at 32K and text-only at 65K |
 
 
72
 
73
  ## Licence
74
 
 
69
  | [`2026-09-14_krea-2_rtx-5060-ti`](sessions/2026-09-14_krea-2_rtx-5060-ti) | Krea 2 Turbo FP8 (image) | RTX 5060 Ti 16GB | 5 | no OOM, up to 1920x1088 |
70
  | [`2026-09-14_wan-2-2_rtx-5060-ti`](sessions/2026-09-14_wan-2-2_rtx-5060-ti) | Wan 2.2 TI2V-5B (video) | RTX 5060 Ti 16GB | 6 | no OOM, 720p 5 s on FP16 and Q8_0 GGUF |
71
  | [`2026-09-14_qwen3-8-27b_rtx-5060-ti`](sessions/2026-09-14_qwen3-8-27b_rtx-5060-ti) | Qwen3.8-27B (vision LLM) | RTX 5060 Ti 16GB | 5 | fits in VRAM with vision at 32K and text-only at 65K |
72
+ | [`2026-09-21_qwen-image-2-1_rtx-5060-ti`](sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti) | Qwen-Image-2.1 (image) | RTX 5060 Ti 16GB | 8 | no OOM, up to 2752x1536; PyTorch cu128, so int8 ran on the slow path |
73
+ | [`2026-09-22_qwen-image-2-1_rtx-5060-ti`](sessions/2026-09-22_qwen-image-2-1_rtx-5060-ti) | Qwen-Image-2.1 (image) | RTX 5060 Ti 16GB | 5 | cu130 rerun: template 1024x1024 in 21 s, int8 1.7-2.3x faster than bf16 |
74
 
75
  ## Licence
76
 
runs.csv CHANGED
@@ -34,3 +34,16 @@ session_id,run,measured_at,model_slug,gpu_slug,vertical,task,runtime,runtime_ver
34
  2026-09-14_qwen3-8-27b_rtx-5060-ti,3,2026-09-14T08:48:16.898Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,b10951 (093a2f86c),unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf,UD-Q3_K_XL,,,,,16384,512,128,,"{""argv"":[""llama-bench.exe"",""-m"",""D:\\smeltcore-measure\\repo\\measurements\\models\\Qwen3.8-27B-UD-Q3_K_XL.gguf"",""-p"",""512"",""-n"",""128"",""-d"",""15872"",""-ngl"",""99"",""-fa"",""on"",""-ctk"",""q8_0"",""-ctv"",""q8_0"",""-b"",""2048"",""-ub"",""512"",""-r"",""3"",""-o"",""json""],""bench"":[{""avg_ns"":626840266,""avg_ts"":816.806427,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":15872,""n_gen"":0,""n_gpu_layers"":99,""n_prompt"":512,""n_ubatch"":512,""samples_ns"":[627416600,629377000,623727200],""stddev_ns"":2868873,""stddev_ts"":3.742994,""type_k"":""q8_0"",""type_v"":""q8_0""},{""avg_ns"":4853136933,""avg_ts"":26.374921,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":15872,""n_gen"":128,""n_gpu_layers"":99,""n_prompt"":0,""n_ubatch"":512,""samples_ns"":[4872302800,4848990000,4838118000],""stddev_ns"":17465760,""stddev_ts"":0.094805,""type_k"":""q8_0"",""type_v"":""q8_0""}],""mode"":""bench"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""n_ctx_gen_test"":16000,""n_ctx_prompt_test"":16384,""n_depth"":15872,""run_key"":""r03_bench_ctx16384"",""wall_s_note"":""llama-bench reports per-test averages (avg_ns), not a single job time; wall_s left empty""}",true,true,,,816.806,26.375,1115,14150,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
35
  2026-09-14_qwen3-8-27b_rtx-5060-ti,4,2026-09-14T08:49:00.428Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,b10951 (093a2f86c),unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf,UD-Q3_K_XL,,,,,65536,512,128,,"{""argv"":[""llama-bench.exe"",""-m"",""D:\\smeltcore-measure\\repo\\measurements\\models\\Qwen3.8-27B-UD-Q3_K_XL.gguf"",""-p"",""512"",""-n"",""128"",""-d"",""65024"",""-ngl"",""99"",""-fa"",""on"",""-ctk"",""q8_0"",""-ctv"",""q8_0"",""-b"",""2048"",""-ub"",""512"",""-r"",""3"",""-o"",""json""],""bench"":[{""avg_ns"":900614833,""avg_ts"":568.510588,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":65024,""n_gen"":0,""n_gpu_layers"":99,""n_prompt"":512,""n_ubatch"":512,""samples_ns"":[905982700,897973900,897887900],""stddev_ns"":4649004,""stddev_ts"":2.925894,""type_k"":""q8_0"",""type_v"":""q8_0""},{""avg_ns"":6139747833,""avg_ts"":20.847787,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":65024,""n_gen"":128,""n_gpu_layers"":99,""n_prompt"":0,""n_ubatch"":512,""samples_ns"":[6148453800,6138769700,6132020000],""stddev_ns"":8260819,""stddev_ts"":0.028042,""type_k"":""q8_0"",""type_v"":""q8_0""}],""mode"":""bench"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""n_ctx_gen_test"":65152,""n_ctx_prompt_test"":65536,""n_depth"":65024,""run_key"":""r04_bench_ctx65536_textonly"",""wall_s_note"":""llama-bench reports per-test averages (avg_ns), not a single job time; wall_s left empty""}",true,true,,,568.511,20.848,1110,15783,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
36
  2026-09-14_qwen3-8-27b_rtx-5060-ti,5,2026-09-14T08:51:03.036Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,unknown,unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf;unsloth/Qwen3.8-27B-GGUF:mmproj-F16.gguf,UD-Q3_K_XL,,,,,32768,1043,151,,"{""answer_head"":""A low-resolution, pixelated image showing a gradient that transitions from magenta and pink at the top to teal and green at the bottom, crossed by a thin diagonal line running from the upper-left to the lower-right that shifts in color along its length."",""argv"":[""llama-server.exe"",""--model"",""Qwen3.8-27B-UD-Q3_K_XL.gguf"",""--mmproj"",""mmproj-F16.gguf"",""--host"",""127.0.0.1"",""--port"",""8089"",""--alias"",""qwen3.8-27b"",""--n-gpu-layers"",""99"",""--ctx-size"",""32768"",""--parallel"",""1"",""--cache-type-k"",""q8_0"",""--cache-type-v"",""q8_0"",""--flash-attn"",""on"",""--batch-size"",""2048"",""--ubatch-size"",""512"",""--image-min-tokens"",""1024"",""--jinja"",""--no-reasoning-preserve"",""--chat-template-kwargs"",""{\""reasoning_effort\"":\""medium\""}"",""--temp"",""1.0"",""--top-p"",""0.95"",""--top-k"",""20"",""--min-p"",""0.0"",""--presence-penalty"",""0.0"",""--repeat-penalty"",""1.0""],""image"":""run05.input.png"",""mode"":""server"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""request"":{""image_size"":[1024,1024],""max_tokens"":512,""min_p"":0.0,""prompt"":""Describe this image in one sentence."",""seed"":1234,""temperature"":1.0,""top_k"":20,""top_p"":0.95},""run_key"":""r05_server_vision_ctx32768"",""timings"":{""cache_n"":0,""predicted_ms"":5264.962,""predicted_n"":151,""predicted_per_second"":28.490234117549186,""predicted_per_token_ms"":35.09974666666667,""prompt_ms"":1800.761,""prompt_n"":1043,""prompt_per_second"":579.1995717366159,""prompt_per_token_ms"":1.7265206136145732},""usage"":{""completion_tokens"":151,""prompt_tokens"":1043,""prompt_tokens_details"":{""cached_tokens"":0},""total_tokens"":1194},""wall_s_note"":""wall_s = the server's prompt_ms + predicted_ms for the one request""}",true,true,,7.066,579.2,28.49,1115,15712,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  2026-09-14_qwen3-8-27b_rtx-5060-ti,3,2026-09-14T08:48:16.898Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,b10951 (093a2f86c),unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf,UD-Q3_K_XL,,,,,16384,512,128,,"{""argv"":[""llama-bench.exe"",""-m"",""D:\\smeltcore-measure\\repo\\measurements\\models\\Qwen3.8-27B-UD-Q3_K_XL.gguf"",""-p"",""512"",""-n"",""128"",""-d"",""15872"",""-ngl"",""99"",""-fa"",""on"",""-ctk"",""q8_0"",""-ctv"",""q8_0"",""-b"",""2048"",""-ub"",""512"",""-r"",""3"",""-o"",""json""],""bench"":[{""avg_ns"":626840266,""avg_ts"":816.806427,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":15872,""n_gen"":0,""n_gpu_layers"":99,""n_prompt"":512,""n_ubatch"":512,""samples_ns"":[627416600,629377000,623727200],""stddev_ns"":2868873,""stddev_ts"":3.742994,""type_k"":""q8_0"",""type_v"":""q8_0""},{""avg_ns"":4853136933,""avg_ts"":26.374921,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":15872,""n_gen"":128,""n_gpu_layers"":99,""n_prompt"":0,""n_ubatch"":512,""samples_ns"":[4872302800,4848990000,4838118000],""stddev_ns"":17465760,""stddev_ts"":0.094805,""type_k"":""q8_0"",""type_v"":""q8_0""}],""mode"":""bench"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""n_ctx_gen_test"":16000,""n_ctx_prompt_test"":16384,""n_depth"":15872,""run_key"":""r03_bench_ctx16384"",""wall_s_note"":""llama-bench reports per-test averages (avg_ns), not a single job time; wall_s left empty""}",true,true,,,816.806,26.375,1115,14150,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
35
  2026-09-14_qwen3-8-27b_rtx-5060-ti,4,2026-09-14T08:49:00.428Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,b10951 (093a2f86c),unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf,UD-Q3_K_XL,,,,,65536,512,128,,"{""argv"":[""llama-bench.exe"",""-m"",""D:\\smeltcore-measure\\repo\\measurements\\models\\Qwen3.8-27B-UD-Q3_K_XL.gguf"",""-p"",""512"",""-n"",""128"",""-d"",""65024"",""-ngl"",""99"",""-fa"",""on"",""-ctk"",""q8_0"",""-ctv"",""q8_0"",""-b"",""2048"",""-ub"",""512"",""-r"",""3"",""-o"",""json""],""bench"":[{""avg_ns"":900614833,""avg_ts"":568.510588,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":65024,""n_gen"":0,""n_gpu_layers"":99,""n_prompt"":512,""n_ubatch"":512,""samples_ns"":[905982700,897973900,897887900],""stddev_ns"":4649004,""stddev_ts"":2.925894,""type_k"":""q8_0"",""type_v"":""q8_0""},{""avg_ns"":6139747833,""avg_ts"":20.847787,""backends"":""CUDA"",""flash_attn"":1,""gpu_info"":""NVIDIA GeForce RTX 5060 Ti"",""model_size"":13135396864,""n_batch"":2048,""n_depth"":65024,""n_gen"":128,""n_gpu_layers"":99,""n_prompt"":0,""n_ubatch"":512,""samples_ns"":[6148453800,6138769700,6132020000],""stddev_ns"":8260819,""stddev_ts"":0.028042,""type_k"":""q8_0"",""type_v"":""q8_0""}],""mode"":""bench"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""n_ctx_gen_test"":65152,""n_ctx_prompt_test"":65536,""n_depth"":65024,""run_key"":""r04_bench_ctx65536_textonly"",""wall_s_note"":""llama-bench reports per-test averages (avg_ns), not a single job time; wall_s left empty""}",true,true,,,568.511,20.848,1110,15783,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
36
  2026-09-14_qwen3-8-27b_rtx-5060-ti,5,2026-09-14T08:51:03.036Z,qwen3-8-27b,rtx-5060-ti,multimodal,llm,llama.cpp,unknown,unsloth/Qwen3.8-27B-GGUF:Qwen3.8-27B-UD-Q3_K_XL.gguf;unsloth/Qwen3.8-27B-GGUF:mmproj-F16.gguf,UD-Q3_K_XL,,,,,32768,1043,151,,"{""answer_head"":""A low-resolution, pixelated image showing a gradient that transitions from magenta and pink at the top to teal and green at the bottom, crossed by a thin diagonal line running from the upper-left to the lower-right that shifts in color along its length."",""argv"":[""llama-server.exe"",""--model"",""Qwen3.8-27B-UD-Q3_K_XL.gguf"",""--mmproj"",""mmproj-F16.gguf"",""--host"",""127.0.0.1"",""--port"",""8089"",""--alias"",""qwen3.8-27b"",""--n-gpu-layers"",""99"",""--ctx-size"",""32768"",""--parallel"",""1"",""--cache-type-k"",""q8_0"",""--cache-type-v"",""q8_0"",""--flash-attn"",""on"",""--batch-size"",""2048"",""--ubatch-size"",""512"",""--image-min-tokens"",""1024"",""--jinja"",""--no-reasoning-preserve"",""--chat-template-kwargs"",""{\""reasoning_effort\"":\""medium\""}"",""--temp"",""1.0"",""--top-p"",""0.95"",""--top-k"",""20"",""--min-p"",""0.0"",""--presence-penalty"",""0.0"",""--repeat-penalty"",""1.0""],""image"":""run05.input.png"",""mode"":""server"",""model_bytes"":13146393504,""model_revision"":""4ca720788d1e01f1bff70c033e0d0028fd02e502"",""model_sha256"":""8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e"",""request"":{""image_size"":[1024,1024],""max_tokens"":512,""min_p"":0.0,""prompt"":""Describe this image in one sentence."",""seed"":1234,""temperature"":1.0,""top_k"":20,""top_p"":0.95},""run_key"":""r05_server_vision_ctx32768"",""timings"":{""cache_n"":0,""predicted_ms"":5264.962,""predicted_n"":151,""predicted_per_second"":28.490234117549186,""predicted_per_token_ms"":35.09974666666667,""prompt_ms"":1800.761,""prompt_n"":1043,""prompt_per_second"":579.1995717366159,""prompt_per_token_ms"":1.7265206136145732},""usage"":{""completion_tokens"":151,""prompt_tokens"":1043,""prompt_tokens_details"":{""cached_tokens"":0},""total_tokens"":1194},""wall_s_note"":""wall_s = the server's prompt_ms + predicted_ms for the one request""}",true,true,,7.066,579.2,28.49,1115,15712,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,
37
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,1,2026-09-21T19:41:33.838Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""megapixels"":1,""seed"":4001,""steps"":25},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage""},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4001,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00001.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""megapixels"",""new"":1,""node"":""13"",""old"":1,""replaced_link"":false},{""input"":""seed"",""new"":4001,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""bf3f02b1-0c04-44a5-91eb-d679b367fe1b"",""prompt_sha256"":""02cbc1240a2c4aa86e0d6430ecd554a648eda9a7dfebe078b019963f163748ee"",""run_key"":""r01_1024x1024_25step_template_default"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,69.407,,,1203,15613,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
38
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,2,2026-09-21T19:42:46.907Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,2048,2048,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":2048,""seed"":4002,""steps"":25,""width_direct"":2048},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":2048,""width"":2048},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4002,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00002.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":2048,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":2048,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4002,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""433a0e44-51d7-47c5-a813-a9a05594ee34"",""prompt_sha256"":""9d42fc023e1c44b37e1052c99c2093a54557f24004831adc6628ce4ee769ec9d"",""run_key"":""r02_2048x2048_25step_native_2k"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,297.92,,,1250,15528,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
39
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,3,2026-09-21T19:47:49.160Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,1024,1024,,40,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":1024,""seed"":4003,""steps"":40,""width_direct"":1024},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":1024,""width"":1024},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4003,""steps"":40},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00003.png""],""overrides_applied"":[{""input"":""steps"",""new"":40,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":1024,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":1024,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4003,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""9daae923-b747-4246-9cbb-9858395b54ed"",""prompt_sha256"":""09c2428b146a1cb640e234823b40400c762765b8af94ca012bb9af14b6c5dd98"",""run_key"":""r03_1024x1024_40step_vendor_steps"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,104.325,,,1238,15471,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
40
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,4,2026-09-21T19:49:38.018Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,2752,1536,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":1536,""seed"":4004,""steps"":25,""width_direct"":2752},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":1536,""width"":2752},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4004,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00004.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":2752,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":1536,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4004,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""f8b1bb1a-2018-4311-9456-dfa03e0ba415"",""prompt_sha256"":""c66d03f6ec80487969aa38ad5586a167ea10f04752dfa298f08b92bf6d0bdf57"",""run_key"":""r04_2752x1536_2k_16x9"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,301.162,,,1222,15555,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
41
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,5,2026-09-21T19:54:46.132Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_w4a8.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot (DiT) + w4a8 (encoder),1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_w4a8.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_w4a8.safetensors"",""bytes"":6312105364,""quantization"":""w4a8"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""7754425e55e7bea2bfde4dde59a4cc236cb44e5ee9c215ea66ef8d47012824eb""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":1024,""seed"":4001,""steps"":25,""width_direct"":1024},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_w4a8.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":1024,""width"":1024},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4001,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00005.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":1024,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":1024,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4001,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""f8a18278-9e7b-477a-bd9e-5497095259a6"",""prompt_sha256"":""83eb3d77f2653bd6bde6fa29e577532b67470ec5743a41550099eb18d47087d9"",""run_key"":""r05_1024x1024_w4a8_encoder"",""workflow"":""t2i_w4a8_encoder"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json""}",true,true,,70.903,,,1281,14485,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
42
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,6,2026-09-21T19:56:02.069Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,bf16 (DiT) + int8_convrot (encoder),1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors"",""bytes"":14230280616,""quantization"":""bf16"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":1024,""seed"":4001,""steps"":25,""width_direct"":1024},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_bf16.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":1024,""width"":1024},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4001,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00006.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":1024,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":1024,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4001,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""2436b5cd-e913-48f9-9065-2273e9e40c5a"",""prompt_sha256"":""0482b3d4d4b87338752f74ebd28b712260bdd8053775ce334c96dfaa6388381e"",""run_key"":""r06_1024x1024_bf16_dit"",""workflow"":""t2i_bf16_dit"",""workflow_file"":""workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json""}",true,true,,46.17,,,1256,15590,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl); shared GPU memory rose 1009 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback"
43
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,7,2026-09-21T19:56:52.596Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,bf16 (DiT) + int8_convrot (encoder),2048,2048,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors"",""bytes"":14230280616,""quantization"":""bf16"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""height_direct"":2048,""seed"":4002,""steps"":25,""width_direct"":2048},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_bf16.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":2048,""width"":2048},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4002,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00007.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":2048,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":2048,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4002,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""6933313a-bdc3-4ab2-aec3-afb93e021638"",""prompt_sha256"":""735144443925561b68ebca57f5cda63f7f9b79f7f45e78f6b65bdf6c0a53ec93"",""run_key"":""r07_2048x2048_bf16_dit"",""workflow"":""t2i_bf16_dit"",""workflow_file"":""workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json""}",true,true,,217.405,,,1279,15719,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl); shared GPU memory rose 3065 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback"
44
+ 2026-09-21_qwen-image-2-1_rtx-5060-ti,8,2026-09-21T20:00:33.876Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI\\main.py"",""--feature-flag"",""show_signin_button=true"",""--feature-flag"",""enable_telemetry=true"",""--base-directory"",""D:\\ComfyUI"",""--user-directory"",""D:\\ComfyUI\\user"",""--database-url"",""sqlite:///D:\\ComfyUI\\user\\comfyui.db"",""--port"",""8000"",""--listen"",""0.0.0.0"",""--enable-manager"",""--extra-model-paths-config"",""C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml"",""--input-directory"",""D:\\ComfyUI\\input"",""--output-directory"",""D:\\ComfyUI\\output""],""knobs"":{""megapixels"":1,""seed"":4008,""steps"":25},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage""},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4008,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00008.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""megapixels"",""new"":1,""node"":""13"",""old"":1,""replaced_link"":false},{""input"":""seed"",""new"":4008,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""cb154463-f6be-46e6-a48e-eae202efa433"",""prompt_sha256"":""0f30f1863b2ee3d22e2450fafa24b6b1be4cd171d2583feb7c5eaffbb5201348"",""run_key"":""r08_1024x1024_25step_repeat"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,67.877,,,1299,15449,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,"PyTorch 2.12.0.dev20260220+cu128: ComfyUI's cu130 warning, comfy-kitchen cuda backend disabled, int8 matmuls on the eager path (annotation added at publication from session.json and raw/comfyui_log.jsonl)"
45
+ 2026-09-22_qwen-image-2-1_rtx-5060-ti,1,2026-09-22T06:14:26.188Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI/main.py"",""--windows-standalone-build""],""knobs"":{""megapixels"":1,""seed"":4001,""steps"":25},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage""},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4001,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00001.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""megapixels"",""new"":1,""node"":""13"",""old"":1,""replaced_link"":false},{""input"":""seed"",""new"":4001,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""e1964302-3fb2-4191-ac11-3b010e183090"",""prompt_sha256"":""02cbc1240a2c4aa86e0d6430ecd554a648eda9a7dfebe078b019963f163748ee"",""run_key"":""r01_1024x1024_25step_template_default"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,21.389,,,1197,15560,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,PyTorch 2.13.0+cu130: comfy-kitchen cuda backend enabled (annotation added at publication from session.json and raw/comfyui_log.jsonl)
46
+ 2026-09-22_qwen-image-2-1_rtx-5060-ti,2,2026-09-22T06:14:52.083Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,2048,2048,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI/main.py"",""--windows-standalone-build""],""knobs"":{""height_direct"":2048,""seed"":4002,""steps"":25,""width_direct"":2048},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":2048,""width"":2048},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4002,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00002.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":2048,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":2048,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4002,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""035e0252-d266-4a31-b42e-56c41a19c4ab"",""prompt_sha256"":""9d42fc023e1c44b37e1052c99c2093a54557f24004831adc6628ce4ee769ec9d"",""run_key"":""r02_2048x2048_25step_native_2k"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,124.081,,,1352,14626,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,PyTorch 2.13.0+cu130: comfy-kitchen cuda backend enabled (annotation added at publication from session.json and raw/comfyui_log.jsonl)
47
+ 2026-09-22_qwen-image-2-1_rtx-5060-ti,6,2026-09-22T06:17:00.269Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,bf16 (DiT) + int8_convrot (encoder),1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors"",""bytes"":14230280616,""quantization"":""bf16"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI/main.py"",""--windows-standalone-build""],""knobs"":{""height_direct"":1024,""seed"":4001,""steps"":25,""width_direct"":1024},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_bf16.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":1024,""width"":1024},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4001,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00003.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":1024,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":1024,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4001,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""a4dbeebc-b2d5-427c-972e-a608739b993f"",""prompt_sha256"":""0482b3d4d4b87338752f74ebd28b712260bdd8053775ce334c96dfaa6388381e"",""run_key"":""r06_1024x1024_bf16_dit"",""workflow"":""t2i_bf16_dit"",""workflow_file"":""workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json""}",true,true,,41.918,,,1340,15657,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,PyTorch 2.13.0+cu130: comfy-kitchen cuda backend enabled (annotation added at publication from session.json and raw/comfyui_log.jsonl); shared GPU memory rose 1279 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback
48
+ 2026-09-22_qwen-image-2-1_rtx-5060-ti,7,2026-09-22T06:17:46.561Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,bf16 (DiT) + int8_convrot (encoder),2048,2048,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors"",""bytes"":14230280616,""quantization"":""bf16"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI/main.py"",""--windows-standalone-build""],""knobs"":{""height_direct"":2048,""seed"":4002,""steps"":25,""width_direct"":2048},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_bf16.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage"",""height"":2048,""width"":2048},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4002,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00004.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""width"",""new"":2048,""node"":""459:456"",""old"":[""13"",0],""replaced_link"":true},{""input"":""height"",""new"":2048,""node"":""459:456"",""old"":[""13"",1],""replaced_link"":true},{""input"":""seed"",""new"":4002,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""8d221549-6cb9-4453-abe6-ca26ac5d0f60"",""prompt_sha256"":""735144443925561b68ebca57f5cda63f7f9b79f7f45e78f6b65bdf6c0a53ec93"",""run_key"":""r07_2048x2048_bf16_dit"",""workflow"":""t2i_bf16_dit"",""workflow_file"":""workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json""}",true,true,,208.446,,,1147,14799,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,PyTorch 2.13.0+cu130: comfy-kitchen cuda backend enabled (annotation added at publication from session.json and raw/comfyui_log.jsonl); shared GPU memory rose 4428 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback
49
+ 2026-09-22_qwen-image-2-1_rtx-5060-ti,8,2026-09-22T06:21:19.259Z,qwen-image-2-1,rtx-5060-ti,image,t2i,comfyui,0.37.0,Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors;Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors,int8_convrot,1024,1024,,25,,,,,"{""artifacts"":{""qwen3vl_8b_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors"",""bytes"":9350798360,""quantization"":""int8_convrot"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f""},""qwen_image_2.1_int8_convrot.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors"",""bytes"":7256783064,""quantization"":""int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d""},""qwen_image_2.1_vae_bf16.safetensors"":{""artifact"":""Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors"",""bytes"":675509688,""quantization"":""bf16 (VAE; 64-channel RGBA, 16x spatial)"",""revision"":""ace0edeb3791a594ddfa36ed5f41a178a394e921"",""sha256"":""bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9""}},""cold_start_method"":""POST /free {unload_models:true, free_memory:true}, then settle"",""comfyui_argv"":[""ComfyUI/main.py"",""--windows-standalone-build""],""knobs"":{""megapixels"":1,""seed"":4008,""steps"":25},""node_literals"":{""13"":{""aspect_ratio"":""1:1 (Square)"",""class_type"":""ResolutionSelector"",""megapixels"":1,""multiple"":8},""459:451"":{""class_type"":""UNETLoader"",""unet_name"":""qwen_image_2.1_int8_convrot.safetensors"",""weight_dtype"":""default""},""459:452"":{""class_type"":""TextEncodeQwenImage21"",""negative_prompt"":"""",""prompt"":""sha256:081dc85df01bb9ea"",""resolution"":1024},""459:453"":{""class_type"":""CLIPLoader"",""clip_name"":""qwen3vl_8b_int8_convrot.safetensors"",""device"":""default"",""type"":""qwen_image""},""459:454"":{""class_type"":""VAELoader"",""vae_name"":""qwen_image_2.1_vae_bf16.safetensors""},""459:456"":{""batch_size"":1,""class_type"":""EmptyLatentImage""},""459:457"":{""class_type"":""VAEDecode""},""459:458"":{""cfg"":1,""class_type"":""KSampler"",""denoise"":1,""sampler_name"":""euler"",""scheduler"":""simple"",""seed"":4008,""steps"":25},""461"":{""class_type"":""SaveImageAdvanced"",""filename_prefix"":""Qwen_image_2.1"",""format"":""png"",""format.bit_depth"":""8-bit"",""format.input_color_space"":""sRGB""}},""output_files"":[""output//Qwen_image_2.1_00005.png""],""overrides_applied"":[{""input"":""steps"",""new"":25,""node"":""459:458"",""old"":25,""replaced_link"":false},{""input"":""megapixels"",""new"":1,""node"":""13"",""old"":1,""replaced_link"":false},{""input"":""seed"",""new"":4008,""node"":""459:458"",""old"":593103825222985,""replaced_link"":false}],""prompt_id"":""e91a1d09-fc80-4035-9963-1f13ef7b04eb"",""prompt_sha256"":""0f30f1863b2ee3d22e2450fafa24b6b1be4cd171d2583feb7c5eaffbb5201348"",""run_key"":""r08_1024x1024_25step_repeat"",""workflow"":""t2i"",""workflow_file"":""workflows/qwen-image-2-1_t2i_int8-template.api.json""}",true,true,,20.621,,,1151,15844,,16311,true,NVIDIA GeForce RTX 5060 Ti,591.86,500,PyTorch 2.13.0+cu130: comfy-kitchen cuda backend enabled (annotation added at publication from session.json and raw/comfyui_log.jsonl)
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Qwen-Image-2.1 on an RTX 5060 Ti 16GB — 2026-09-21 (PyTorch cu128)
2
+
3
+ Eight text-to-image generations in ComfyUI 0.37.0 from Comfy-Org's "Qwen Image 2.1: Text to Image"
4
+ template (25 steps, cfg 1, `euler`, `simple`), on a 16 GB card with a monitor attached. Weights are
5
+ Comfy-Org's repack at revision `ace0edeb`. **All eight completed.**
6
+
7
+ > **Read this before using any int8 speed from this session.** ComfyUI ran on PyTorch
8
+ > `2.12.0.dev20260220+cu128`. Its own startup log (`raw/comfyui_log.jsonl`, entries 193–200) prints
9
+ > *"You need pytorch with cu130 or higher to use optimized CUDA operations"* and reports
10
+ > `comfy_kitchen backend cuda: {'available': True, 'disabled': True}`. With triton absent as well, the
11
+ > int8 diffusion model's matmuls ran on comfy-kitchen's **eager** backend, the slow path. The rerun on
12
+ > a cu130 build, [`2026-09-22_qwen-image-2-1_rtx-5060-ti`](../2026-09-22_qwen-image-2-1_rtx-5060-ti),
13
+ > is the one to use for int8 speed. There the template's 1024x1024 image takes 21.4 s instead of 69.4 s.
14
+
15
+ | run | files (DiT + encoder) | size, steps | wall_s | s/it | idle MiB | peak MiB |
16
+ |---:|---|---|---:|---:|---:|---:|
17
+ | 1 | int8 + int8 (template) | 1024x1024, 25 | 69.407 | 2.47 | 1,203 | 15,613 |
18
+ | 2 | int8 + int8 | 2048x2048, 25 | 297.920 | 11.51 | 1,250 | 15,528 |
19
+ | 3 | int8 + int8 | 1024x1024, 40 | 104.325 | 2.47 | 1,238 | 15,471 |
20
+ | 4 | int8 + int8 | 2752x1536, 25 | 301.162 | 11.66 | 1,222 | 15,555 |
21
+ | 5 | int8 + w4a8 | 1024x1024, 25 | 70.903 | 2.46 | 1,281 | 14,485 |
22
+ | 6 | bf16 + int8 | 1024x1024, 25 | 46.170 | 1.53 | 1,256 | 15,590 |
23
+ | 7 | bf16 + int8 | 2048x2048, 25 | 217.405 | 7.66 | 1,279 | 15,719 |
24
+ | 8 | int8 + int8, new seed | 1024x1024, 25 | 67.877 | 2.47 | 1,299 | 15,449 |
25
+
26
+ `s/it` is the average ComfyUI's KSampler prints at the end of each run (`raw/comfyui_log.jsonl`).
27
+ Every run is a cold start (models unloaded with `POST /free` first), so `wall_s` includes loading the
28
+ weights. ComfyUI was launched by Comfy Desktop with its own arguments (in every row's `config_json`).
29
+ Dynamic VRAM was on, as it is by default at 0.37.0 on NVIDIA, and pinned memory was on.
30
+
31
+ **The peak is not a requirement.** Whole-card peaks were 14,485–15,719 MiB (14.1–15.4 GiB) in every
32
+ run, 1024x1024 included, and the card stayed nearly that full through sampling. ComfyUI's dynamic-VRAM loader fills the card with whatever weights fit, so
33
+ these figures say how full it chose to make the card, not what the job needs. The encoder and the
34
+ int8 diffusion model together are 15.5 GiB of weights, more than the card holds with a desktop on it,
35
+ and nothing failed.
36
+
37
+ **Native 2K works on 16 GB.** 2048x2048 and 2752x1536 completed with no out-of-memory or
38
+ tiled-decode line in the log.
39
+
40
+ **The bf16 diffusion model (13.25 GiB) also runs on this card**, at 1024x1024 and 2048x2048. It was
41
+ faster than int8 here only because int8 was on the eager path; see the cu130 session.
42
+
43
+ **A cold run spends little outside sampling.** Of run 1's 69.4 s, about 61 s is the 25 steps.
44
+ Loading, encoding and decoding together cost about 8 s.
45
+
46
+ **The w4a8 encoder saves no time on a cold run** (70.9 s against 69.4 s) and changes the picture.
47
+ Runs 1, 5 and 6 share seed 4001. By eye, the int8 and bf16 diffusion models give nearly the same
48
+ image, while the w4a8 encoder gives a clearly different composition (pose, bag, collar) that is just
49
+ as clean. The generated images are not published.
50
+
51
+ GPU utilisation was 100% through sampling in all eight runs (`raw/nvidia-smi_*.csv`), so the runs
52
+ were compute-bound rather than waiting on weight transfers. Shared GPU memory rose 1.0 and 3.0 GiB in
53
+ runs 6 and 7 while dedicated memory was never sampled full. With pinned memory on, that is consistent
54
+ with pinned host buffers, and it is not attributed to fallback.
55
+
56
+ `raw/README-harness.md` is the harness's own summary. The `notes` column of `runs.csv` carries a
57
+ PyTorch-build annotation added at publication from `session.json` and the startup log.
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/README-harness.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 2026-09-21_qwen-image-2-1_rtx-5060-ti
2
+
3
+ Model `qwen-image-2-1` on `rtx-5060-ti` through ComfyUI. Written by the harness at the end of the session; the owner reviews it before anything is published.
4
+
5
+ **Nothing here has been uploaded or published.**
6
+
7
+ | run | key | ok | failure | file WxHxF | wall_s | idle MiB | peak MiB | notes |
8
+ |---:|---|---|---|---|---:|---:|---:|---|
9
+ | 1 | r01_1024x1024_25step_template_default | true | | 1024x1024 | 69.407 | 1203 | 15613 | |
10
+ | 2 | r02_2048x2048_25step_native_2k | true | | 2048x2048 | 297.92 | 1250 | 15528 | |
11
+ | 3 | r03_1024x1024_40step_vendor_steps | true | | 1024x1024 | 104.325 | 1238 | 15471 | |
12
+ | 4 | r04_2752x1536_2k_16x9 | true | | 2752x1536 | 301.162 | 1222 | 15555 | |
13
+ | 5 | r05_1024x1024_w4a8_encoder | true | | 1024x1024 | 70.903 | 1281 | 14485 | |
14
+ | 6 | r06_1024x1024_bf16_dit | true | | 1024x1024 | 46.17 | 1256 | 15590 | shared GPU memory rose 1009 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback |
15
+ | 7 | r07_2048x2048_bf16_dit | true | | 2048x2048 | 217.405 | 1279 | 15719 | shared GPU memory rose 3065 MiB but dedicated memory was never sampled full (pinned host buffers also count as shared): not attributed to fallback |
16
+ | 8 | r08_1024x1024_25step_repeat | true | | 1024x1024 | 67.877 | 1299 | 15449 | |
17
+
18
+ ## Caveats
19
+
20
+ - VRAM figures are whole-card (nvidia-smi memory.used): they include the Windows desktop and the attached display and any other process; peak minus idle estimates the run's own use only if idle held constant.
21
+ - wall_s is ComfyUI's own execution time: execution_success minus execution_start from /history (ms timestamps on ComfyUI's clock), node overhead included.
22
+ - ComfyUI launched with argv=['ComfyUI\\main.py', '--feature-flag', 'show_signin_button=true', '--feature-flag', 'enable_telemetry=true', '--base-directory', 'D:\\ComfyUI', '--user-directory', 'D:\\ComfyUI\\user', '--database-url', 'sqlite:///D:\\ComfyUI\\user\\comfyui.db', '--port', '8000', '--listen', '0.0.0.0', '--enable-manager', '--extra-model-paths-config', 'C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml', '--input-directory', 'D:\\ComfyUI\\input', '--output-directory', 'D:\\ComfyUI\\output']; launch flags change memory behaviour and are copied into every row's config_json.
23
+ - /free verification this invocation and before: whole-card memory after /free ranged 1201-1301 MiB over 9 frees; largest drop measured 12731 MiB; ComfyUI torch-reserved after /free max 32 MiB.
24
+
25
+ ## Recipe claims under test
26
+
27
+ - The official ComfyUI template 'Qwen Image 2.1: Text to Image' (int8_convrot DiT 7,256,783,064 B + int8_convrot Qwen3-VL-8B encoder 9,350,798,360 B + bf16 VAE 675,509,688 B; 25 steps, cfg 1, euler, simple) produces a 1024x1024 image on a 16 GB RTX 5060 Ti on ComfyUI >= v0.37.0.
28
+ - The DiT and the int8 encoder together (6,920.6 + 8,917.6 MiB of weights — the '6920MB / 8916MB Staged' lines in issue #16437 are these file sizes, not peaks) exceed a 16 GiB card, so they are not both fully resident; at v0.37.0 ComfyUI's dynamic-VRAM loader is the default on NVIDIA and pages weights on demand rather than unloading one whole model for another. The sampling-stage peak at 1024x1024 is expected well inside 16 GB.
29
+ - Native 2K (2048x2048 and 2752x1536) works on the same files; the margin at 2K is unknown (no consumer-card 2K peak has been published).
30
+ - The w4a8 encoder (6,312,105,364 B) lets encoder and DiT co-reside on 16 GB, removing the per-prompt reload; the bf16 DiT (14,230,280,616 B) fits resident at 1024x1024 with the int8 encoder evicted, and is the quality reference against int8.
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/attempts.jsonl ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"ts": 1790019693.8384507, "run": 1, "what": "start", "prompt_id": "bf3f02b1-0c04-44a5-91eb-d679b367fe1b"}
2
+ {"ts": 1790019764.090597, "run": 1, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
3
+ {"ts": 1790019766.907108, "run": 2, "what": "start", "prompt_id": "433a0e44-51d7-47c5-a813-a9a05594ee34"}
4
+ {"ts": 1790020066.3185525, "run": 2, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
5
+ {"ts": 1790020069.1602793, "run": 3, "what": "start", "prompt_id": "9daae923-b747-4246-9cbb-9858395b54ed"}
6
+ {"ts": 1790020175.246467, "run": 3, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
7
+ {"ts": 1790020178.0186484, "run": 4, "what": "start", "prompt_id": "f8b1bb1a-2018-4311-9456-dfa03e0ba415"}
8
+ {"ts": 1790020480.5784929, "run": 4, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
9
+ {"ts": 1790020486.1320229, "run": 5, "what": "start", "prompt_id": "f8a18278-9e7b-477a-bd9e-5497095259a6"}
10
+ {"ts": 1790020559.0069559, "run": 5, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
11
+ {"ts": 1790020562.0695643, "run": 6, "what": "start", "prompt_id": "2436b5cd-e913-48f9-9065-2273e9e40c5a"}
12
+ {"ts": 1790020609.2850378, "run": 6, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
13
+ {"ts": 1790020612.5960817, "run": 7, "what": "start", "prompt_id": "6933313a-bdc3-4ab2-aec3-afb93e021638"}
14
+ {"ts": 1790020831.068991, "run": 7, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
15
+ {"ts": 1790020833.876421, "run": 8, "what": "start", "prompt_id": "cb154463-f6be-46e6-a48e-eae202efa433"}
16
+ {"ts": 1790020903.6058545, "run": 8, "what": "end", "outcome": "recorded", "ok": true, "failure": null}
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/comfyui_log.jsonl ADDED
@@ -0,0 +1,563 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.schemas\n"}
2
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.tables\n"}
3
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.types\n"}
4
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.constraints\n"}
5
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.defaults\n"}
6
+ {"t": "2026-09-21T21:29:08.610722", "m": "\u001b[32m[INFO]\u001b[0m setup plugin alembic.autogenerate.comments\n"}
7
+ {"t": "2026-09-21T21:29:08.955242", "m": "\u001b[1m\u001b[33m[WARNING]\u001b[0m On windows we are currently forcing single GPU mode in ComfyUI due to a Nvidia related issue, if you want to disable this use: --cuda-device all\n"}
8
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path checkpoints C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\checkpoints\n"}
9
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path classifiers C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\classifiers\n"}
10
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip_vision C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\clip_vision\n"}
11
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path configs C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\configs\n"}
12
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\controlnet\n"}
13
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\t2i_adapter\n"}
14
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusers C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\diffusers\n"}
15
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusion_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\diffusion_models\n"}
16
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path embeddings C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\embeddings\n"}
17
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path gligen C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\gligen\n"}
18
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path hypernetworks C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\hypernetworks\n"}
19
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path latent_upscale_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\latent_upscale_models\n"}
20
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path loras C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\loras\n"}
21
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path model_patches C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\model_patches\n"}
22
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path audio_encoders C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\audio_encoders\n"}
23
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path photomaker C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\photomaker\n"}
24
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path style_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\style_models\n"}
25
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path text_encoders C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\text_encoders\n"}
26
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path upscale_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\upscale_models\n"}
27
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path background_removal C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\background_removal\n"}
28
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path frame_interpolation C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\frame_interpolation\n"}
29
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path geometry_estimation C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\geometry_estimation\n"}
30
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path optical_flow C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\optical_flow\n"}
31
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path detection C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\detection\n"}
32
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\vae\n"}
33
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae_approx C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\vae_approx\n"}
34
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .cache C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\.cache\n"}
35
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .smeltcore-staging C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\.smeltcore-staging\n"}
36
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path BiRefNet C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\BiRefNet\n"}
37
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path CogVideo C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\CogVideo\n"}
38
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path Joy_caption C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\Joy_caption\n"}
39
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path LLM C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\LLM\n"}
40
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_models\n"}
41
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_motion_lora C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_motion_lora\n"}
42
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_video_formats C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_video_formats\n"}
43
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path blip C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\blip\n"}
44
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path dinov3 C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\dinov3\n"}
45
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facedetection C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\facedetection\n"}
46
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facerestore_models C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\facerestore_models\n"}
47
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path grounding-dino C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\grounding-dino\n"}
48
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path insightface C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\insightface\n"}
49
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path layerstyle C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\layerstyle\n"}
50
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path liveportrait C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\liveportrait\n"}
51
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path nsfw_detector C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\nsfw_detector\n"}
52
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path reactor C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\reactor\n"}
53
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path sam2 C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\sam2\n"}
54
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path trellis2 C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\trellis2\n"}
55
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path ultralytics C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\ultralytics\n"}
56
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path xlabs C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\xlabs\n"}
57
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path z-image-adapters C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\z-image-adapters\n"}
58
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\clip\n"}
59
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path unet C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\unet\n"}
60
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path checkpoints D:\\ComfyUI\\models\\checkpoints\n"}
61
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path classifiers D:\\ComfyUI\\models\\classifiers\n"}
62
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip_vision D:\\ComfyUI\\models\\clip_vision\n"}
63
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path configs D:\\ComfyUI\\models\\configs\n"}
64
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet D:\\ComfyUI\\models\\controlnet\n"}
65
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet D:\\ComfyUI\\models\\t2i_adapter\n"}
66
+ {"t": "2026-09-21T21:29:08.965242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusers D:\\ComfyUI\\models\\diffusers\n"}
67
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusion_models D:\\ComfyUI\\models\\diffusion_models\n"}
68
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path embeddings D:\\ComfyUI\\models\\embeddings\n"}
69
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path gligen D:\\ComfyUI\\models\\gligen\n"}
70
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path hypernetworks D:\\ComfyUI\\models\\hypernetworks\n"}
71
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path latent_upscale_models D:\\ComfyUI\\models\\latent_upscale_models\n"}
72
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path loras D:\\ComfyUI\\models\\loras\n"}
73
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path model_patches D:\\ComfyUI\\models\\model_patches\n"}
74
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path audio_encoders D:\\ComfyUI\\models\\audio_encoders\n"}
75
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path photomaker D:\\ComfyUI\\models\\photomaker\n"}
76
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path style_models D:\\ComfyUI\\models\\style_models\n"}
77
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path text_encoders D:\\ComfyUI\\models\\text_encoders\n"}
78
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path upscale_models D:\\ComfyUI\\models\\upscale_models\n"}
79
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path background_removal D:\\ComfyUI\\models\\background_removal\n"}
80
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path frame_interpolation D:\\ComfyUI\\models\\frame_interpolation\n"}
81
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path geometry_estimation D:\\ComfyUI\\models\\geometry_estimation\n"}
82
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path optical_flow D:\\ComfyUI\\models\\optical_flow\n"}
83
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path detection D:\\ComfyUI\\models\\detection\n"}
84
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae D:\\ComfyUI\\models\\vae\n"}
85
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae_approx D:\\ComfyUI\\models\\vae_approx\n"}
86
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .cache D:\\ComfyUI\\models\\.cache\n"}
87
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .smeltcore-staging D:\\ComfyUI\\models\\.smeltcore-staging\n"}
88
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path BiRefNet D:\\ComfyUI\\models\\BiRefNet\n"}
89
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path CogVideo D:\\ComfyUI\\models\\CogVideo\n"}
90
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path Joy_caption D:\\ComfyUI\\models\\Joy_caption\n"}
91
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path LLM D:\\ComfyUI\\models\\LLM\n"}
92
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_models D:\\ComfyUI\\models\\animatediff_models\n"}
93
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_motion_lora D:\\ComfyUI\\models\\animatediff_motion_lora\n"}
94
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_video_formats D:\\ComfyUI\\models\\animatediff_video_formats\n"}
95
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path blip D:\\ComfyUI\\models\\blip\n"}
96
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path dinov3 D:\\ComfyUI\\models\\dinov3\n"}
97
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facedetection D:\\ComfyUI\\models\\facedetection\n"}
98
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facerestore_models D:\\ComfyUI\\models\\facerestore_models\n"}
99
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path grounding-dino D:\\ComfyUI\\models\\grounding-dino\n"}
100
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path insightface D:\\ComfyUI\\models\\insightface\n"}
101
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path layerstyle D:\\ComfyUI\\models\\layerstyle\n"}
102
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path liveportrait D:\\ComfyUI\\models\\liveportrait\n"}
103
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path nsfw_detector D:\\ComfyUI\\models\\nsfw_detector\n"}
104
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path reactor D:\\ComfyUI\\models\\reactor\n"}
105
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path sam2 D:\\ComfyUI\\models\\sam2\n"}
106
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path trellis2 D:\\ComfyUI\\models\\trellis2\n"}
107
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path ultralytics D:\\ComfyUI\\models\\ultralytics\n"}
108
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path xlabs D:\\ComfyUI\\models\\xlabs\n"}
109
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path z-image-adapters D:\\ComfyUI\\models\\z-image-adapters\n"}
110
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip D:\\ComfyUI\\models\\clip\n"}
111
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path unet D:\\ComfyUI\\models\\unet\n"}
112
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path checkpoints D:\\AI_Models\\models\\checkpoints\n"}
113
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path classifiers D:\\AI_Models\\models\\classifiers\n"}
114
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip_vision D:\\AI_Models\\models\\clip_vision\n"}
115
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path configs D:\\AI_Models\\models\\configs\n"}
116
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet D:\\AI_Models\\models\\controlnet\n"}
117
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path controlnet D:\\AI_Models\\models\\t2i_adapter\n"}
118
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusers D:\\AI_Models\\models\\diffusers\n"}
119
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path diffusion_models D:\\AI_Models\\models\\diffusion_models\n"}
120
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path embeddings D:\\AI_Models\\models\\embeddings\n"}
121
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path gligen D:\\AI_Models\\models\\gligen\n"}
122
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path hypernetworks D:\\AI_Models\\models\\hypernetworks\n"}
123
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path latent_upscale_models D:\\AI_Models\\models\\latent_upscale_models\n"}
124
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path loras D:\\AI_Models\\models\\loras\n"}
125
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path model_patches D:\\AI_Models\\models\\model_patches\n"}
126
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path audio_encoders D:\\AI_Models\\models\\audio_encoders\n"}
127
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path photomaker D:\\AI_Models\\models\\photomaker\n"}
128
+ {"t": "2026-09-21T21:29:08.966242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path style_models D:\\AI_Models\\models\\style_models\n"}
129
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path text_encoders D:\\AI_Models\\models\\text_encoders\n"}
130
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path upscale_models D:\\AI_Models\\models\\upscale_models\n"}
131
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path background_removal D:\\AI_Models\\models\\background_removal\n"}
132
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path frame_interpolation D:\\AI_Models\\models\\frame_interpolation\n"}
133
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path geometry_estimation D:\\AI_Models\\models\\geometry_estimation\n"}
134
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path optical_flow D:\\AI_Models\\models\\optical_flow\n"}
135
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path detection D:\\AI_Models\\models\\detection\n"}
136
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae D:\\AI_Models\\models\\vae\n"}
137
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path vae_approx D:\\AI_Models\\models\\vae_approx\n"}
138
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .cache D:\\AI_Models\\models\\.cache\n"}
139
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path .smeltcore-staging D:\\AI_Models\\models\\.smeltcore-staging\n"}
140
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path BiRefNet D:\\AI_Models\\models\\BiRefNet\n"}
141
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path CogVideo D:\\AI_Models\\models\\CogVideo\n"}
142
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path Joy_caption D:\\AI_Models\\models\\Joy_caption\n"}
143
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path LLM D:\\AI_Models\\models\\LLM\n"}
144
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_models D:\\AI_Models\\models\\animatediff_models\n"}
145
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_motion_lora D:\\AI_Models\\models\\animatediff_motion_lora\n"}
146
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path animatediff_video_formats D:\\AI_Models\\models\\animatediff_video_formats\n"}
147
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path blip D:\\AI_Models\\models\\blip\n"}
148
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path dinov3 D:\\AI_Models\\models\\dinov3\n"}
149
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facedetection D:\\AI_Models\\models\\facedetection\n"}
150
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path facerestore_models D:\\AI_Models\\models\\facerestore_models\n"}
151
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path grounding-dino D:\\AI_Models\\models\\grounding-dino\n"}
152
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path insightface D:\\AI_Models\\models\\insightface\n"}
153
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path layerstyle D:\\AI_Models\\models\\layerstyle\n"}
154
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path liveportrait D:\\AI_Models\\models\\liveportrait\n"}
155
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path nsfw_detector D:\\AI_Models\\models\\nsfw_detector\n"}
156
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path reactor D:\\AI_Models\\models\\reactor\n"}
157
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path sam2 D:\\AI_Models\\models\\sam2\n"}
158
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path trellis2 D:\\AI_Models\\models\\trellis2\n"}
159
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path ultralytics D:\\AI_Models\\models\\ultralytics\n"}
160
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path xlabs D:\\AI_Models\\models\\xlabs\n"}
161
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path z-image-adapters D:\\AI_Models\\models\\z-image-adapters\n"}
162
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path clip D:\\AI_Models\\models\\clip\n"}
163
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Adding extra search path unet D:\\AI_Models\\models\\unet\n"}
164
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Setting base directory to: D:\\ComfyUI\n"}
165
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Setting output directory to: D:\\ComfyUI\\output\n"}
166
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Setting input directory to: D:\\ComfyUI\\input\n"}
167
+ {"t": "2026-09-21T21:29:08.967242", "m": "\u001b[32m[INFO]\u001b[0m Setting user directory to: D:\\ComfyUI\\user\n"}
168
+ {"t": "2026-09-21T21:29:09.237269", "m": "[START] Security scan"}
169
+ {"t": "2026-09-21T21:29:09.237269", "m": "\n"}
170
+ {"t": "2026-09-21T21:29:10.175584", "m": "[DONE] Security scan"}
171
+ {"t": "2026-09-21T21:29:10.175584", "m": "\n"}
172
+ {"t": "2026-09-21T21:29:10.177588", "m": "** ComfyUI startup time:"}
173
+ {"t": "2026-09-21T21:29:10.177588", "m": " "}
174
+ {"t": "2026-09-21T21:29:10.177588", "m": "2026-09-21 21:29:10.176"}
175
+ {"t": "2026-09-21T21:29:10.177588", "m": "\n"}
176
+ {"t": "2026-09-21T21:29:10.177588", "m": "** Platform:"}
177
+ {"t": "2026-09-21T21:29:10.177588", "m": "Windows"}
178
+ {"t": "2026-09-21T21:29:10.177588", "m": "** Python version:"}
179
+ {"t": "2026-09-21T21:29:10.177588", "m": "3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)]"}
180
+ {"t": "2026-09-21T21:29:10.177588", "m": "** Python executable:"}
181
+ {"t": "2026-09-21T21:29:10.177588", "m": "D:\\ComfyUI\\.venv-ltx25\\Scripts\\python.exe"}
182
+ {"t": "2026-09-21T21:29:10.177588", "m": "** ComfyUI Path:"}
183
+ {"t": "2026-09-21T21:29:10.177588", "m": "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Installs\\ComfyUI\\ComfyUI"}
184
+ {"t": "2026-09-21T21:29:10.177588", "m": "** ComfyUI Base Folder Path:"}
185
+ {"t": "2026-09-21T21:29:10.177588", "m": "** User directory:"}
186
+ {"t": "2026-09-21T21:29:10.177588", "m": "D:\\ComfyUI\\user"}
187
+ {"t": "2026-09-21T21:29:10.177588", "m": "** ComfyUI-Manager config path:"}
188
+ {"t": "2026-09-21T21:29:10.177588", "m": "D:\\ComfyUI\\user\\__manager\\config.ini"}
189
+ {"t": "2026-09-21T21:29:10.180587", "m": "** Log path:"}
190
+ {"t": "2026-09-21T21:29:10.180587", "m": " "}
191
+ {"t": "2026-09-21T21:29:10.180587", "m": "D:\\ComfyUI\\user\\comfyui.log"}
192
+ {"t": "2026-09-21T21:29:10.180587", "m": "\n"}
193
+ {"t": "2026-09-21T21:29:11.127993", "m": "\u001b[32m[INFO]\u001b[0m [PRE] ComfyUI-Manager\n"}
194
+ {"t": "2026-09-21T21:29:13.413074", "m": "\u001b[1m\u001b[33m[WARNING]\u001b[0m WARNING: You need pytorch with cu130 or higher to use optimized CUDA operations.\nWARNING WARNING WARNING\nIf you are on nvidia 20 series and above it is required that you update your pytorch to cu130 or higher.\n\n"}
195
+ {"t": "2026-09-21T21:29:13.413074", "m": "\u001b[32m[INFO]\u001b[0m Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_embedding', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'fp16_conv3d', 'fp16_linear', 'gemv_awq_w4a16', 'group_norm_silu_pad3d', 'int8_linear', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'sol_attn', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}\n"}
196
+ {"t": "2026-09-21T21:29:13.413074", "m": "\u001b[32m[INFO]\u001b[0m Found comfy_kitchen backend cuda: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'fp16_conv3d', 'fp16_linear', 'gemv_awq_w4a16', 'group_norm_silu_pad3d', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_svdquant_w4a4', 'sol_attn', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}\n"}
197
+ {"t": "2026-09-21T21:29:13.413074", "m": "\u001b[32m[INFO]\u001b[0m Found comfy_kitchen backend triton: {'available': False, 'disabled': True, 'unavailable_reason': \"ImportError: No module named 'triton'\", 'capabilities': []}\n"}
198
+ {"t": "2026-09-21T21:29:13.413074", "m": "\u001b[32m[INFO]\u001b[0m Found comfy_kitchen backend hip: {'available': False, 'disabled': False, 'unavailable_reason': 'PyTorch ROCm/HIP runtime not available', 'capabilities': []}\n"}
199
+ {"t": "2026-09-21T21:29:13.420124", "m": "\u001b[32m[INFO]\u001b[0m Checkpoint files will always be loaded safely.\n"}
200
+ {"t": "2026-09-21T21:29:13.496121", "m": "\u001b[32m[INFO]\u001b[0m Total VRAM 16311 MB, total RAM 31801 MB\n"}
201
+ {"t": "2026-09-21T21:29:13.496121", "m": "\u001b[32m[INFO]\u001b[0m pytorch version: 2.12.0.dev20260220+cu128\n"}
202
+ {"t": "2026-09-21T21:29:13.497121", "m": "\u001b[32m[INFO]\u001b[0m Set vram state to: NORMAL_VRAM\n"}
203
+ {"t": "2026-09-21T21:29:13.497121", "m": "\u001b[32m[INFO]\u001b[0m Device: cuda:0 NVIDIA GeForce RTX 5060 Ti : cudaMallocAsync\n"}
204
+ {"t": "2026-09-21T21:29:13.515127", "m": "\u001b[32m[INFO]\u001b[0m Using async weight offloading with 2 streams\n"}
205
+ {"t": "2026-09-21T21:29:13.515127", "m": "\u001b[32m[INFO]\u001b[0m Enabled pinned memory 12720.0\n"}
206
+ {"t": "2026-09-21T21:29:13.539013", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention\n"}
207
+ {"t": "2026-09-21T21:29:16.249514", "m": "\u001b[32m[INFO]\u001b[0m aimdo: src-win/cuda-detour.c:38:INFO:aimdo_setup_hooks: installing 6 hooks\n"}
208
+ {"t": "2026-09-21T21:29:16.268511", "m": "\u001b[32m[INFO]\u001b[0m aimdo: src/control.c:269:INFO:comfy-aimdo NVML pressure enabled\n"}
209
+ {"t": "2026-09-21T21:29:16.276511", "m": "\u001b[32m[INFO]\u001b[0m aimdo: src-win/shmem-detect.c:80:INFO:comfy-aimdo WDDM adapter match: NVIDIA GeForce RTX 5060 Ti runtime_luid=00000000:0000e003 dxgi_luid=00000000:0000e003\n"}
210
+ {"t": "2026-09-21T21:29:16.276511", "m": "\u001b[32m[INFO]\u001b[0m aimdo: src/control.c:284:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 5060 Ti (VRAM: 16310 MB)\n"}
211
+ {"t": "2026-09-21T21:29:16.276511", "m": "\u001b[32m[INFO]\u001b[0m DynamicVRAM support detected and enabled\n"}
212
+ {"t": "2026-09-21T21:29:16.276511", "m": "\u001b[32m[INFO]\u001b[0m Python version: 3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)]\n"}
213
+ {"t": "2026-09-21T21:29:16.276511", "m": "\u001b[32m[INFO]\u001b[0m ComfyUI version: 0.37.0\n"}
214
+ {"t": "2026-09-21T21:29:16.277513", "m": "\u001b[32m[INFO]\u001b[0m comfy-aimdo version: 0.5.5\n"}
215
+ {"t": "2026-09-21T21:29:16.277513", "m": "\u001b[32m[INFO]\u001b[0m comfy-kitchen version: 0.2.35\n"}
216
+ {"t": "2026-09-21T21:29:16.281516", "m": "\u001b[32m[INFO]\u001b[0m comfyui-frontend-package version: 1.53.6\n"}
217
+ {"t": "2026-09-21T21:29:16.281516", "m": "\u001b[32m[INFO]\u001b[0m comfyui-workflow-templates version: 0.11.66\n"}
218
+ {"t": "2026-09-21T21:29:16.281516", "m": "\u001b[32m[INFO]\u001b[0m comfyui-embedded-docs version: 0.5.12\n"}
219
+ {"t": "2026-09-21T21:29:16.281516", "m": "\u001b[32m[INFO]\u001b[0m comfy-kitchen version: 0.2.35\n"}
220
+ {"t": "2026-09-21T21:29:16.281516", "m": "\u001b[32m[INFO]\u001b[0m comfy-aimdo version: 0.5.5\n"}
221
+ {"t": "2026-09-21T21:29:16.283513", "m": "\u001b[32m[INFO]\u001b[0m [Prompt Server] web root: D:\\ComfyUI\\.venv-ltx25\\Lib\\site-packages\\comfyui_frontend_package\\static\n"}
222
+ {"t": "2026-09-21T21:29:16.283513", "m": "\u001b[32m[INFO]\u001b[0m Asset seeder disabled\n"}
223
+ {"t": "2026-09-21T21:29:16.283513", "m": "\u001b[32m[INFO]\u001b[0m [START] ComfyUI-Manager\n"}
224
+ {"t": "2026-09-21T21:29:16.405527", "m": "[ComfyUI-Manager] Using GitPython backend"}
225
+ {"t": "2026-09-21T21:29:16.405527", "m": "\n"}
226
+ {"t": "2026-09-21T21:29:16.434587", "m": "\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] network_mode: public\n"}
227
+ {"t": "2026-09-21T21:29:16.439588", "m": "\u001b[1m\u001b[33m[WARNING]\u001b[0m [ComfyUI-Manager] The matrix sharing feature has been disabled because the `matrix-nio` dependency is not installed.\n\tTo use this feature, please run the following command:\n\tD:\\ComfyUI\\.venv-ltx25\\Scripts\\python.exe -m pip install matrix-nio\n\n"}
228
+ {"t": "2026-09-21T21:29:17.692072", "m": "\u001b[32m[INFO]\u001b[0m No OpenGL_accelerate module loaded: Acceleration disabled\n"}
229
+ {"t": "2026-09-21T21:29:18.571474", "m": "Adding"}
230
+ {"t": "2026-09-21T21:29:18.571474", "m": " "}
231
+ {"t": "2026-09-21T21:29:18.571474", "m": "D:\\ComfyUI\\custom_nodes"}
232
+ {"t": "2026-09-21T21:29:18.571474", "m": "to sys.path"}
233
+ {"t": "2026-09-21T21:29:18.571474", "m": "\n"}
234
+ {"t": "2026-09-21T21:29:18.586530", "m": "Could not find efficiency nodes"}
235
+ {"t": "2026-09-21T21:29:18.586530", "m": "\n"}
236
+ {"t": "2026-09-21T21:29:18.589531", "m": "Could not find comfyui_controlnet_aux nodes, AV_ControlNetPreprocessor will not work. Please install comfyui_controlnet_aux first"}
237
+ {"t": "2026-09-21T21:29:18.589531", "m": "\n"}
238
+ {"t": "2026-09-21T21:29:18.590530", "m": "Could not find AdvancedControlNet nodes"}
239
+ {"t": "2026-09-21T21:29:18.590530", "m": "\n"}
240
+ {"t": "2026-09-21T21:29:18.591531", "m": "Could not find AnimateDiff nodes"}
241
+ {"t": "2026-09-21T21:29:18.591531", "m": "\n"}
242
+ {"t": "2026-09-21T21:29:18.592530", "m": "Could not find IPAdapter nodes"}
243
+ {"t": "2026-09-21T21:29:18.592530", "m": "\n"}
244
+ {"t": "2026-09-21T21:29:18.596527", "m": "Could not find VideoHelperSuite nodes"}
245
+ {"t": "2026-09-21T21:29:18.596527", "m": "\n"}
246
+ {"t": "2026-09-21T21:29:18.597531", "m": "Could not load ImpactPack nodes"}
247
+ {"t": "2026-09-21T21:29:18.597531", "m": " "}
248
+ {"t": "2026-09-21T21:29:18.597531", "m": "Could not find ImpactPack nodes"}
249
+ {"t": "2026-09-21T21:29:18.597531", "m": "\n"}
250
+ {"t": "2026-09-21T21:29:18.623044", "m": "\u001b[32m[INFO]\u001b[0m ComfyUI-GGUF: Allowing full torch compile\n"}
251
+ {"t": "2026-09-21T21:29:18.626041", "m": "[krea2edit] nodes v1.2.5 loaded"}
252
+ {"t": "2026-09-21T21:29:18.626041", "m": "\n"}
253
+ {"t": "2026-09-21T21:29:18.645041", "m": "Crypto library not found. Please install pycryptodome."}
254
+ {"t": "2026-09-21T21:29:18.645041", "m": "\n"}
255
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m \nImport times for custom nodes:\n"}
256
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m 0.0 seconds: D:\\ComfyUI\\custom_nodes\\comfyui-krea2edit\n"}
257
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m 0.0 seconds: D:\\ComfyUI\\custom_nodes\\ComfyUI-GGUF\n"}
258
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m 0.0 seconds: D:\\ComfyUI\\custom_nodes\\ComfyUI-LogicUtils\n"}
259
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m 0.0 seconds: D:\\ComfyUI\\custom_nodes\\comfyui-art-venture\n"}
260
+ {"t": "2026-09-21T21:29:18.651043", "m": "\u001b[32m[INFO]\u001b[0m \n"}
261
+ {"t": "2026-09-21T21:29:18.655040", "m": "\u001b[32m[INFO]\u001b[0m Context impl SQLiteImpl.\n"}
262
+ {"t": "2026-09-21T21:29:18.655040", "m": "\u001b[32m[INFO]\u001b[0m Will assume non-transactional DDL.\n"}
263
+ {"t": "2026-09-21T21:29:18.761043", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
264
+ {"t": "2026-09-21T21:29:18.762043", "m": "\u001b[32m[INFO]\u001b[0m Starting server\n\n"}
265
+ {"t": "2026-09-21T21:29:18.762043", "m": "\u001b[32m[INFO]\u001b[0m To see the GUI go to: http://0.0.0.0:8000\n"}
266
+ {"t": "2026-09-21T21:29:19.664123", "m": "\u001b[1m\u001b[33m[WARNING]\u001b[0m [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.\n"}
267
+ {"t": "2026-09-21T21:29:20.267119", "m": "\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] The ComfyRegistry cache update is still in progress, so an outdated cache is being used.\n"}
268
+ {"t": "2026-09-21T21:29:20.338118", "m": "FETCH DATA from: D:\\ComfyUI\\.venv-ltx25\\Lib\\site-packages\\comfyui_manager\\custom-node-list.json"}
269
+ {"t": "2026-09-21T21:29:20.338118", "m": ""}
270
+ {"t": "2026-09-21T21:29:20.352118", "m": " [DONE]"}
271
+ {"t": "2026-09-21T21:29:20.352118", "m": "\n"}
272
+ {"t": "2026-09-21T21:32:45.002114", "m": "\u001b[32m[INFO]\u001b[0m FETCH ComfyRegistry Data [DONE]\n"}
273
+ {"t": "2026-09-21T21:32:45.165711", "m": "\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes\n"}
274
+ {"t": "2026-09-21T21:32:45.196714", "m": "FETCH DATA from: D:\\ComfyUI\\user\\__manager\\cache\\1514988643_custom-node-list.json"}
275
+ {"t": "2026-09-21T21:32:45.196714", "m": ""}
276
+ {"t": "2026-09-21T21:32:45.216521", "m": " [DONE]"}
277
+ {"t": "2026-09-21T21:32:45.216521", "m": "\n"}
278
+ {"t": "2026-09-21T21:32:45.562919", "m": "\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] All startup tasks have been completed.\n"}
279
+ {"t": "2026-09-21T21:41:27.555460", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
280
+ {"t": "2026-09-21T21:41:30.577807", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
281
+ {"t": "2026-09-21T21:41:33.843451", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
282
+ {"t": "2026-09-21T21:41:33.869662", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
283
+ {"t": "2026-09-21T21:41:33.875663", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
284
+ {"t": "2026-09-21T21:41:33.877663", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
285
+ {"t": "2026-09-21T21:41:34.319398", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
286
+ {"t": "2026-09-21T21:41:34.335452", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
287
+ {"t": "2026-09-21T21:41:34.336452", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
288
+ {"t": "2026-09-21T21:41:34.593120", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
289
+ {"t": "2026-09-21T21:41:34.633119", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
290
+ {"t": "2026-09-21T21:41:34.637119", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
291
+ {"t": "2026-09-21T21:41:34.757285", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
292
+ {"t": "2026-09-21T21:41:36.796011", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
293
+ {"t": "2026-09-21T21:41:37.563172", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
294
+ {"t": "2026-09-21T21:41:37.563172", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
295
+ {"t": "2026-09-21T21:41:37.563172", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
296
+ {"t": "2026-09-21T21:41:37.563172", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
297
+ {"t": "2026-09-21T21:41:37.570171", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
298
+ {"t": "2026-09-21T21:41:37.572171", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
299
+ {"t": "2026-09-21T21:41:37.572171", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
300
+ {"t": "2026-09-21T21:41:37.681434", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
301
+ {"t": "2026-09-21T21:41:37.703719", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
302
+ {"t": "2026-09-21T21:41:51.787510", "m": "\r 20%|██ | 5/25 [00:11<00:39, 1.98s/it]"}
303
+ {"t": "2026-09-21T21:42:14.168175", "m": "\r 56%|█████▌ | 14/25 [00:34<00:27, 2.49s/it]"}
304
+ {"t": "2026-09-21T21:42:34.083275", "m": "\r 88%|████████▊ | 22/25 [00:54<00:07, 2.49s/it]"}
305
+ {"t": "2026-09-21T21:42:41.550920", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.48s/it]"}
306
+ {"t": "2026-09-21T21:42:41.550920", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.47s/it]"}
307
+ {"t": "2026-09-21T21:42:41.550920", "m": "\n"}
308
+ {"t": "2026-09-21T21:42:42.091808", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
309
+ {"t": "2026-09-21T21:42:42.094807", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
310
+ {"t": "2026-09-21T21:42:42.114865", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
311
+ {"t": "2026-09-21T21:42:43.254991", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 69.41 seconds\u001b[0m\n"}
312
+ {"t": "2026-09-21T21:42:44.211882", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
313
+ {"t": "2026-09-21T21:42:46.912124", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
314
+ {"t": "2026-09-21T21:42:46.921123", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
315
+ {"t": "2026-09-21T21:42:46.925126", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
316
+ {"t": "2026-09-21T21:42:46.926126", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
317
+ {"t": "2026-09-21T21:42:47.336365", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
318
+ {"t": "2026-09-21T21:42:47.352368", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
319
+ {"t": "2026-09-21T21:42:47.352368", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
320
+ {"t": "2026-09-21T21:42:47.573314", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
321
+ {"t": "2026-09-21T21:42:47.592823", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
322
+ {"t": "2026-09-21T21:42:47.595820", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
323
+ {"t": "2026-09-21T21:42:47.636820", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
324
+ {"t": "2026-09-21T21:42:48.984469", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
325
+ {"t": "2026-09-21T21:42:49.686040", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
326
+ {"t": "2026-09-21T21:42:49.686040", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
327
+ {"t": "2026-09-21T21:42:49.687040", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
328
+ {"t": "2026-09-21T21:42:49.687040", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
329
+ {"t": "2026-09-21T21:42:49.693042", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
330
+ {"t": "2026-09-21T21:42:49.694043", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
331
+ {"t": "2026-09-21T21:42:49.695044", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
332
+ {"t": "2026-09-21T21:42:49.719294", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
333
+ {"t": "2026-09-21T21:42:49.746293", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
334
+ {"t": "2026-09-21T21:42:49.747295", "m": "\r 0%| | 0/25 [00:00<?, ?it/s, Model Initializing ... ]"}
335
+ {"t": "2026-09-21T21:43:13.983087", "m": "\r 8%|▊ | 2/25 [00:23<04:26, 11.60s/it]"}
336
+ {"t": "2026-09-21T21:43:25.575912", "m": "\r 12%|█▏ | 3/25 [00:34<04:15, 11.59s/it]"}
337
+ {"t": "2026-09-21T21:43:48.770465", "m": "\r 20%|██ | 5/25 [00:57<03:51, 11.60s/it]"}
338
+ {"t": "2026-09-21T21:44:09.855519", "m": "\r 28%|██▊ | 7/25 [01:19<03:29, 11.61s/it]"}
339
+ {"t": "2026-09-21T21:44:33.043782", "m": "\r 36%|███▌ | 9/25 [01:42<03:05, 11.60s/it]"}
340
+ {"t": "2026-09-21T21:44:56.255842", "m": "\r 44%|████▍ | 11/25 [02:05<02:42, 11.61s/it]"}
341
+ {"t": "2026-09-21T21:45:07.853210", "m": "\r 48%|████▊ | 12/25 [02:17<02:30, 11.60s/it]"}
342
+ {"t": "2026-09-21T21:45:31.059913", "m": "\r 56%|█████▌ | 14/25 [02:40<02:07, 11.61s/it]"}
343
+ {"t": "2026-09-21T21:45:54.250344", "m": "\r 64%|██████▍ | 16/25 [03:03<01:44, 11.59s/it]"}
344
+ {"t": "2026-09-21T21:46:17.451210", "m": "\r 72%|███████▏ | 18/25 [03:26<01:21, 11.59s/it]"}
345
+ {"t": "2026-09-21T21:46:29.046069", "m": "\r 76%|███████▌ | 19/25 [03:38<01:09, 11.59s/it]"}
346
+ {"t": "2026-09-21T21:46:52.237011", "m": "\r 84%|████████▍ | 21/25 [04:01<00:46, 11.60s/it]"}
347
+ {"t": "2026-09-21T21:47:15.433037", "m": "\r 92%|█████████▏| 23/25 [04:24<00:23, 11.60s/it]"}
348
+ {"t": "2026-09-21T21:47:27.032638", "m": "\r 96%|█████████▌| 24/25 [04:36<00:11, 11.60s/it]"}
349
+ {"t": "2026-09-21T21:47:38.642051", "m": "\r100%|██████████| 25/25 [04:47<00:00, 11.61s/it]"}
350
+ {"t": "2026-09-21T21:47:38.642051", "m": "\r100%|██████████| 25/25 [04:47<00:00, 11.51s/it]"}
351
+ {"t": "2026-09-21T21:47:38.642051", "m": "\n"}
352
+ {"t": "2026-09-21T21:47:40.843356", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
353
+ {"t": "2026-09-21T21:47:40.849534", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
354
+ {"t": "2026-09-21T21:47:40.851534", "m": "\u001b[32m[INFO]\u001b[0m 0 models unloaded.\n"}
355
+ {"t": "2026-09-21T21:47:40.862533", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
356
+ {"t": "2026-09-21T21:47:44.835132", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 297.92 seconds\u001b[0m\n"}
357
+ {"t": "2026-09-21T21:47:46.429313", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
358
+ {"t": "2026-09-21T21:47:49.165280", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
359
+ {"t": "2026-09-21T21:47:49.174284", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
360
+ {"t": "2026-09-21T21:47:49.178278", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
361
+ {"t": "2026-09-21T21:47:49.179278", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
362
+ {"t": "2026-09-21T21:47:49.568107", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
363
+ {"t": "2026-09-21T21:47:49.580112", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
364
+ {"t": "2026-09-21T21:47:49.580112", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
365
+ {"t": "2026-09-21T21:47:49.792875", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
366
+ {"t": "2026-09-21T21:47:49.812381", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
367
+ {"t": "2026-09-21T21:47:49.815381", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
368
+ {"t": "2026-09-21T21:47:49.874471", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
369
+ {"t": "2026-09-21T21:47:51.219430", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
370
+ {"t": "2026-09-21T21:47:51.921876", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
371
+ {"t": "2026-09-21T21:47:51.921876", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
372
+ {"t": "2026-09-21T21:47:51.921876", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
373
+ {"t": "2026-09-21T21:47:51.921876", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
374
+ {"t": "2026-09-21T21:47:51.927874", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
375
+ {"t": "2026-09-21T21:47:51.928873", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
376
+ {"t": "2026-09-21T21:47:51.929874", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
377
+ {"t": "2026-09-21T21:47:51.947881", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
378
+ {"t": "2026-09-21T21:47:51.970175", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
379
+ {"t": "2026-09-21T21:47:57.308143", "m": "\r 5%|▌ | 2/40 [00:04<01:19, 2.09s/it]"}
380
+ {"t": "2026-09-21T21:48:17.235970", "m": "\r 25%|██▌ | 10/40 [00:24<01:14, 2.49s/it]"}
381
+ {"t": "2026-09-21T21:48:39.671503", "m": "\r 48%|████▊ | 19/40 [00:46<00:52, 2.50s/it]"}
382
+ {"t": "2026-09-21T21:48:59.602494", "m": "\r 68%|██████▊ | 27/40 [01:06<00:32, 2.49s/it]"}
383
+ {"t": "2026-09-21T21:49:19.544835", "m": "\r 88%|████████▊ | 35/40 [01:26<00:12, 2.50s/it]"}
384
+ {"t": "2026-09-21T21:49:32.000182", "m": "\r100%|██████████| 40/40 [01:38<00:00, 2.48s/it]"}
385
+ {"t": "2026-09-21T21:49:32.000182", "m": "\r100%|██████████| 40/40 [01:38<00:00, 2.47s/it]"}
386
+ {"t": "2026-09-21T21:49:32.000182", "m": "\n"}
387
+ {"t": "2026-09-21T21:49:32.543343", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
388
+ {"t": "2026-09-21T21:49:32.546343", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
389
+ {"t": "2026-09-21T21:49:32.558382", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
390
+ {"t": "2026-09-21T21:49:33.493854", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 104.33 seconds\u001b[0m\n"}
391
+ {"t": "2026-09-21T21:49:35.339741", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
392
+ {"t": "2026-09-21T21:49:38.022649", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
393
+ {"t": "2026-09-21T21:49:38.031648", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
394
+ {"t": "2026-09-21T21:49:38.034648", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
395
+ {"t": "2026-09-21T21:49:38.035651", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
396
+ {"t": "2026-09-21T21:49:38.393797", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
397
+ {"t": "2026-09-21T21:49:38.404801", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
398
+ {"t": "2026-09-21T21:49:38.405802", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
399
+ {"t": "2026-09-21T21:49:38.616983", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
400
+ {"t": "2026-09-21T21:49:38.636983", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
401
+ {"t": "2026-09-21T21:49:38.639983", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
402
+ {"t": "2026-09-21T21:49:38.686491", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
403
+ {"t": "2026-09-21T21:49:39.996973", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
404
+ {"t": "2026-09-21T21:49:40.701025", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
405
+ {"t": "2026-09-21T21:49:40.701025", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
406
+ {"t": "2026-09-21T21:49:40.701025", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
407
+ {"t": "2026-09-21T21:49:40.701025", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
408
+ {"t": "2026-09-21T21:49:40.706065", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
409
+ {"t": "2026-09-21T21:49:40.707778", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
410
+ {"t": "2026-09-21T21:49:40.708783", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
411
+ {"t": "2026-09-21T21:49:40.731054", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
412
+ {"t": "2026-09-21T21:49:40.755163", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
413
+ {"t": "2026-09-21T21:49:40.757163", "m": "\r 0%| | 0/25 [00:00<?, ?it/s, Model Initializing ... ]"}
414
+ {"t": "2026-09-21T21:49:53.486051", "m": "\r 4%|▍ | 1/25 [00:12<05:05, 12.73s/it, Model Initialization complete! ]"}
415
+ {"t": "2026-09-21T21:50:17.147851", "m": "\r 12%|█▏ | 3/25 [00:35<04:19, 11.81s/it]"}
416
+ {"t": "2026-09-21T21:50:40.748203", "m": "\r 20%|██ | 5/25 [00:59<03:56, 11.81s/it]"}
417
+ {"t": "2026-09-21T21:50:50.593223", "m": "\r 24%|██▍ | 6/25 [01:08<03:07, 9.84s/it]"}
418
+ {"t": "2026-09-21T21:51:14.033251", "m": "\r 32%|███▏ | 8/25 [01:32<03:19, 11.71s/it]"}
419
+ {"t": "2026-09-21T21:51:37.477691", "m": "\r 40%|████ | 10/25 [01:55<02:55, 11.72s/it]"}
420
+ {"t": "2026-09-21T21:52:00.893911", "m": "\r 48%|████▊ | 12/25 [02:19<02:32, 11.71s/it]"}
421
+ {"t": "2026-09-21T21:52:12.608575", "m": "\r 52%|█████▏ | 13/25 [02:30<02:20, 11.71s/it]"}
422
+ {"t": "2026-09-21T21:52:36.028081", "m": "\r 60%|██████ | 15/25 [02:54<01:57, 11.72s/it]"}
423
+ {"t": "2026-09-21T21:52:59.447628", "m": "\r 68%|██████▊ | 17/25 [03:17<01:33, 11.71s/it]"}
424
+ {"t": "2026-09-21T21:53:22.871291", "m": "\r 76%|███████▌ | 19/25 [03:41<01:10, 11.72s/it]"}
425
+ {"t": "2026-09-21T21:53:34.582671", "m": "\r 80%|████████ | 20/25 [03:52<00:58, 11.71s/it]"}
426
+ {"t": "2026-09-21T21:53:57.992051", "m": "\r 88%|████████▊ | 22/25 [04:16<00:35, 11.71s/it]"}
427
+ {"t": "2026-09-21T21:54:21.417307", "m": "\r 96%|█████████▌| 24/25 [04:39<00:11, 11.70s/it]"}
428
+ {"t": "2026-09-21T21:54:33.137018", "m": "\r100%|██████████| 25/25 [04:51<00:00, 11.72s/it]"}
429
+ {"t": "2026-09-21T21:54:33.137018", "m": "\r100%|██████████| 25/25 [04:51<00:00, 11.66s/it]"}
430
+ {"t": "2026-09-21T21:54:33.137018", "m": "\n"}
431
+ {"t": "2026-09-21T21:54:35.099675", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
432
+ {"t": "2026-09-21T21:54:35.105674", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
433
+ {"t": "2026-09-21T21:54:35.107675", "m": "\u001b[32m[INFO]\u001b[0m 0 models unloaded.\n"}
434
+ {"t": "2026-09-21T21:54:35.117675", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
435
+ {"t": "2026-09-21T21:54:39.188431", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 301.16 seconds\u001b[0m\n"}
436
+ {"t": "2026-09-21T21:54:40.672695", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
437
+ {"t": "2026-09-21T21:54:46.151022", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
438
+ {"t": "2026-09-21T21:54:46.161024", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
439
+ {"t": "2026-09-21T21:54:46.166022", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
440
+ {"t": "2026-09-21T21:54:46.167023", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
441
+ {"t": "2026-09-21T21:54:46.574815", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
442
+ {"t": "2026-09-21T21:54:46.592843", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
443
+ {"t": "2026-09-21T21:54:46.594418", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
444
+ {"t": "2026-09-21T21:54:46.820116", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_w4a8.safetensors']\n"}
445
+ {"t": "2026-09-21T21:54:47.496868", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
446
+ {"t": "2026-09-21T21:54:47.499868", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
447
+ {"t": "2026-09-21T21:54:47.562375", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 6018MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
448
+ {"t": "2026-09-21T21:54:50.558213", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 6018MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
449
+ {"t": "2026-09-21T21:54:52.981779", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
450
+ {"t": "2026-09-21T21:54:52.982778", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
451
+ {"t": "2026-09-21T21:54:52.982778", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
452
+ {"t": "2026-09-21T21:54:52.982778", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
453
+ {"t": "2026-09-21T21:54:52.987778", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
454
+ {"t": "2026-09-21T21:54:52.988781", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
455
+ {"t": "2026-09-21T21:54:52.989779", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
456
+ {"t": "2026-09-21T21:54:53.007778", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
457
+ {"t": "2026-09-21T21:54:53.036291", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
458
+ {"t": "2026-09-21T21:55:05.737059", "m": "\r 20%|██ | 5/25 [00:11<00:50, 2.50s/it]"}
459
+ {"t": "2026-09-21T21:55:25.658327", "m": "\r 52%|█████▏ | 13/25 [00:31<00:29, 2.48s/it]"}
460
+ {"t": "2026-09-21T21:55:45.598728", "m": "\r 84%|████████▍ | 21/25 [00:51<00:09, 2.48s/it]"}
461
+ {"t": "2026-09-21T21:55:55.581689", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.50s/it]"}
462
+ {"t": "2026-09-21T21:55:55.581689", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.46s/it]"}
463
+ {"t": "2026-09-21T21:55:55.581689", "m": "\n"}
464
+ {"t": "2026-09-21T21:55:56.118325", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
465
+ {"t": "2026-09-21T21:55:56.122325", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
466
+ {"t": "2026-09-21T21:55:56.134555", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
467
+ {"t": "2026-09-21T21:55:57.057177", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 70.90 seconds\u001b[0m\n"}
468
+ {"t": "2026-09-21T21:55:59.120659", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
469
+ {"t": "2026-09-21T21:56:02.073571", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
470
+ {"t": "2026-09-21T21:56:02.082569", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
471
+ {"t": "2026-09-21T21:56:02.085570", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
472
+ {"t": "2026-09-21T21:56:02.087567", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
473
+ {"t": "2026-09-21T21:56:02.448550", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
474
+ {"t": "2026-09-21T21:56:02.461551", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
475
+ {"t": "2026-09-21T21:56:02.462550", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
476
+ {"t": "2026-09-21T21:56:02.676564", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
477
+ {"t": "2026-09-21T21:56:02.699355", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
478
+ {"t": "2026-09-21T21:56:02.701355", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
479
+ {"t": "2026-09-21T21:56:02.751861", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
480
+ {"t": "2026-09-21T21:56:04.447049", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
481
+ {"t": "2026-09-21T21:56:05.159212", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: None\n"}
482
+ {"t": "2026-09-21T21:56:05.160760", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
483
+ {"t": "2026-09-21T21:56:05.162303", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_bf16.safetensors']\n"}
484
+ {"t": "2026-09-21T21:56:05.170834", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
485
+ {"t": "2026-09-21T21:56:05.205837", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 13571MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
486
+ {"t": "2026-09-21T21:56:05.206837", "m": "\r 0%| | 0/25 [00:00<?, ?it/s, Model Initializing ... ]"}
487
+ {"t": "2026-09-21T21:56:26.584997", "m": "\r 52%|█████▏ | 13/25 [00:19<00:09, 1.23it/s]"}
488
+ {"t": "2026-09-21T21:56:45.684392", "m": "\r100%|██████████| 25/25 [00:38<00:00, 1.58s/it]"}
489
+ {"t": "2026-09-21T21:56:45.684392", "m": "\r100%|██████████| 25/25 [00:38<00:00, 1.53s/it]"}
490
+ {"t": "2026-09-21T21:56:45.684392", "m": "\n"}
491
+ {"t": "2026-09-21T21:56:47.248168", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
492
+ {"t": "2026-09-21T21:56:47.258171", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
493
+ {"t": "2026-09-21T21:56:47.261174", "m": "\u001b[32m[INFO]\u001b[0m 0 models unloaded.\n"}
494
+ {"t": "2026-09-21T21:56:47.290679", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
495
+ {"t": "2026-09-21T21:56:48.247603", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 46.17 seconds\u001b[0m\n"}
496
+ {"t": "2026-09-21T21:56:49.458366", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
497
+ {"t": "2026-09-21T21:56:52.599082", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
498
+ {"t": "2026-09-21T21:56:52.608083", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
499
+ {"t": "2026-09-21T21:56:52.612084", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
500
+ {"t": "2026-09-21T21:56:52.613082", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
501
+ {"t": "2026-09-21T21:56:52.947906", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
502
+ {"t": "2026-09-21T21:56:52.958906", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
503
+ {"t": "2026-09-21T21:56:52.959909", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
504
+ {"t": "2026-09-21T21:56:53.180434", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
505
+ {"t": "2026-09-21T21:56:53.203508", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
506
+ {"t": "2026-09-21T21:56:53.205511", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
507
+ {"t": "2026-09-21T21:56:53.254511", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
508
+ {"t": "2026-09-21T21:56:54.934361", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
509
+ {"t": "2026-09-21T21:56:55.642962", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: None\n"}
510
+ {"t": "2026-09-21T21:56:55.644962", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
511
+ {"t": "2026-09-21T21:56:55.644962", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_bf16.safetensors']\n"}
512
+ {"t": "2026-09-21T21:56:55.658962", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
513
+ {"t": "2026-09-21T21:56:55.681964", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 13571MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
514
+ {"t": "2026-09-21T21:57:06.555860", "m": "\r 8%|▊ | 2/25 [00:00<00:05, 3.90it/s]"}
515
+ {"t": "2026-09-21T21:57:22.942106", "m": "\r 12%|█▏ | 3/25 [00:16<06:00, 16.39s/it]"}
516
+ {"t": "2026-09-21T21:57:39.543432", "m": "\r 20%|██ | 5/25 [00:33<02:46, 8.30s/it]"}
517
+ {"t": "2026-09-21T21:58:04.506259", "m": "\r 36%|███▌ | 9/25 [00:58<01:06, 4.17s/it]"}
518
+ {"t": "2026-09-21T21:58:21.111025", "m": "\r 44%|████▍ | 11/25 [01:15<01:56, 8.30s/it]"}
519
+ {"t": "2026-09-21T21:58:46.020572", "m": "\r 56%|█████▌ | 14/25 [01:39<01:31, 8.30s/it]"}
520
+ {"t": "2026-09-21T21:59:02.639937", "m": "\r 64%|██████▍ | 16/25 [01:56<01:14, 8.31s/it]"}
521
+ {"t": "2026-09-21T21:59:27.558378", "m": "\r 76%|███████▌ | 19/25 [02:21<00:49, 8.30s/it]"}
522
+ {"t": "2026-09-21T21:59:35.872534", "m": "\r 80%|████████ | 20/25 [02:29<00:41, 8.31s/it]"}
523
+ {"t": "2026-09-21T22:00:09.271419", "m": "\r 96%|█████████▌| 24/25 [03:03<00:08, 8.34s/it]"}
524
+ {"t": "2026-09-21T22:00:17.615086", "m": "\r100%|██████████| 25/25 [03:11<00:00, 8.34s/it]"}
525
+ {"t": "2026-09-21T22:00:17.615086", "m": "\r100%|██████████| 25/25 [03:11<00:00, 7.66s/it]"}
526
+ {"t": "2026-09-21T22:00:17.615086", "m": "\n"}
527
+ {"t": "2026-09-21T22:00:25.941189", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
528
+ {"t": "2026-09-21T22:00:25.955191", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
529
+ {"t": "2026-09-21T22:00:25.957192", "m": "\u001b[32m[INFO]\u001b[0m 0 models unloaded.\n"}
530
+ {"t": "2026-09-21T22:00:25.981385", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
531
+ {"t": "2026-09-21T22:00:30.007437", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 217.41 seconds\u001b[0m\n"}
532
+ {"t": "2026-09-21T22:00:31.331299", "m": "\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n"}
533
+ {"t": "2026-09-21T22:00:33.893420", "m": "\u001b[32m[INFO]\u001b[0m got prompt\n"}
534
+ {"t": "2026-09-21T22:00:33.903421", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\vae\\\\qwen_image_2.1_vae_bf16.safetensors']\n"}
535
+ {"t": "2026-09-21T22:00:33.907420", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
536
+ {"t": "2026-09-21T22:00:33.908423", "m": "\u001b[32m[INFO]\u001b[0m Using pytorch attention in VAE\n"}
537
+ {"t": "2026-09-21T22:00:34.261329", "m": "\u001b[32m[INFO]\u001b[0m VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16\n"}
538
+ {"t": "2026-09-21T22:00:34.273892", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
539
+ {"t": "2026-09-21T22:00:34.274892", "m": "\u001b[32m[INFO]\u001b[0m Using MixedPrecisionOps for text encoder\n"}
540
+ {"t": "2026-09-21T22:00:34.547977", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\text_encoders\\\\qwen3vl_8b_int8_convrot.safetensors']\n"}
541
+ {"t": "2026-09-21T22:00:34.576183", "m": "\u001b[32m[INFO]\u001b[0m CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16\n"}
542
+ {"t": "2026-09-21T22:00:34.580224", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21TEModel_\n"}
543
+ {"t": "2026-09-21T22:00:34.638322", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
544
+ {"t": "2026-09-21T22:00:36.333601", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21TEModel_ prepared for dynamic VRAM loading. 8916MB Staged. 0 patches attached. Force pre-loaded 255 weights: 849 KB.\n"}
545
+ {"t": "2026-09-21T22:00:37.043442", "m": "\u001b[32m[INFO]\u001b[0m Found quantization metadata version 1\n"}
546
+ {"t": "2026-09-21T22:00:37.044441", "m": "\u001b[32m[INFO]\u001b[0m Detected mixed precision quantization\n"}
547
+ {"t": "2026-09-21T22:00:37.044441", "m": "\u001b[32m[INFO]\u001b[0m Using mixed precision operations\n"}
548
+ {"t": "2026-09-21T22:00:37.044441", "m": "\u001b[32m[INFO]\u001b[0m Native ops: int8_tensorwise, asym_w4a8_int8, nvfp4, float8_e5m2, mxfp8, convrot_w4a4, float8_e4m3fn \n"}
549
+ {"t": "2026-09-21T22:00:37.050441", "m": "\u001b[32m[INFO]\u001b[0m model weight dtype torch.bfloat16, manual cast: torch.bfloat16\n"}
550
+ {"t": "2026-09-21T22:00:37.051442", "m": "\u001b[32m[INFO]\u001b[0m model_type FLUX\n"}
551
+ {"t": "2026-09-21T22:00:37.051442", "m": "\u001b[32m[INFO]\u001b[0m Model storage policy: fast_disk=True paths=['D:\\\\ComfyUI\\\\models\\\\diffusion_models\\\\qwen_image_2.1_int8_convrot.safetensors']\n"}
552
+ {"t": "2026-09-21T22:00:37.089020", "m": "\u001b[32m[INFO]\u001b[0m Requested to load QwenImage21\n"}
553
+ {"t": "2026-09-21T22:00:37.113021", "m": "\u001b[32m[INFO]\u001b[0m Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.\n"}
554
+ {"t": "2026-09-21T22:00:53.367991", "m": "\r 24%|██▍ | 6/25 [00:14<00:57, 3.00s/it]"}
555
+ {"t": "2026-09-21T22:01:12.833830", "m": "\r 56%|█████▌ | 14/25 [00:34<00:27, 2.49s/it]"}
556
+ {"t": "2026-09-21T22:01:32.817054", "m": "\r 88%|████████▊ | 22/25 [00:54<00:07, 2.49s/it]"}
557
+ {"t": "2026-09-21T22:01:40.313246", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.49s/it]"}
558
+ {"t": "2026-09-21T22:01:40.313246", "m": "\r100%|██████████| 25/25 [01:01<00:00, 2.47s/it]"}
559
+ {"t": "2026-09-21T22:01:40.313246", "m": "\n"}
560
+ {"t": "2026-09-21T22:01:40.859530", "m": "\u001b[32m[INFO]\u001b[0m Comfy model compiler graph breaks: 0, rogues: 0\n"}
561
+ {"t": "2026-09-21T22:01:40.863530", "m": "\u001b[32m[INFO]\u001b[0m Requested to load WanVAE\n"}
562
+ {"t": "2026-09-21T22:01:40.873530", "m": "\u001b[32m[INFO]\u001b[0m Model WanVAE prepared for dynamic VRAM loading. 644MB Staged. 0 patches attached. Force pre-loaded 68 weights: 102 KB.\n"}
563
+ {"t": "2026-09-21T22:01:41.774821", "m": "\u001b[32m[INFO]\u001b[0m \u001b[32mPrompt executed in 67.88 seconds\u001b[0m\n"}
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/config.json ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "qwen-image-2-1",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "image",
6
+ "runtime": "comfyui",
7
+ "task": "t2i",
8
+ "recipe": {
9
+ "slug": null,
10
+ "url": null,
11
+ "read_from": "No published recipe yet (2026-09-21, the day after release). The claims below are the round brief's DECISIONS in .claude/skills/recipe-research/state/model-qwen-image-2-1.md — derived from file sizes, ComfyUI source and community reports — and this session tests them BEFORE the rtx-5060-ti page is cut, not after.",
12
+ "claims": [
13
+ "The official ComfyUI template 'Qwen Image 2.1: Text to Image' (int8_convrot DiT 7,256,783,064 B + int8_convrot Qwen3-VL-8B encoder 9,350,798,360 B + bf16 VAE 675,509,688 B; 25 steps, cfg 1, euler, simple) produces a 1024x1024 image on a 16 GB RTX 5060 Ti on ComfyUI >= v0.37.0.",
14
+ "The DiT and the int8 encoder together (6,920.6 + 8,917.6 MiB of weights — the '6920MB / 8916MB Staged' lines in issue #16437 are these file sizes, not peaks) exceed a 16 GiB card, so they are not both fully resident; at v0.37.0 ComfyUI's dynamic-VRAM loader is the default on NVIDIA and pages weights on demand rather than unloading one whole model for another. The sampling-stage peak at 1024x1024 is expected well inside 16 GB.",
15
+ "Native 2K (2048x2048 and 2752x1536) works on the same files; the margin at 2K is unknown (no consumer-card 2K peak has been published).",
16
+ "The w4a8 encoder (6,312,105,364 B) lets encoder and DiT co-reside on 16 GB, removing the per-prompt reload; the bf16 DiT (14,230,280,616 B) fits resident at 1024x1024 with the int8 encoder evicted, and is the quality reference against int8."
17
+ ]
18
+ },
19
+ "gaps": [
20
+ "No recipe exists yet, so there is no speed claim to test; the only named-GPU speed figures are a 4090 (~5 s per 1 MP, HN comment 49776977), a 5080 edit (PR #16429) and a 5090 (PR #16430). Runs record wall_s; nothing here is a comparison.",
21
+ "The template's ResolutionSelector drives EmptyLatentImage; runs 1 and 8 keep it untouched (1 MP -> 1024x1024). Every other size is set directly on EmptyLatentImage (width_direct/height_direct replace the link), so the requested pixels are exact.",
22
+ "The template ships a 1.9 kB example prompt; it is left as-is in every run so that run 1 is byte-identical to 'load the template and queue'. Prompt length moves encoder time, not the sampling peak.",
23
+ "Runs 5-7 use two sibling workflows built from the same template with one loader widget changed (w4a8 encoder; bf16 DiT) — see workflows/build.qwen-image-2-1.json. They are the brief's alternatives, not template defaults; the swapped files are Comfy-Org's own (same repo, same revision). If only the three template files are downloaded, runs 5-7 are BLOCKED and the rest still run.",
24
+ "The 'Qwen Image 2.1: Image Edit' template is NOT measured tonight: the converter refuses its ImageCompare display node ('IMAGECOMPARE widget ... does not port') and its LoadImage nodes need the template's input PNGs in ComfyUI/input/. If the owner wants edit numbers: File > Export (API) of that template from the UI, save it beside this config, and a config is written from it the next day.",
25
+ "ComfyUI on this PC must already be at v0.37.0 or newer (git checkout of the tag, or the v0.37.0 Windows portable published 2026-09-21T07:35Z; a Desktop build carrying it was unverified that day) before check runs: the nodes TextEncodeQwenImage21 and SaveImageAdvanced do not exist below it. Updating ComfyUI is the owner's action, done before the harness starts, never by the harness."
26
+ ],
27
+ "workflows": {
28
+ "t2i": {
29
+ "api_file": "workflows/qwen-image-2-1_t2i_int8-template.api.json",
30
+ "output_node": "461",
31
+ "quantization": "int8_convrot",
32
+ "requires_nodes": [
33
+ "TextEncodeQwenImage21",
34
+ "ResolutionSelector",
35
+ "SaveImageAdvanced",
36
+ "UNETLoader",
37
+ "CLIPLoader",
38
+ "VAELoader",
39
+ "EmptyLatentImage",
40
+ "KSampler",
41
+ "VAEDecode"
42
+ ],
43
+ "requires_note": "ComfyUI core >= v0.37.0 (PR #16400 'feat: Qwen-image 2.1 support', merged 2026-09-19; tag v0.37.0 dated 2026-09-20T15:27Z). PRs #16429 (KV-cache placement) and #16430 (block compile) landed after the tag and only affect edit / heavy-offload runs.",
44
+ "knobs": {
45
+ "megapixels": {
46
+ "node": "13",
47
+ "input": "megapixels"
48
+ },
49
+ "aspect_ratio": {
50
+ "node": "13",
51
+ "input": "aspect_ratio"
52
+ },
53
+ "width_direct": {
54
+ "node": "459:456",
55
+ "input": "width",
56
+ "replace_link": true
57
+ },
58
+ "height_direct": {
59
+ "node": "459:456",
60
+ "input": "height",
61
+ "replace_link": true
62
+ },
63
+ "steps": {
64
+ "node": "459:458",
65
+ "input": "steps"
66
+ },
67
+ "seed": {
68
+ "node": "459:458",
69
+ "input": "seed"
70
+ },
71
+ "prompt": {
72
+ "node": "459:452",
73
+ "input": "prompt"
74
+ }
75
+ }
76
+ },
77
+ "t2i_w4a8_encoder": {
78
+ "api_file": "workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json",
79
+ "output_node": "461",
80
+ "quantization": "int8_convrot (DiT) + w4a8 (encoder)",
81
+ "requires_nodes": [
82
+ "TextEncodeQwenImage21",
83
+ "ResolutionSelector",
84
+ "SaveImageAdvanced",
85
+ "UNETLoader",
86
+ "CLIPLoader",
87
+ "VAELoader",
88
+ "EmptyLatentImage",
89
+ "KSampler",
90
+ "VAEDecode"
91
+ ],
92
+ "requires_note": "same as t2i; the CLIPLoader names qwen3vl_8b_w4a8.safetensors",
93
+ "knobs": {
94
+ "megapixels": {
95
+ "node": "13",
96
+ "input": "megapixels"
97
+ },
98
+ "aspect_ratio": {
99
+ "node": "13",
100
+ "input": "aspect_ratio"
101
+ },
102
+ "width_direct": {
103
+ "node": "459:456",
104
+ "input": "width",
105
+ "replace_link": true
106
+ },
107
+ "height_direct": {
108
+ "node": "459:456",
109
+ "input": "height",
110
+ "replace_link": true
111
+ },
112
+ "steps": {
113
+ "node": "459:458",
114
+ "input": "steps"
115
+ },
116
+ "seed": {
117
+ "node": "459:458",
118
+ "input": "seed"
119
+ },
120
+ "prompt": {
121
+ "node": "459:452",
122
+ "input": "prompt"
123
+ }
124
+ }
125
+ },
126
+ "t2i_bf16_dit": {
127
+ "api_file": "workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json",
128
+ "output_node": "461",
129
+ "quantization": "bf16 (DiT) + int8_convrot (encoder)",
130
+ "requires_nodes": [
131
+ "TextEncodeQwenImage21",
132
+ "ResolutionSelector",
133
+ "SaveImageAdvanced",
134
+ "UNETLoader",
135
+ "CLIPLoader",
136
+ "VAELoader",
137
+ "EmptyLatentImage",
138
+ "KSampler",
139
+ "VAEDecode"
140
+ ],
141
+ "requires_note": "same as t2i; the UNETLoader names qwen_image_2.1_bf16.safetensors",
142
+ "knobs": {
143
+ "megapixels": {
144
+ "node": "13",
145
+ "input": "megapixels"
146
+ },
147
+ "aspect_ratio": {
148
+ "node": "13",
149
+ "input": "aspect_ratio"
150
+ },
151
+ "width_direct": {
152
+ "node": "459:456",
153
+ "input": "width",
154
+ "replace_link": true
155
+ },
156
+ "height_direct": {
157
+ "node": "459:456",
158
+ "input": "height",
159
+ "replace_link": true
160
+ },
161
+ "steps": {
162
+ "node": "459:458",
163
+ "input": "steps"
164
+ },
165
+ "seed": {
166
+ "node": "459:458",
167
+ "input": "seed"
168
+ },
169
+ "prompt": {
170
+ "node": "459:452",
171
+ "input": "prompt"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "weights": {
177
+ "qwen_image_2.1_int8_convrot.safetensors": {
178
+ "repo": "Comfy-Org/Qwen-Image-2.1",
179
+ "path": "diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
180
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
181
+ "folder": "diffusion_models",
182
+ "size": 7256783064,
183
+ "sha256": "cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d",
184
+ "quantization": "int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)",
185
+ "source": "the template's UNETLoader default; Comfy-Org repack README lists it under models/diffusion_models/"
186
+ },
187
+ "qwen3vl_8b_int8_convrot.safetensors": {
188
+ "repo": "Comfy-Org/Qwen-Image-2.1",
189
+ "path": "text_encoders/qwen3vl_8b_int8_convrot.safetensors",
190
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
191
+ "folder": "text_encoders",
192
+ "size": 9350798360,
193
+ "sha256": "8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f",
194
+ "quantization": "int8_convrot",
195
+ "source": "the template's CLIPLoader default since workflow_templates #1277 (2026-09-20); byte-identical (same LFS sha256) to the file of the same name in Comfy-Org/Qwen3-VL"
196
+ },
197
+ "qwen_image_2.1_vae_bf16.safetensors": {
198
+ "repo": "Comfy-Org/Qwen-Image-2.1",
199
+ "path": "vae/qwen_image_2.1_vae_bf16.safetensors",
200
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
201
+ "folder": "vae",
202
+ "size": 675509688,
203
+ "sha256": "bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9",
204
+ "quantization": "bf16 (VAE; 64-channel RGBA, 16x spatial)",
205
+ "source": "the template's VAELoader default"
206
+ },
207
+ "qwen3vl_8b_w4a8.safetensors": {
208
+ "repo": "Comfy-Org/Qwen-Image-2.1",
209
+ "path": "text_encoders/qwen3vl_8b_w4a8.safetensors",
210
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
211
+ "folder": "text_encoders",
212
+ "size": 6312105364,
213
+ "sha256": "7754425e55e7bea2bfde4dde59a4cc236cb44e5ee9c215ea66ef8d47012824eb",
214
+ "quantization": "w4a8",
215
+ "source": "the brief's co-residence alternative (run 5); uploaded by Kijai 2026-09-20T07:54Z"
216
+ },
217
+ "qwen_image_2.1_bf16.safetensors": {
218
+ "repo": "Comfy-Org/Qwen-Image-2.1",
219
+ "path": "diffusion_models/qwen_image_2.1_bf16.safetensors",
220
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
221
+ "folder": "diffusion_models",
222
+ "size": 14230280616,
223
+ "sha256": "89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc",
224
+ "quantization": "bf16",
225
+ "source": "the brief's quality reference (runs 6-7); the docs page lists it as the 'needs more memory' alternative to int8"
226
+ }
227
+ },
228
+ "defaults": {
229
+ "timeout_s": 1200,
230
+ "set": {
231
+ "steps": 25
232
+ }
233
+ },
234
+ "runs": [
235
+ {
236
+ "run": 1,
237
+ "key": "r01_1024x1024_25step_template_default",
238
+ "workflow": "t2i",
239
+ "set": {
240
+ "megapixels": 1,
241
+ "seed": 4001
242
+ },
243
+ "expect": {
244
+ "width": 1024,
245
+ "height": 1024
246
+ },
247
+ "why": "the template exactly as shipped: int8 DiT + int8 encoder, ResolutionSelector 1:1 @ 1 MP (1024x1024), 25 steps, cfg 1, euler/simple — claim 1"
248
+ },
249
+ {
250
+ "run": 2,
251
+ "key": "r02_2048x2048_25step_native_2k",
252
+ "workflow": "t2i",
253
+ "set": {
254
+ "width_direct": 2048,
255
+ "height_direct": 2048,
256
+ "seed": 4002
257
+ },
258
+ "expect": {
259
+ "width": 2048,
260
+ "height": 2048
261
+ },
262
+ "why": "native 2K, the model card's headline size; 4x the tokens of run 1 — claim 3 (an OOM or a spill here is a result)"
263
+ },
264
+ {
265
+ "run": 3,
266
+ "key": "r03_1024x1024_40step_vendor_steps",
267
+ "workflow": "t2i",
268
+ "set": {
269
+ "width_direct": 1024,
270
+ "height_direct": 1024,
271
+ "steps": 40,
272
+ "seed": 4003
273
+ },
274
+ "expect": {
275
+ "width": 1024,
276
+ "height": 1024
277
+ },
278
+ "why": "the vendor's diffusers default of 40 steps against the template's 25: same memory, 1.6x the sampling time"
279
+ },
280
+ {
281
+ "run": 4,
282
+ "key": "r04_2752x1536_2k_16x9",
283
+ "workflow": "t2i",
284
+ "set": {
285
+ "width_direct": 2752,
286
+ "height_direct": 1536,
287
+ "seed": 4004
288
+ },
289
+ "expect": {
290
+ "width": 2752,
291
+ "height": 1536
292
+ },
293
+ "why": "the widest of the card's seven official 2K ratios (16:9); 4.23 MP, slightly more than 2048x2048 — claim 3"
294
+ },
295
+ {
296
+ "run": 5,
297
+ "key": "r05_1024x1024_w4a8_encoder",
298
+ "workflow": "t2i_w4a8_encoder",
299
+ "set": {
300
+ "width_direct": 1024,
301
+ "height_direct": 1024,
302
+ "seed": 4001
303
+ },
304
+ "expect": {
305
+ "width": 1024,
306
+ "height": 1024
307
+ },
308
+ "why": "same seed and size as run 1 with the 5.88 GiB w4a8 encoder: does the encoder stay resident beside the DiT (claim 4), and what does the output look like against run 1"
309
+ },
310
+ {
311
+ "run": 6,
312
+ "key": "r06_1024x1024_bf16_dit",
313
+ "workflow": "t2i_bf16_dit",
314
+ "set": {
315
+ "width_direct": 1024,
316
+ "height_direct": 1024,
317
+ "seed": 4001
318
+ },
319
+ "expect": {
320
+ "width": 1024,
321
+ "height": 1024
322
+ },
323
+ "why": "same seed and size as run 1 with the 13.25 GiB bf16 DiT: fit at 1024x1024 with the int8 encoder evicted (claim 4), and the quality reference for int8"
324
+ },
325
+ {
326
+ "run": 7,
327
+ "key": "r07_2048x2048_bf16_dit",
328
+ "workflow": "t2i_bf16_dit",
329
+ "timeout_s": 2400,
330
+ "set": {
331
+ "width_direct": 2048,
332
+ "height_direct": 2048,
333
+ "seed": 4002
334
+ },
335
+ "expect": {
336
+ "width": 2048,
337
+ "height": 2048
338
+ },
339
+ "why": "bf16 DiT at 2K on 16 GB: the brief expects a spill into host RAM or an OOM; either is the answer to 'can a 16 GB card run bf16 at native 2K'"
340
+ },
341
+ {
342
+ "run": 8,
343
+ "key": "r08_1024x1024_25step_repeat",
344
+ "workflow": "t2i",
345
+ "set": {
346
+ "megapixels": 1,
347
+ "seed": 4008
348
+ },
349
+ "expect": {
350
+ "width": 1024,
351
+ "height": 1024
352
+ },
353
+ "why": "repeat of run 1 with a different seed: run-to-run spread of wall_s and peak"
354
+ }
355
+ ]
356
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/environment_20260921T194127Z.json ADDED
@@ -0,0 +1,460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "harness_python": "3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]",
4
+ "harness_os": "Windows 10 (10.0.26200)",
5
+ "harness_is_wsl": false,
6
+ "harness_is_windows": true,
7
+ "harness_ram_bytes": 33346146304,
8
+ "recorded_at": "2026-09-21T19:41:27.411401+00:00",
9
+ "comfyui_url": "http://127.0.0.1:8000",
10
+ "system_stats": {
11
+ "system": {
12
+ "os": "win32",
13
+ "ram_total": 33346146304,
14
+ "ram_free": 17185804288,
15
+ "comfyui_version": "0.37.0",
16
+ "required_frontend_version": "1.53.6",
17
+ "installed_templates_version": "0.11.66",
18
+ "required_templates_version": "0.11.66",
19
+ "comfy_package_versions": [
20
+ {
21
+ "name": "comfyui-frontend-package",
22
+ "installed": "1.53.6",
23
+ "required": "1.53.6"
24
+ },
25
+ {
26
+ "name": "comfyui-workflow-templates",
27
+ "installed": "0.11.66",
28
+ "required": "0.11.66"
29
+ },
30
+ {
31
+ "name": "comfyui-embedded-docs",
32
+ "installed": "0.5.12",
33
+ "required": "0.5.12"
34
+ },
35
+ {
36
+ "name": "comfy-kitchen",
37
+ "installed": "0.2.35",
38
+ "required": "0.2.35"
39
+ },
40
+ {
41
+ "name": "comfy-aimdo",
42
+ "installed": "0.5.5",
43
+ "required": "0.5.5"
44
+ }
45
+ ],
46
+ "python_version": "3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)]",
47
+ "pytorch_version": "2.12.0.dev20260220+cu128",
48
+ "embedded_python": false,
49
+ "deploy_environment": "local-desktop2-standalone",
50
+ "argv": [
51
+ "ComfyUI\\main.py",
52
+ "--feature-flag",
53
+ "show_signin_button=true",
54
+ "--feature-flag",
55
+ "enable_telemetry=true",
56
+ "--base-directory",
57
+ "D:\\ComfyUI",
58
+ "--user-directory",
59
+ "D:\\ComfyUI\\user",
60
+ "--database-url",
61
+ "sqlite:///D:\\ComfyUI\\user\\comfyui.db",
62
+ "--port",
63
+ "8000",
64
+ "--listen",
65
+ "0.0.0.0",
66
+ "--enable-manager",
67
+ "--extra-model-paths-config",
68
+ "C:\\Users\\<user>\\AppData\\Roaming\\Comfy Desktop\\instance-model-paths\\inst-1782149617451.yaml",
69
+ "--input-directory",
70
+ "D:\\ComfyUI\\input",
71
+ "--output-directory",
72
+ "D:\\ComfyUI\\output"
73
+ ]
74
+ },
75
+ "devices": [
76
+ {
77
+ "name": "cuda:0 NVIDIA GeForce RTX 5060 Ti : cudaMallocAsync",
78
+ "type": "cuda",
79
+ "index": 0,
80
+ "vram_total": 17102864384,
81
+ "vram_free": 15894315008,
82
+ "torch_vram_total": 0,
83
+ "torch_vram_free": 0
84
+ }
85
+ ]
86
+ },
87
+ "nvidia_smi_static": {
88
+ "name": "NVIDIA GeForce RTX 5060 Ti",
89
+ "memory.total": 16311,
90
+ "driver_version": "591.86",
91
+ "optional": {
92
+ "compute_cap": "12.0",
93
+ "pci.bus_id": "00000000:01:00.0",
94
+ "uuid": "GPU-<redacted>",
95
+ "vbios_version": "98.06.31.00.2b",
96
+ "pcie.link.gen.current": "5",
97
+ "pcie.link.gen.max": "5",
98
+ "pcie.link.gen.gpumax": "5",
99
+ "pcie.link.gen.hostmax": "5",
100
+ "pcie.link.width.current": "8",
101
+ "pcie.link.width.max": "16",
102
+ "display_attached": "Yes",
103
+ "display_active": "Enabled",
104
+ "display_mode": "[Requested functionality has been deprecated]",
105
+ "memory.reserved": "261",
106
+ "power.limit": "180.00",
107
+ "clocks.max.graphics": "3090",
108
+ "clocks.max.memory": "14001",
109
+ "driver_model.current": "WDDM"
110
+ }
111
+ },
112
+ "display": {
113
+ "attached": true,
114
+ "how": "--display-attached yes (agrees with nvidia-smi display_attached=Yes)"
115
+ },
116
+ "sampler_clock": "same clock (min arrival-printed +0.000s)",
117
+ "spill_monitor": "streaming",
118
+ "folder_paths": {
119
+ "checkpoints": [
120
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\checkpoints",
121
+ "D:\\ComfyUI\\models\\checkpoints",
122
+ "D:\\AI_Models\\models\\checkpoints",
123
+ "D:\\ComfyUI\\output\\checkpoints"
124
+ ],
125
+ "configs": [
126
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\configs",
127
+ "D:\\ComfyUI\\models\\configs",
128
+ "D:\\AI_Models\\models\\configs"
129
+ ],
130
+ "loras": [
131
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\loras",
132
+ "D:\\ComfyUI\\models\\loras",
133
+ "D:\\AI_Models\\models\\loras",
134
+ "D:\\ComfyUI\\output\\loras"
135
+ ],
136
+ "vae": [
137
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\vae",
138
+ "D:\\ComfyUI\\models\\vae",
139
+ "D:\\AI_Models\\models\\vae",
140
+ "D:\\ComfyUI\\output\\vae"
141
+ ],
142
+ "text_encoders": [
143
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\clip",
144
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\text_encoders",
145
+ "D:\\ComfyUI\\models\\text_encoders",
146
+ "D:\\ComfyUI\\models\\clip",
147
+ "D:\\AI_Models\\models\\text_encoders",
148
+ "D:\\AI_Models\\models\\clip",
149
+ "D:\\ComfyUI\\output\\clip"
150
+ ],
151
+ "diffusion_models": [
152
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\unet",
153
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\diffusion_models",
154
+ "D:\\ComfyUI\\models\\unet",
155
+ "D:\\ComfyUI\\models\\diffusion_models",
156
+ "D:\\AI_Models\\models\\diffusion_models",
157
+ "D:\\AI_Models\\models\\unet",
158
+ "D:\\ComfyUI\\output\\diffusion_models"
159
+ ],
160
+ "clip_vision": [
161
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\clip_vision",
162
+ "D:\\ComfyUI\\models\\clip_vision",
163
+ "D:\\AI_Models\\models\\clip_vision"
164
+ ],
165
+ "style_models": [
166
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\style_models",
167
+ "D:\\ComfyUI\\models\\style_models",
168
+ "D:\\AI_Models\\models\\style_models"
169
+ ],
170
+ "embeddings": [
171
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\embeddings",
172
+ "D:\\ComfyUI\\models\\embeddings",
173
+ "D:\\AI_Models\\models\\embeddings"
174
+ ],
175
+ "diffusers": [
176
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\diffusers",
177
+ "D:\\ComfyUI\\models\\diffusers",
178
+ "D:\\AI_Models\\models\\diffusers"
179
+ ],
180
+ "vae_approx": [
181
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\vae_approx",
182
+ "D:\\ComfyUI\\models\\vae_approx",
183
+ "D:\\AI_Models\\models\\vae_approx"
184
+ ],
185
+ "controlnet": [
186
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\t2i_adapter",
187
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\controlnet",
188
+ "D:\\ComfyUI\\models\\controlnet",
189
+ "D:\\ComfyUI\\models\\t2i_adapter",
190
+ "D:\\AI_Models\\models\\controlnet",
191
+ "D:\\AI_Models\\models\\t2i_adapter"
192
+ ],
193
+ "gligen": [
194
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\gligen",
195
+ "D:\\ComfyUI\\models\\gligen",
196
+ "D:\\AI_Models\\models\\gligen"
197
+ ],
198
+ "upscale_models": [
199
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\upscale_models",
200
+ "D:\\ComfyUI\\models\\upscale_models",
201
+ "D:\\AI_Models\\models\\upscale_models"
202
+ ],
203
+ "latent_upscale_models": [
204
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\latent_upscale_models",
205
+ "D:\\ComfyUI\\models\\latent_upscale_models",
206
+ "D:\\AI_Models\\models\\latent_upscale_models"
207
+ ],
208
+ "custom_nodes": [
209
+ "D:\\ComfyUI\\custom_nodes"
210
+ ],
211
+ "datasets": [
212
+ "D:\\ComfyUI\\datasets"
213
+ ],
214
+ "hypernetworks": [
215
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\hypernetworks",
216
+ "D:\\ComfyUI\\models\\hypernetworks",
217
+ "D:\\AI_Models\\models\\hypernetworks"
218
+ ],
219
+ "photomaker": [
220
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\photomaker",
221
+ "D:\\ComfyUI\\models\\photomaker",
222
+ "D:\\AI_Models\\models\\photomaker"
223
+ ],
224
+ "classifiers": [
225
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\classifiers",
226
+ "D:\\ComfyUI\\models\\classifiers",
227
+ "D:\\AI_Models\\models\\classifiers"
228
+ ],
229
+ "model_patches": [
230
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\model_patches",
231
+ "D:\\ComfyUI\\models\\model_patches",
232
+ "D:\\AI_Models\\models\\model_patches"
233
+ ],
234
+ "audio_encoders": [
235
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\audio_encoders",
236
+ "D:\\ComfyUI\\models\\audio_encoders",
237
+ "D:\\AI_Models\\models\\audio_encoders"
238
+ ],
239
+ "background_removal": [
240
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\background_removal",
241
+ "D:\\ComfyUI\\models\\background_removal",
242
+ "D:\\AI_Models\\models\\background_removal"
243
+ ],
244
+ "frame_interpolation": [
245
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\frame_interpolation",
246
+ "D:\\ComfyUI\\models\\frame_interpolation",
247
+ "D:\\AI_Models\\models\\frame_interpolation"
248
+ ],
249
+ "geometry_estimation": [
250
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\geometry_estimation",
251
+ "D:\\ComfyUI\\models\\geometry_estimation",
252
+ "D:\\AI_Models\\models\\geometry_estimation"
253
+ ],
254
+ "optical_flow": [
255
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\optical_flow",
256
+ "D:\\ComfyUI\\models\\optical_flow",
257
+ "D:\\AI_Models\\models\\optical_flow"
258
+ ],
259
+ "detection": [
260
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\detection",
261
+ "D:\\ComfyUI\\models\\detection",
262
+ "D:\\AI_Models\\models\\detection"
263
+ ],
264
+ ".cache": [
265
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\.cache",
266
+ "D:\\ComfyUI\\models\\.cache",
267
+ "D:\\AI_Models\\models\\.cache"
268
+ ],
269
+ ".smeltcore-staging": [
270
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\.smeltcore-staging",
271
+ "D:\\ComfyUI\\models\\.smeltcore-staging",
272
+ "D:\\AI_Models\\models\\.smeltcore-staging"
273
+ ],
274
+ "BiRefNet": [
275
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\BiRefNet",
276
+ "D:\\ComfyUI\\models\\BiRefNet",
277
+ "D:\\AI_Models\\models\\BiRefNet"
278
+ ],
279
+ "CogVideo": [
280
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\CogVideo",
281
+ "D:\\ComfyUI\\models\\CogVideo",
282
+ "D:\\AI_Models\\models\\CogVideo"
283
+ ],
284
+ "Joy_caption": [
285
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\Joy_caption",
286
+ "D:\\ComfyUI\\models\\Joy_caption",
287
+ "D:\\AI_Models\\models\\Joy_caption"
288
+ ],
289
+ "LLM": [
290
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\LLM",
291
+ "D:\\ComfyUI\\models\\LLM",
292
+ "D:\\AI_Models\\models\\LLM"
293
+ ],
294
+ "animatediff_models": [
295
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_models",
296
+ "D:\\ComfyUI\\models\\animatediff_models",
297
+ "D:\\AI_Models\\models\\animatediff_models"
298
+ ],
299
+ "animatediff_motion_lora": [
300
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_motion_lora",
301
+ "D:\\ComfyUI\\models\\animatediff_motion_lora",
302
+ "D:\\AI_Models\\models\\animatediff_motion_lora"
303
+ ],
304
+ "animatediff_video_formats": [
305
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\animatediff_video_formats",
306
+ "D:\\ComfyUI\\models\\animatediff_video_formats",
307
+ "D:\\AI_Models\\models\\animatediff_video_formats"
308
+ ],
309
+ "blip": [
310
+ "D:\\ComfyUI\\models\\blip"
311
+ ],
312
+ "dinov3": [
313
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\dinov3",
314
+ "D:\\ComfyUI\\models\\dinov3",
315
+ "D:\\AI_Models\\models\\dinov3"
316
+ ],
317
+ "facedetection": [
318
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\facedetection",
319
+ "D:\\ComfyUI\\models\\facedetection",
320
+ "D:\\AI_Models\\models\\facedetection"
321
+ ],
322
+ "facerestore_models": [
323
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\facerestore_models",
324
+ "D:\\ComfyUI\\models\\facerestore_models",
325
+ "D:\\AI_Models\\models\\facerestore_models"
326
+ ],
327
+ "grounding-dino": [
328
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\grounding-dino",
329
+ "D:\\ComfyUI\\models\\grounding-dino",
330
+ "D:\\AI_Models\\models\\grounding-dino"
331
+ ],
332
+ "insightface": [
333
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\insightface",
334
+ "D:\\ComfyUI\\models\\insightface",
335
+ "D:\\AI_Models\\models\\insightface"
336
+ ],
337
+ "layerstyle": [
338
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\layerstyle",
339
+ "D:\\ComfyUI\\models\\layerstyle",
340
+ "D:\\AI_Models\\models\\layerstyle"
341
+ ],
342
+ "liveportrait": [
343
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\liveportrait",
344
+ "D:\\ComfyUI\\models\\liveportrait",
345
+ "D:\\AI_Models\\models\\liveportrait"
346
+ ],
347
+ "nsfw_detector": [
348
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\nsfw_detector",
349
+ "D:\\ComfyUI\\models\\nsfw_detector",
350
+ "D:\\AI_Models\\models\\nsfw_detector"
351
+ ],
352
+ "reactor": [
353
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\reactor",
354
+ "D:\\ComfyUI\\models\\reactor",
355
+ "D:\\AI_Models\\models\\reactor"
356
+ ],
357
+ "sam2": [
358
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\sam2",
359
+ "D:\\ComfyUI\\models\\sam2",
360
+ "D:\\AI_Models\\models\\sam2"
361
+ ],
362
+ "trellis2": [
363
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\trellis2",
364
+ "D:\\ComfyUI\\models\\trellis2",
365
+ "D:\\AI_Models\\models\\trellis2"
366
+ ],
367
+ "ultralytics": [
368
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\ultralytics",
369
+ "D:\\ComfyUI\\models\\ultralytics",
370
+ "D:\\AI_Models\\models\\ultralytics"
371
+ ],
372
+ "xlabs": [
373
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\xlabs",
374
+ "D:\\ComfyUI\\models\\xlabs",
375
+ "D:\\AI_Models\\models\\xlabs"
376
+ ],
377
+ "z-image-adapters": [
378
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\z-image-adapters",
379
+ "D:\\ComfyUI\\models\\z-image-adapters",
380
+ "D:\\AI_Models\\models\\z-image-adapters"
381
+ ],
382
+ "saved_prompts": [],
383
+ "isnet": [
384
+ "D:\\ComfyUI\\models\\isnet"
385
+ ],
386
+ "sams": [
387
+ "D:\\ComfyUI\\models\\sams"
388
+ ],
389
+ "lama": [
390
+ "D:\\ComfyUI\\models\\lama"
391
+ ],
392
+ "unet_gguf": [
393
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\unet",
394
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\diffusion_models",
395
+ "D:\\ComfyUI\\models\\unet",
396
+ "D:\\ComfyUI\\models\\diffusion_models",
397
+ "D:\\AI_Models\\models\\diffusion_models",
398
+ "D:\\AI_Models\\models\\unet",
399
+ "D:\\ComfyUI\\output\\diffusion_models"
400
+ ],
401
+ "clip_gguf": [
402
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\clip",
403
+ "C:\\Users\\<user>\\AppData\\Local\\Comfy-Desktop\\ComfyUI-Shared\\models\\text_encoders",
404
+ "D:\\ComfyUI\\models\\text_encoders",
405
+ "D:\\ComfyUI\\models\\clip",
406
+ "D:\\AI_Models\\models\\text_encoders",
407
+ "D:\\AI_Models\\models\\clip",
408
+ "D:\\ComfyUI\\output\\clip"
409
+ ]
410
+ },
411
+ "weights": {
412
+ "qwen_image_2.1_vae_bf16.safetensors": {
413
+ "status": "present-verified",
414
+ "local_path": "D:\\ComfyUI\\models\\vae\\qwen_image_2.1_vae_bf16.safetensors",
415
+ "local_size": 675509688,
416
+ "expected_size": 675509688,
417
+ "artifact": "Comfy-Org/Qwen-Image-2.1:vae/qwen_image_2.1_vae_bf16.safetensors",
418
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
419
+ "sha256_checked": null
420
+ },
421
+ "qwen_image_2.1_bf16.safetensors": {
422
+ "status": "present-verified",
423
+ "local_path": "D:\\ComfyUI\\models\\diffusion_models\\qwen_image_2.1_bf16.safetensors",
424
+ "local_size": 14230280616,
425
+ "expected_size": 14230280616,
426
+ "artifact": "Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_bf16.safetensors",
427
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
428
+ "sha256_checked": null
429
+ },
430
+ "qwen3vl_8b_w4a8.safetensors": {
431
+ "status": "present-verified",
432
+ "local_path": "D:\\ComfyUI\\models\\text_encoders\\qwen3vl_8b_w4a8.safetensors",
433
+ "local_size": 6312105364,
434
+ "expected_size": 6312105364,
435
+ "artifact": "Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_w4a8.safetensors",
436
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
437
+ "sha256_checked": null
438
+ },
439
+ "qwen_image_2.1_int8_convrot.safetensors": {
440
+ "status": "present-verified",
441
+ "local_path": "D:\\ComfyUI\\models\\diffusion_models\\qwen_image_2.1_int8_convrot.safetensors",
442
+ "local_size": 7256783064,
443
+ "expected_size": 7256783064,
444
+ "artifact": "Comfy-Org/Qwen-Image-2.1:diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
445
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
446
+ "sha256_checked": null
447
+ },
448
+ "qwen3vl_8b_int8_convrot.safetensors": {
449
+ "status": "present-verified",
450
+ "local_path": "D:\\ComfyUI\\models\\text_encoders\\qwen3vl_8b_int8_convrot.safetensors",
451
+ "local_size": 9350798360,
452
+ "expected_size": 9350798360,
453
+ "artifact": "Comfy-Org/Qwen-Image-2.1:text_encoders/qwen3vl_8b_int8_convrot.safetensors",
454
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
455
+ "sha256_checked": null
456
+ }
457
+ },
458
+ "config_file": "configs\\qwen-image-2-1_rtx-5060-ti.json",
459
+ "config_digest": "26722fe94ba7bd6b66fb704f82cb61f4f32de16f826141a64a22b4310e54f424"
460
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/events.jsonl ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"ts": 1790019684.0947716, "kind": "invocation", "argv": ["comfy_measure.py", "run", "--config", "configs/qwen-image-2-1_rtx-5060-ti.json", "--display-attached", "yes"], "resumed": false, "harness_version": "1.0.0", "blocked": {}, "warnings": []}
2
+ {"ts": 1790019687.401759, "kind": "instruments_started", "sampler_clock": "same clock (min arrival-printed +0.000s)", "spill": "streaming", "display": true, "display_how": "--display-attached yes (agrees with nvidia-smi display_attached=Yes)"}
3
+ {"ts": 1790019690.5612953, "kind": "free", "label": "session-baseline", "free_error": null, "pre_free_mib": 1198, "post_free_mib": 1201, "settled": true, "settle": {"settled": true, "spread_mib": 9, "median_mib": 1201, "n": 4, "waited_s": 2.0}, "torch_reserved_before_mib": 0, "torch_reserved_after_mib": 0, "dropped_mib": -3}
4
+ {"ts": 1790019693.8344474, "kind": "free", "label": "run1", "free_error": null, "pre_free_mib": 1207, "post_free_mib": 1205, "settled": true, "settle": {"settled": true, "spread_mib": 4, "median_mib": 1205, "n": 4, "waited_s": 2.3}, "torch_reserved_before_mib": 0, "torch_reserved_after_mib": 0, "dropped_mib": 2}
5
+ {"ts": 1790019766.903083, "kind": "free", "label": "run2", "free_error": null, "pre_free_mib": 13897, "post_free_mib": 1251, "settled": true, "settle": {"settled": true, "spread_mib": 3, "median_mib": 1251, "n": 4, "waited_s": 1.8}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 12646}
6
+ {"ts": 1790020069.1592746, "kind": "free", "label": "run3", "free_error": null, "pre_free_mib": 8740, "post_free_mib": 1253, "settled": true, "settle": {"settled": true, "spread_mib": 15, "median_mib": 1253, "n": 4, "waited_s": 1.8}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 7487}
7
+ {"ts": 1790020178.0146446, "kind": "free", "label": "run4", "free_error": null, "pre_free_mib": 13927, "post_free_mib": 1252, "settled": true, "settle": {"settled": true, "spread_mib": 34, "median_mib": 1252, "n": 4, "waited_s": 1.8}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 12675}
8
+ {"ts": 1790020486.1310186, "kind": "free", "label": "run5", "free_error": null, "pre_free_mib": 10760, "post_free_mib": 1283, "settled": true, "settle": {"settled": true, "spread_mib": 2, "median_mib": 1283, "n": 6, "waited_s": 4.5}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 9477}
9
+ {"ts": 1790020562.0685604, "kind": "free", "label": "run6", "free_error": null, "pre_free_mib": 13195, "post_free_mib": 1273, "settled": true, "settle": {"settled": true, "spread_mib": 34, "median_mib": 1273, "n": 4, "waited_s": 2.0}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 11922}
10
+ {"ts": 1790020612.5910778, "kind": "free", "label": "run7", "free_error": null, "pre_free_mib": 14017, "post_free_mib": 1286, "settled": true, "settle": {"settled": true, "spread_mib": 10, "median_mib": 1286, "n": 4, "waited_s": 2.3}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 12731}
11
+ {"ts": 1790020833.8744168, "kind": "free", "label": "run8", "free_error": null, "pre_free_mib": 8756, "post_free_mib": 1301, "settled": true, "settle": {"settled": true, "spread_mib": 4, "median_mib": 1301, "n": 4, "waited_s": 1.8}, "torch_reserved_before_mib": 32, "torch_reserved_after_mib": 32, "dropped_mib": 7455}
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/README.md ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Smeltcore measurement harness (schema v1)
2
+
3
+ You are probably a Claude Code session on the site owner's Windows PC, running unattended
4
+ overnight, with none of the context in which this was written. **This file is all you
5
+ need.** Read "Do not" before running anything; every item on it is a mistake that was made,
6
+ or nearly made, while building this.
7
+
8
+ **Nothing produced here is uploaded, pushed, posted or published by you. Ever.** Results
9
+ stay on this machine for the owner to review in the morning. Publication is a separate,
10
+ human-approved step that is not yours.
11
+
12
+ ---
13
+
14
+ ## What this does, in one paragraph
15
+
16
+ For four models, it runs the configurations our own published recipes tell readers work on
17
+ an RTX 5060 Ti 16 GB (the recipe's default, one smaller, one larger, and the largest the
18
+ recipe claims fits), and records for every run what the card actually did: whole-card VRAM
19
+ before and at peak, the runtime's own execution time, and the size/length of the file it
20
+ really produced. Rows follow `../SCHEMA.md` exactly. ComfyUI is driven only through its
21
+ HTTP API; llama.cpp through `llama-bench` / `llama-server`. An OOM, a crash or a timeout is
22
+ a row with `ok=false` — a result, not a gap — and the night goes on.
23
+
24
+ | config | model | runtime | runs | expected time | notes |
25
+ |---|---|---|---:|---|---|
26
+ | `configs/krea-2_rtx-5060-ti.json` | krea-2 | ComfyUI | 5 | ~10 min | fast; run it first to prove the pipeline |
27
+ | `configs/wan-2-2_rtx-5060-ti.json` | wan-2-2 | ComfyUI | 6 | ~1.5–2.5 h | owner says fully installed; runs 4–5 need ComfyUI-GGUF + the Q8 file |
28
+ | `configs/minimax-h3_rtx-5060-ti.json` | minimax-h3 | ComfyUI | 5 | ~1.5 h | **licence-gated**, see below; 42.5 GB of weights |
29
+ | `configs/qwen3-8-27b_rtx-5060-ti.json` | qwen3-8-27b | llama.cpp | 5 (+1 off) | ~40 min | needs llama.cpp binaries already on the machine |
30
+
31
+ Timeouts per run are generous caps (up to 2.5 h for the MiniMax 1344×768 run), not estimates.
32
+
33
+ A fifth config, `configs/qwen-image-2-1_rtx-5060-ti.json` (Qwen-Image-2.1, ComfyUI, 8 runs, ~38 GB
34
+ of weights), is **not** part of `run_night.py`; it is run by hand, and its own notes are in
35
+ [`RUN_qwen-image-2-1_2026-09-21.md`](./RUN_qwen-image-2-1_2026-09-21.md). Its workflow is built from
36
+ a separate manifest, `workflows/build.qwen-image-2-1.json`, because the self-test's pinned
37
+ `object_info` (ComfyUI 0.35.0) predates that model's nodes.
38
+
39
+ ---
40
+
41
+ ## Do not
42
+
43
+ - **Do not upload, push, publish, post or share anything** — not to Hugging Face, GitHub, the
44
+ smeltcore API, a pastebin, or a chat. Not the CSV, not a screenshot, not a generated image.
45
+ - **Do not create `ACK_LICENCE_minimax-h3`.** MiniMax H3's licence excludes the EU, the UK,
46
+ South Korea and the USA, and forbids using the model or its outputs outside its territory.
47
+ Whether this machine may run it is the owner's decision. If that file does not exist, the
48
+ MiniMax runs are blocked by design: record that and move on. Never create, rename or
49
+ "test" the file yourself.
50
+ - **Do not hand-write or hand-edit an API-format workflow, and do not "fix" a config by
51
+ changing node ids until an error goes away.** A config whose knob does not land fails
52
+ loudly on purpose — a silent no-op is indistinguishable from success. Report it, skip the
53
+ model, continue.
54
+ - **Do not confuse `api_*.json` templates with API format.** In ComfyUI's template library,
55
+ `api_minimax_h3_t2v.json`, `api_krea2_t2i.json` etc. are workflows for MiniMax's/Krea's
56
+ *paid cloud API nodes*. They are UI-format and they would send your prompt to a vendor.
57
+ - **Do not run with `--warm`, change `--sample-ms`, or use `--no-resume` to "get cleaner
58
+ numbers".** Cold runs are the contract. Measured on a real ComfyUI: an identical prompt
59
+ queued again without `POST /free` is served entirely from cache in milliseconds and points
60
+ at the *previous run's* file. The harness catches that, but only if you let it free.
61
+ - **Do not change ComfyUI's launch flags or settings, restart WSL, edit `.wslconfig`, or
62
+ install/update ComfyUI, custom nodes, the driver, CUDA or PyTorch.** The MiniMax recipe
63
+ wants `--disable-pinned-memory`; if ComfyUI was not started with it, the harness warns and
64
+ records ComfyUI's argv in every row. That is the right outcome.
65
+ - **Do not `pip install` anything into ComfyUI's own Python environment.** Use a separate venv.
66
+ - **Do not download anything except through `download --execute` for these configs.**
67
+ Never delete, move or overwrite a model file. If `check` reports
68
+ `present-size-mismatch`, the file on disk is not the artifact the config names: leave it,
69
+ the runs that need it stay blocked, the owner decides.
70
+ - **Do not build or install llama.cpp, and do not download binaries.** If `llama-bench`
71
+ isn't on the machine, the Qwen runs are skipped and say so.
72
+ - **Do not edit `runs.csv`, and do not report a number the harness did not write.** A failed
73
+ run's row *is* the result. If something looks wrong, say so in `NIGHT_LOG.md`.
74
+ - **Do not set `MHARNESS_NVIDIA_SMI_CMD`** outside the self-test. It swaps the VRAM
75
+ instrument for a fake; rows made that way say "SELF-TEST FAKE INSTRUMENT" and are worthless.
76
+ - **Do not use the GPU for anything else during the batch** (games, video, a second
77
+ ComfyUI job). Every VRAM figure is whole-card.
78
+ - **Do not enable Qwen run 6** (another 13.4 GB download) unless the owner asked for it.
79
+ - **Do not convert units** anywhere you write. MiB stays MiB (Principle 1 of SCHEMA.md).
80
+
81
+ ---
82
+
83
+ ## 0. Where things are
84
+
85
+ ```
86
+ measurements/
87
+ SCHEMA.md the contract; read its "Principles" section
88
+ harness/ this folder
89
+ run_night.py runs the four configs in order, each in its own process; writes ../NIGHT_LOG.md
90
+ comfy_measure.py ComfyUI harness: check | download | run | convert | verify
91
+ llama_measure.py llama.cpp adapter: check | download | run
92
+ configs/*.json one run matrix per model (the recipe claims being tested are inside)
93
+ workflows/*.api.json the API-format workflows the configs use (built, not hand-written)
94
+ workflows/*.provenance.json where each one came from and what was done to it
95
+ workflows/sources/ the UI-format originals; workflows/build.json says how they were built
96
+ tools/build_workflows.py rebuilds workflows/*.api.json from sources (fallback, see §7)
97
+ tests/ GPU-free self-test (mock ComfyUI, fake nvidia-smi, fake llama-bench/llama-server)
98
+ mharness/ the library
99
+ sessions/<session_id>/ created by runs: session.json, runs.csv, README.md, raw/
100
+ models/ GGUF files for llama.cpp (created by llama_measure download)
101
+ ```
102
+
103
+ ## 1. Setup (once)
104
+
105
+ Python 3.10+ and nothing else for measuring. Two optional packages:
106
+
107
+ - `huggingface_hub` — only for `download --execute`;
108
+ - `av` (PyAV) — to read back video files. If it can't be installed, `ffprobe` on PATH works too.
109
+
110
+ **Where to run it.** ComfyUI runs natively on Windows at `http://127.0.0.1:8000`. The simplest
111
+ and most accurate setup is **Windows Python**, from the harness folder copied to a Windows
112
+ path (e.g. `D:\smeltcore-measure\measurements\harness`):
113
+
114
+ ```powershell
115
+ py -3 -m venv D:\smeltcore-measure\.venv
116
+ D:\smeltcore-measure\.venv\Scripts\python -m pip install -U huggingface_hub av
117
+ cd D:\smeltcore-measure\measurements\harness
118
+ D:\smeltcore-measure\.venv\Scripts\python comfy_measure.py --help
119
+ ```
120
+
121
+ (`py.exe` and the venv's `python.exe` can also be called from a WSL shell; paths must then be
122
+ Windows paths.)
123
+
124
+ **If you must run it inside WSL2:** `python3 -m venv .venv && .venv/bin/pip install -U huggingface_hub av`.
125
+ Then check reachability (next step). Under WSL2's default NAT networking, `127.0.0.1` inside
126
+ WSL is *not* the Windows host and ComfyUI (which listens on 127.0.0.1) is unreachable; with
127
+ `networkingMode=mirrored` in `%UserProfile%\.wslconfig` it is reachable at `127.0.0.1:8000`.
128
+ The Windows host's NAT address is the WSL default gateway (`ip route show default`), but
129
+ ComfyUI only answers there if it was started with `--listen`. **Do not change any of this
130
+ unattended** — if WSL can't reach ComfyUI, use Windows Python. ComfyUI's model folders are
131
+ reachable from WSL as `/mnt/d/...`; the harness translates `D:\...` paths automatically
132
+ (`--path-map 'D:\ComfyUI=/mnt/d/ComfyUI'` if the drive is mounted elsewhere).
133
+
134
+ Override the URL with `--comfy-url URL` or the `COMFYUI_URL` environment variable.
135
+
136
+ ## 2. Prove the harness works on this machine (2 minutes, no GPU used)
137
+
138
+ ```
139
+ python -m unittest -v tests.test_selftest
140
+ ```
141
+
142
+ 24 tests, all must pass (about 3 minutes). They drive the real harness against a mock
143
+ ComfyUI, a fake nvidia-smi and fake llama-bench/llama-server: success, OOM then the next run,
144
+ a knob on a node id that does not exist or that feeds nothing (must fail loudly), resume after
145
+ the harness is killed mid-run, timeout, ComfyUI's cache trap, ComfyUI dying, restarting, or
146
+ stalling mid-run, the workflow converter, the llama-bench and llama-server paths (including a
147
+ port already taken), torn journal lines, spill wording, downloads that must not overwrite. If any fails, stop and write down
148
+ which in `NIGHT_LOG.md`.
149
+
150
+ ## 3. Confirm ComfyUI and the GPU
151
+
152
+ ```
153
+ curl.exe -s http://127.0.0.1:8000/system_stats # PowerShell (curl -s ... in WSL)
154
+ nvidia-smi --query-gpu=name,memory.total,memory.used,driver_version --format=csv
155
+ ```
156
+
157
+ `system_stats` must answer with `"type": "cuda"` and a device name containing
158
+ `RTX 5060 Ti`. Then run the preflight for every config — it runs nothing on the GPU:
159
+
160
+ ```
161
+ python comfy_measure.py check --config configs/krea-2_rtx-5060-ti.json configs/wan-2-2_rtx-5060-ti.json configs/minimax-h3_rtx-5060-ti.json
162
+ python llama_measure.py [--llama-bin-dir DIR] check --config configs/qwen3-8-27b_rtx-5060-ti.json
163
+ ```
164
+
165
+ Read every line. `FATAL` means the config or workflow is broken against *this* ComfyUI: do not
166
+ work around it (see §7). `BLOCKED run N: weight missing` is fixed by §4. `BLOCKED ... custom
167
+ node(s) not installed` or `... not installed in this ComfyUI` means those runs cannot happen
168
+ tonight; record it and move on. `LICENCE GATE CLOSED` is expected unless the owner created
169
+ the ack file. Exit codes: 0 all runnable, 2 some blocked, 1 fatal.
170
+
171
+ For llama.cpp, find the binaries before concluding they are absent: `where llama-bench` (Windows),
172
+ `which llama-bench` (WSL), then look in the usual build folders (`...\llama.cpp\build\bin\Release\`,
173
+ `~/llama.cpp/build/bin/`). Pass the folder with `--llama-bin-dir`, **before** the subcommand
174
+ (`llama_measure.py --llama-bin-dir DIR check ...`): it is a global option, and after `check`/`run` the
175
+ parser rejects it as an unrecognized argument. If there is none, skip Qwen.
176
+
177
+ ## 4. Weights: dry run first, then download
178
+
179
+ Always the dry run first. It prints exactly what would be fetched, from which repo at which
180
+ pinned revision, into which folder, the total size, and checks free disk space (+10 GiB margin):
181
+
182
+ ```
183
+ python comfy_measure.py download --config configs/krea-2_rtx-5060-ti.json configs/wan-2-2_rtx-5060-ti.json
184
+ python llama_measure.py download --config configs/qwen3-8-27b_rtx-5060-ti.json
185
+ ```
186
+
187
+ If the plan lists no `PROBLEM`, download for real:
188
+
189
+ ```
190
+ python comfy_measure.py download --config <same configs> --execute
191
+ python llama_measure.py download --config configs/qwen3-8-27b_rtx-5060-ti.json --execute
192
+ ```
193
+
194
+ What `--execute` does: downloads each file into `<ComfyUI models>\.smeltcore-staging\...` on the
195
+ same drive, checks the byte count and SHA-256 against the config (pinned to a Hugging Face
196
+ commit), then moves it into the destination folder **only if no file of that name exists**.
197
+ It never deletes, moves or overwrites a file that was already there. A mismatch leaves the
198
+ staging copy for the owner and fails that file. Re-run `check` afterwards.
199
+
200
+ MiniMax: nothing is downloaded while the licence gate is closed (42.5 GB otherwise).
201
+ Approximate sizes: krea-2 18.4 GB, wan-2-2 18.1 GB (+5.4 GB for the Q8 runs), qwen 14.1 GB.
202
+
203
+ ## 5. Run the batch
204
+
205
+ The simplest way, after §2–§4:
206
+
207
+ ```
208
+ python run_night.py --display-attached yes [--llama-bin-dir DIR]
209
+ ```
210
+
211
+ It runs the four configs below in order, each as its own process (one failing never stops
212
+ the next), copies each one's full console output to `../night_logs/<config>.log`, and appends
213
+ a factual summary — exit codes, every BLOCKED/FATAL/REJECTED line, one line per run — to
214
+ `../NIGHT_LOG.md`. It never downloads and never touches the licence gate. Running it again
215
+ resumes everything unfinished.
216
+
217
+ The same thing by hand, one config at a time (fast first; the licence-gated one later;
218
+ llama.cpp last so ComfyUI can be asked to unload first):
219
+
220
+ ```
221
+ python comfy_measure.py run --config configs/krea-2_rtx-5060-ti.json --display-attached yes
222
+ python comfy_measure.py run --config configs/wan-2-2_rtx-5060-ti.json --display-attached yes
223
+ python comfy_measure.py run --config configs/minimax-h3_rtx-5060-ti.json --display-attached yes
224
+ python llama_measure.py [--llama-bin-dir DIR] run --config configs/qwen3-8-27b_rtx-5060-ti.json --display-attached yes
225
+ ```
226
+
227
+ `--display-attached yes` because the owner states a monitor is driven by this GPU; the harness
228
+ cross-checks it against nvidia-smi and records both. Each command prints one line per run
229
+ (`-> ok=... failure=... idle=... peak=...`) and ends with `schema check OK`.
230
+
231
+ **If anything dies — the harness, the shell, the session, the machine — run the same command
232
+ again.** It finds the unfinished session (same model, same config), skips runs already in
233
+ `runs.csv`, cancels a job it had queued in ComfyUI before dying, and retries the interrupted
234
+ run once. A run interrupted twice is recorded as `failure=crash` with a note, not retried
235
+ forever.
236
+
237
+ What the harness does per ComfyUI run: `POST /free` (unload models, clear caches), **measure**
238
+ that memory actually dropped and settled (never assumed), record `idle_device_mib`, queue the
239
+ workflow with the run's knobs, wait with a hard timeout, read the result from `/history`,
240
+ download the output through `/view`, read width/height/frames/duration from the file itself,
241
+ and append one validated row, fsynced. Before every run it also checks ComfyUI's queue: a job
242
+ of ours left over from an interrupted attempt is cancelled, anyone else's is waited for, so
243
+ nothing foreign runs inside a measurement window.
244
+
245
+ ComfyUI going quiet is handled by kind. Refused/reset connections for 90 s (nothing
246
+ listening), or a restart so fast that ComfyUI keeps answering but has forgotten the job: the
247
+ row is `failure=crash`. Accepting connections but not answering (alive but busy — e.g. paging
248
+ 42 GB of weights) is tolerated for 15 min and the run continues. After a crash the harness waits
249
+ up to 15 min for ComfyUI to answer again (it does **not** restart it), re-reads its version and
250
+ launch flags, re-measures the idle baseline, notes all of that on the next row, and continues —
251
+ or stops the ComfyUI part of the night. If nvidia-smi itself stops producing samples, the
252
+ harness stops: rows without an instrument would be empty claims.
253
+
254
+ Exit codes of `run`: 0 finished, 1 fatal preflight (nothing ran), 2 nothing runnable,
255
+ 3 stopped early. On anything but 0, note it in `NIGHT_LOG.md` and go to the next config.
256
+
257
+ ## 6. Morning deliverable
258
+
259
+ For each config that ran, `../sessions/<date>_<model>_rtx-5060-ti/` contains:
260
+
261
+ - `runs.csv` — the rows (`python comfy_measure.py verify --session-dir <dir>` re-checks the schema)
262
+ - `session.json` — environment and method, with caveats measured during the night
263
+ - `README.md` — a table of runs and the caveats, generated by the harness
264
+ - `raw/` — the full nvidia-smi trace, ComfyUI's log ring, every prompt sent, per-run records,
265
+ the outputs read back, environment snapshots, and a copy of this harness
266
+
267
+ `measurements/NIGHT_LOG.md` (written by `run_night.py`, or by you if you ran configs by hand):
268
+ which configs ran, their exit codes, which runs were blocked or not attempted and the exact
269
+ reason the harness printed. Add anything that surprised you under a heading of your own —
270
+ facts only, copied from what the harness printed. Then stop. Do not publish.
271
+
272
+ ### Handoff — done by the owner, after he has looked
273
+
274
+ This machine got the harness from the private branch `measure/overnight-batch-1` of the backend
275
+ repo. When the **owner** has reviewed the night's output and says so — not before, and never by
276
+ the unattended run — the session folders go back to that same branch:
277
+
278
+ ```bash
279
+ git add measurements/sessions/ measurements/NIGHT_LOG.md
280
+ git commit -m "measure: overnight batch 1 on rtx-5060-ti"
281
+ git push origin measure/overnight-batch-1
282
+ ```
283
+
284
+ That is a push to a **private** branch, which is how results reach the session that writes the
285
+ recipes. It is not publication. Publishing a session to the public `Smeltcore/measurements`
286
+ dataset is a separate step taken from that session, and it needs a licence check first: the
287
+ workflows in `workflows/sources/` are third-party files (Comfy-Org/workflow_templates and
288
+ AlperKTS/Krea2_FP8), and a public session should carry their `provenance.json` — repo, commit and
289
+ SHA-256, which is enough for anyone to fetch and verify them — rather than the files themselves.
290
+
291
+ ## 7. When a workflow cannot be obtained
292
+
293
+ `POST /prompt` needs API-format JSON. The configs point at `workflows/*.api.json`, which were
294
+ built from ComfyUI's own templates / the recipe's workflow by a conservative converter and
295
+ then accepted by a real ComfyUI's `validate_prompt` (see "Verified" below). On this machine the
296
+ harness re-validates them against the live `/object_info`, and ComfyUI validates them again at
297
+ `POST /prompt`. If that fails:
298
+
299
+ 1. **A rejected prompt is not a result.** `REJECTED by ComfyUI validation` → no row, reason logged.
300
+ Missing custom node / missing weight → blocked, reason logged. Move on.
301
+ 2. **Schema drift** (this ComfyUI's nodes differ from 0.35.0): rebuild from the same UI sources
302
+ against the live server, into a scratch directory, and compare:
303
+ `python tools/build_workflows.py --live --out-dir ..\rebuild` — then `check` with those files
304
+ *only if* the rebuild wrote them without `REFUSED` and with `weights-only errors`. Record that
305
+ you did this in `NIGHT_LOG.md`.
306
+ 3. **The installed template** can be converted directly:
307
+ `python comfy_measure.py convert --ui template:video_wan2_2_5B_ti2v --out ..\rebuild\wan.api.json`.
308
+ The converter **refuses** anything it cannot prove (unknown node types, widget counts it
309
+ cannot account for, ambiguous bypasses, unported widget types). A refusal is final for
310
+ tonight.
311
+ 4. **Otherwise: skip the model, write down why, continue with the next one.** Never guess a
312
+ workflow, never write one by hand, never borrow a similar-looking one. The owner can do
313
+ "Export (API)" in the morning in ten seconds; a guessed graph costs a night of wrong rows.
314
+
315
+ Why not the browser: the brief forbids driving ComfyUI's UI, and `graphToPrompt` runs over
316
+ live JavaScript widgets. The converter ports the subset of that logic it verified against the
317
+ frontend source and says no to the rest.
318
+
319
+ ## 8. The four matrices, and what each run tests
320
+
321
+ Each config's `recipe.claims` lists the claims under test and `gaps` lists what the recipe did
322
+ not specify precisely enough (and what was done about it). Highlights:
323
+
324
+ - **krea-2** — AlperKTS FP8 Turbo, the recipe's primary workflow, 8 steps / cfg 1 / er_sde.
325
+ 1280×720 (default = largest claimed), 1024×576, 1536×864, 1920×1088, repeat.
326
+ - **wan-2-2** — official template (FP16, native offload): 1280×704×121 (default = largest
327
+ claimed), 1024×576×121, 1280×704×145; the recipe's Q8 GGUF alternative at 1024×576 (its
328
+ speed claim) and 1280×704 (its "lower peak" claim); repeat.
329
+ - **minimax-h3** — official template with the unused Turbo-LoRA branch pruned (see gaps):
330
+ 864×480×124 (template default), 736×416, 960×544, 1344×768 (the recipe's 16 GB ceiling),
331
+ repeat. 5 s → 124 frames. Licence-gated.
332
+ - **qwen3-8-27b** — `llama-bench` text-only at contexts 32768 (default), 512, 16384, 65536
333
+ (largest offered, text-only), all q8_0 K/V, flash-attn on; plus `llama-server` with the
334
+ recipe's exact command including the vision projector, one 1024×1024 synthetic image. The
335
+ GGUF the recipe budgeted was replaced upstream on 2026-08-19; runs 1–5 use today's file
336
+ (pinned), disabled run 6 the recipe's.
337
+
338
+ Repeats use a different seed on purpose (an identical prompt is a cache hit, see "Do not").
339
+
340
+ ## 9. Reading a row
341
+
342
+ - `idle_device_mib` — whole-card memory.used just before the run was queued, after `/free`
343
+ settled. Includes the desktop and display (`display_attached=true`).
344
+ - `peak_device_mib` — highest sample inside the run's window. Whole-card. `peak - idle` estimates
345
+ the run's own use only if idle held constant.
346
+ - `peak_process_mib` — empty: neither ComfyUI nor llama-bench reports a process peak. (When
347
+ llama.cpp prints its exit-time memory breakdown — recent builds, graceful shutdown, so
348
+ WSL/Linux rather than Windows where the server is terminated — a llama-server row's notes
349
+ quote its `self` figure, which excludes the projector and the CUDA context. Best effort:
350
+ build b9960 printed none in testing.)
351
+ - `wall_s` — ComfyUI: `execution_success − execution_start` from `/history`, ComfyUI's own
352
+ clock, node overhead included. llama-server: `prompt_ms + predicted_ms`. llama-bench: empty
353
+ (it reports per-test averages; they are in `config_json.bench`).
354
+ - `width/height/frames/output_seconds` — read back from the produced file, not the request.
355
+ If they differ from what was asked, `notes` says so.
356
+ - `steps` — the configured value. It cannot be read back from a file, so the harness proves it
357
+ instead: preflight refuses any knob whose node does not feed the output in that run (following
358
+ only the selected side of a switch), and after the run the prompt ComfyUI stored is checked
359
+ to still carry every override; if not, the row is `invalid-output`.
360
+ - `artifact` — `repo:path_in_repo`, `;`-separated, the format `dataset/runs.csv` already uses.
361
+ The pinned revision, SHA-256 and byte count of every file are in `config_json.artifacts`.
362
+ - `notes` — anything needed not to misread the row: failure reason first, then instrument
363
+ caveats (trace gaps, memory near the card's total, spill), cold-start problems.
364
+ - **Windows sysmem fallback.** On Windows the NVIDIA driver can satisfy an allocation that does
365
+ not fit in VRAM from shared system memory instead of failing it. The run then *completes*
366
+ slowly and `memory.used` sits near the total. The harness streams the
367
+ `\GPU Adapter Memory(*)\Shared Usage` performance counter with `typeperf` when it can
368
+ (counter names are localised on non-English Windows; if they fail, the session caveats say
369
+ "not monitored"). A rise of shared memory is attributed to fallback only when dedicated memory
370
+ was also sampled full — pinned host buffers (ComfyUI pins offloaded weights) count as shared
371
+ too. When the counter has no data for a run, the note says spill is *unknown*, never "no
372
+ spill". **A completed run whose note says fallback likely, or unknown with the peak near the
373
+ total, is not proof of fitting in VRAM.**
374
+
375
+ ## 10. Verified against source (so you don't have to re-derive it)
376
+
377
+ ComfyUI **0.35.0**, commit `1d48d9cf7bcecb6022a87b3cb13e0fb435bf9b8a` (2026-09-10):
378
+
379
+ | Call | Fact relied on | Where |
380
+ |---|---|---|
381
+ | `POST /prompt` | accepts a client `prompt_id` (canonical UUID); 400 + `node_errors` when `validate_prompt` fails; returns `{prompt_id, number, node_errors}` | `server.py:1072`, `:1090` |
382
+ | `GET /history/{id}` | empty until the job ends; then `{prompt: [number, id, prompt, extra, outputs], outputs, status: {status_str, completed, messages: [[event, data]]}}` | `server.py:1059`, `execution.py:1286` |
383
+ | status messages | every message carries `timestamp: int(time.time()*1000)`; `execution_start`, `execution_cached {nodes}`, then `execution_success` / `execution_error {exception_type, exception_message, node_id, node_type, traceback}` / `execution_interrupted` | `execution.py:677-684, 742, 770, 824` |
384
+ | OOM | ComfyUI's own `is_oom()` appends "This error means you ran out of memory on your GPU." to the message and unloads all models | `execution.py:641-645` |
385
+ | `wall_s` choice | the `/history` start/success timestamps are on one clock (ComfyUI's), survive WSL clock drift, and match the "Prompt executed in" log line to within its rounding; so no log scraping | `main.py:384-416` |
386
+ | `POST /free` | only sets flags; the prompt worker unloads (`unload_all_models`), resets the executor caches (`e.reset()`) and empties the CUDA cache when it next wakes — asynchronous, hence measured | `server.py:1192`, `main.py:422-446` |
387
+ | `GET /system_stats` | `devices[0].torch_vram_total` is torch's reserved bytes on CUDA (`memory_stats()['reserved_bytes.all.current']`); on a CPU device it is system RAM | `server.py:686`, `comfy/model_management.py:346-351` |
388
+ | `GET /object_info` | per class `input {required, optional, hidden}`, `input_order`, `output`, `output_node`; loader combos list the files ComfyUI sees (exactly what validation checks) | `server.py:751-811` |
389
+ | `POST /interrupt`, `POST /api/jobs/{id}/cancel` | targeted interrupt by prompt_id; jobs-API cancel | `server.py:1160`, `:971` |
390
+ | `GET /view`, `/internal/folder_paths`, `/internal/logs/raw` | output bytes; absolute model folder paths; the in-memory log ring (300 entries) | `server.py:516`, `internal_routes.py:26, 47`, `app/logger.py:97` |
391
+ | `/templates/<name>.json` | official templates, **UI format** | `server.py:1246-1270` |
392
+ | dynamic inputs | `COMFY_DYNAMICCOMBO_V3` sub-inputs are `<parent>.<child>` in API format (e.g. SaveVideo `format.codec`) | `comfy_api/latest/_io.py:1074-1080` |
393
+
394
+ Frontend **1.55.3**, commit `3d7c5d4df3bbef0250267826ebfde4f34b9041e4`: `graphToPrompt`
395
+ (`src/utils/executionUtil.ts`), subgraph execution ids `outer:inner`
396
+ (`ExecutableNodeDTO.ts:113`), dynamic-combo widget names (`dynamicWidgets.ts:202`), saved
397
+ link slots renumbered by `compressWidgetInputSlots` (`litegraphUtil.ts:262`).
398
+
399
+ llama.cpp commit `16378d93f94012d4228c8c7683adce3f286aee5d`: `llama-bench` sizes the context
400
+ as `n_prompt + n_gen + n_depth` (`tools/llama-bench/llama-bench.cpp:1289`), takes
401
+ `-fa on|off|auto` (`:475`), only auto-fits with `-fitt/-fitc` (`:440`); `llama-server`
402
+ serves `/health` and returns `timings` in chat responses.
403
+
404
+ Measured on a real ComfyUI 0.35.0 (CPU) on 2026-09-11, not read:
405
+ - `/history` timestamps gave `wall_s = 58.42` for a job ComfyUI's own log reported as
406
+ "Prompt executed in 58.44 seconds";
407
+ - an identical prompt re-queued without `/free` → every node in `execution_cached`, success in
408
+ milliseconds, the history's output is the *previous* file; after `/free` it runs again;
409
+ - the stock MiniMax H3 T2V template is **rejected** without the optional Turbo LoRA file
410
+ (`Value not in list: lora_name`) although its switch is off; `ComfySwitchNode` never evaluates
411
+ the unselected lazy input (`comfy_extras/nodes_logic.py:86-116`), so pruning that branch is
412
+ execution-identical;
413
+ - all four shipped workflows were accepted by `validate_prompt` (they then stop, as expected,
414
+ at the empty placeholder weights).
415
+
416
+ ## 11. For a human: rebuilding the workflows
417
+
418
+ ```
419
+ python tools/build_workflows.py --object-info tests/fixtures/object_info_comfyui-0.35.0_subset.json
420
+ python tools/build_workflows.py --live --comfy-url http://127.0.0.1:8000
421
+ ```
422
+
423
+ The self-test asserts the shipped `workflows/*.api.json` equal what this produces from
424
+ `workflows/sources/` with the transforms in `workflows/build.json`.
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/RUN_qwen-image-2-1_2026-09-21.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Qwen-Image-2.1 on the RTX 5060 Ti — the evening run of 2026-09-21
2
+
3
+ One config, eight text-to-image runs, about 40 GB of weights, under an hour of GPU time once the
4
+ files are on disk. Everything in `README.md` applies (read its "Do not" list once more); this
5
+ file only says what is different tonight.
6
+
7
+ ## What is different from the overnight batch
8
+
9
+ 1. **ComfyUI must be v0.37.0 or newer before anything runs.** Qwen-Image-2.1 support is PR #16400,
10
+ merged 2026-09-19; tag `v0.37.0` (2026-09-20) carries it, v0.36.0 does not. The v0.37.0 GitHub
11
+ release, with Windows portable builds (`ComfyUI_windows_portable_nvidia.7z` is the cu130 one), was
12
+ published 2026-09-21 at 07:35 UTC; whether a Desktop build carries it yet is unverified. The nodes
13
+ `TextEncodeQwenImage21` and `SaveImageAdvanced` do not exist below it, so `check` will print
14
+ `BLOCKED ... not installed in this ComfyUI` on every run until ComfyUI is updated. **Updating
15
+ ComfyUI is your action, done before the harness starts** — the README's "do not install/update
16
+ ComfyUI" rule is for the unattended session, not for you. A git install: `git fetch --tags && git
17
+ checkout v0.37.0`, then restart it with the flags you normally use. Confirm with
18
+ `curl.exe -s http://127.0.0.1:8000/system_stats` → `"comfyui_version": "0.37.0"` or newer.
19
+ Note: at v0.37.0 dynamic VRAM is on by default on every NVIDIA card (`main.py`
20
+ `dynamic_vram_supported()`); leave it that way — it is what readers get — and the harness records
21
+ ComfyUI's argv on every row anyway.
22
+ 2. **This config tests a brief, not a published recipe.** There is no `qwen-image-2-1` page yet; the
23
+ four claims in `configs/qwen-image-2-1_rtx-5060-ti.json` → `recipe.claims` are the round brief's
24
+ decisions (`.claude/skills/recipe-research/state/model-qwen-image-2-1.md`), and tonight decides
25
+ what the 5060 Ti page may say. A failed run is a result.
26
+ 3. **No licence gate.** The Qwen Research License Agreement is non-commercial ("research or evaluation
27
+ purposes only"); measuring is evaluation, and there is no territory clause. Nothing to acknowledge.
28
+ 4. **The workflow was built here, not on the PC.** `workflows/qwen-image-2-1_t2i_int8-template.api.json`
29
+ was converted from ComfyUI's own template (`Comfy-Org/workflow_templates` @ `371a7b7171`) against a
30
+ `GET /object_info` from a CPU-only ComfyUI at tag v0.37.0, and validated with the usual
31
+ "weights-only errors". `check` re-validates it against your live server. If it prints `FATAL`
32
+ about a node or a knob, do not edit anything — rebuild against the live server and compare:
33
+ `python tools\build_workflows.py --live --manifest workflows\build.qwen-image-2-1.json --out-dir ..\rebuild`
34
+ (README section 7). If that also fails, stop and write down what it printed.
35
+
36
+ ## The eight runs (all int8 DiT + int8 encoder + bf16 VAE unless said otherwise; 25 steps, cfg 1, euler, simple)
37
+
38
+ | run | size | change | what it answers |
39
+ |---|---|---|---|
40
+ | 1 | 1024×1024 | template untouched | does the shipped template run, and at what peak |
41
+ | 2 | 2048×2048 | native 2K | the model card's headline size on 16 GB |
42
+ | 3 | 1024×1024 | 40 steps | the vendor's default step count |
43
+ | 4 | 2752×1536 | widest official 2K ratio | 4.23 MP, more tokens than 2048² |
44
+ | 5 | 1024×1024 | encoder → `qwen3vl_8b_w4a8` | can encoder and DiT co-reside (no reload between prompts) |
45
+ | 6 | 1024×1024 | DiT → `qwen_image_2.1_bf16` | does the 13.25 GiB bf16 DiT fit resident; quality reference |
46
+ | 7 | 2048×2048 | bf16 DiT | expected to spill or OOM — either answer is the answer |
47
+ | 8 | 1024×1024 | template, new seed | run-to-run spread |
48
+
49
+ Runs 1, 5 and 6 share seed 4001 on purpose: same image, three precision configurations. Keep the
50
+ three PNGs together in the morning.
51
+
52
+ ## Commands (PowerShell, from the harness folder; same venv as before)
53
+
54
+ ```powershell
55
+ # 0. pull the branch that carries this config
56
+ git fetch origin && git checkout measure/qwen-image-2-1 && git pull
57
+
58
+ # 1. ComfyUI is on v0.37.0+ and answering, GPU is the 5060 Ti
59
+ curl.exe -s http://127.0.0.1:8000/system_stats
60
+ nvidia-smi --query-gpu=name,memory.total,memory.used,driver_version --format=csv
61
+
62
+ # 2. preflight (nothing runs on the GPU)
63
+ python comfy_measure.py check --config configs\qwen-image-2-1_rtx-5060-ti.json
64
+
65
+ # 3. weights: dry run, read the plan, then for real (about 37.8 GB: 6.76 + 8.71 + 0.63 GiB for the
66
+ # template, + 5.88 GiB w4a8 encoder for run 5, + 13.25 GiB bf16 DiT for runs 6-7; ~10 GiB margin)
67
+ python comfy_measure.py download --config configs\qwen-image-2-1_rtx-5060-ti.json
68
+ python comfy_measure.py download --config configs\qwen-image-2-1_rtx-5060-ti.json --execute
69
+ python comfy_measure.py check --config configs\qwen-image-2-1_rtx-5060-ti.json
70
+
71
+ # 4. the batch (cold runs; POST /free before each; resumes if interrupted)
72
+ python comfy_measure.py run --config configs\qwen-image-2-1_rtx-5060-ti.json --display-attached yes
73
+ ```
74
+
75
+ If the disk is tight, runs 6–7 can wait: delete nothing, just run `download --execute` for the
76
+ three template files only by temporarily answering the plan's questions — or simpler, run
77
+ everything and accept the 13.25 GiB. Do not skip the download step for a file and expect
78
+ the harness to "fall back"; a missing weight is `BLOCKED run N`, which is the intended outcome.
79
+
80
+ ## Morning handoff
81
+
82
+ `..\sessions\2026-09-21_qwen-image-2-1_rtx-5060-ti\` (README section 6). Push the session folder to
83
+ this branch when you have looked at it:
84
+
85
+ ```bash
86
+ git add measurements/sessions/ measurements/NIGHT_LOG.md
87
+ git commit -m "measure: qwen-image-2-1 on rtx-5060-ti, 2026-09-21"
88
+ git push origin measure/qwen-image-2-1
89
+ ```
90
+
91
+ The Claude session that writes the recipes reads it from there. Publication to
92
+ `Smeltcore/measurements` is a separate step — this model's licence permits it, unlike MiniMax's, but
93
+ it still happens only when you say so.
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/comfy_measure.py ADDED
@@ -0,0 +1,1202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """ComfyUI measurement harness (schema v1). Read README.md first.
3
+
4
+ python comfy_measure.py check --config configs/wan-2-2_rtx-5060-ti.json
5
+ python comfy_measure.py download --config configs/wan-2-2_rtx-5060-ti.json # dry run
6
+ python comfy_measure.py download --config configs/wan-2-2_rtx-5060-ti.json --execute # real
7
+ python comfy_measure.py run --config configs/wan-2-2_rtx-5060-ti.json --display-attached yes
8
+ python comfy_measure.py convert --ui template:video_wan2_2_5B_ti2v --out workflows/x.api.json
9
+ python comfy_measure.py verify --session-dir ../sessions/<session_id>
10
+
11
+ Talks to ComfyUI through its HTTP API only. Never drives the browser UI, never writes
12
+ to ComfyUI's install. Writes nothing outside --out-root except downloaded weights
13
+ (download --execute), which go into ComfyUI's model folders without touching any
14
+ existing file. Uploads nothing, anywhere.
15
+ """
16
+ from __future__ import annotations
17
+
18
+ import argparse
19
+ import json
20
+ import os
21
+ import re
22
+ import sys
23
+ import time
24
+ import uuid
25
+ from typing import Any, Optional
26
+
27
+ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
28
+
29
+ from mharness import HARNESS_VERSION # noqa: E402
30
+ from mharness.comfy_api import ComfyClient, ComfyError, ComfyUnreachable, PromptRejected # noqa: E402
31
+ from mharness.outputs import ProbeError, output_entries, probe_file, video_prober # noqa: E402
32
+ from mharness.platform_util import is_wsl, os_description, parse_path_maps, wsl_windows_host_ip # noqa: E402
33
+ from mharness.runner_common import (FAKE_NOTE, HARNESS_DIR, Instruments, check_gpu_identity, # noqa: E402
34
+ config_digest, environment_record, licence_gate_open, load_config, say, utf8_stdio,
35
+ stamp_fake, utc_stamp, window_notes)
36
+ from mharness.schema import SchemaError, check_csv_file, new_session_json, utc_iso # noqa: E402
37
+ from mharness.session import Session # noqa: E402
38
+ from mharness.ui2api import ConversionRefused, convert_ui_to_api # noqa: E402
39
+ from mharness.weights import (GIB, check_presence, disk_check, execute_download, plan_downloads, # noqa: E402
40
+ required_files, weight_specs)
41
+ from mharness.workflow import (Override, WorkflowError, apply_overrides, is_link, load_api_workflow, # noqa: E402
42
+ model_references, output_nodes, overrides_that_change_nothing, prompt_digest,
43
+ strip_meta, validate_api_prompt, verify_overrides_in)
44
+
45
+ DEFAULT_URL = os.environ.get("COMFYUI_URL", "http://127.0.0.1:8000")
46
+ FOLDER_ORDER = ["diffusion_models", "checkpoints", "text_encoders", "vae", "loras"]
47
+
48
+
49
+ # ==========================================================================================
50
+ # config -> prompts
51
+ # ==========================================================================================
52
+ def knob_targets(cfg: dict, wf_name: str) -> dict[str, list[dict]]:
53
+ raw = (cfg["workflows"][wf_name].get("knobs") or {})
54
+ return {k: (v if isinstance(v, list) else [v]) for k, v in raw.items()}
55
+
56
+
57
+ def run_overrides(cfg: dict, run: dict) -> list[Override]:
58
+ wf = run["workflow"]
59
+ targets = knob_targets(cfg, wf)
60
+ values = dict((cfg.get("defaults") or {}).get("set") or {})
61
+ values.update(run.get("set") or {})
62
+ ovs: list[Override] = []
63
+ for knob, value in values.items():
64
+ if knob not in targets:
65
+ raise WorkflowError(f"run {run['run']}: knob {knob!r} is not defined for workflow {wf!r} "
66
+ f"(defined: {sorted(targets)})")
67
+ for t in targets[knob]:
68
+ ovs.append(Override(node=str(t["node"]), input=t["input"], value=value,
69
+ replace_link=bool(t.get("replace_link")), knob=knob))
70
+ for o in run.get("overrides") or []:
71
+ ovs.append(Override(node=str(o["node"]), input=o["input"], value=o["value"],
72
+ replace_link=bool(o.get("replace_link")), knob=o.get("knob")))
73
+ return ovs
74
+
75
+
76
+ def load_workflows(cfg: dict, names: set[str]) -> tuple[dict[str, dict], dict[str, str]]:
77
+ loaded, errors = {}, {}
78
+ for name in sorted(names):
79
+ wf = cfg["workflows"].get(name)
80
+ if wf is None:
81
+ errors[name] = f"workflow {name!r} is not defined in the config"
82
+ continue
83
+ path = os.path.join(HARNESS_DIR, wf["api_file"])
84
+ if not os.path.isfile(path):
85
+ errors[name] = (f"{path} does not exist. The harness will not guess a workflow: see README "
86
+ f"'When a workflow cannot be obtained'.")
87
+ continue
88
+ try:
89
+ loaded[name] = strip_meta(load_api_workflow(path))
90
+ except (WorkflowError, json.JSONDecodeError) as e:
91
+ errors[name] = str(e)
92
+ return loaded, errors
93
+
94
+
95
+ def build_prompt(cfg: dict, run: dict, workflows: dict, object_info: dict) -> tuple[dict, list[Override], list[dict]]:
96
+ ovs = run_overrides(cfg, run)
97
+ prompt, applied = apply_overrides(workflows[run["workflow"]], ovs, object_info,
98
+ label=cfg["workflows"][run["workflow"]]["api_file"])
99
+ return prompt, ovs, applied
100
+
101
+
102
+ # ==========================================================================================
103
+ # preflight
104
+ # ==========================================================================================
105
+ class Preflight:
106
+ def __init__(self) -> None:
107
+ self.fatal: list[str] = []
108
+ self.blocked: dict[int, list[str]] = {}
109
+ self.warnings: list[str] = []
110
+ self.info: dict = {}
111
+ self.prompts: dict[int, tuple[dict, list[Override], list[dict]]] = {}
112
+ self.system_stats: dict = {}
113
+ self.object_info: dict = {}
114
+ self.folder_paths: Optional[dict] = None
115
+ self.presence: dict = {}
116
+
117
+ def block(self, run: int, why: str) -> None:
118
+ self.blocked.setdefault(run, []).append(why)
119
+
120
+
121
+ def unreachable_help(url: str) -> str:
122
+ lines = [f"ComfyUI is not answering at {url}."]
123
+ if is_wsl():
124
+ ip = wsl_windows_host_ip()
125
+ lines += [
126
+ "This harness is running inside WSL2 and ComfyUI runs on Windows. Under WSL2's default NAT",
127
+ "networking, 127.0.0.1 inside WSL is NOT the Windows host. Options, in order of preference:",
128
+ " 1. Run the harness with Windows Python instead (from WSL: `py.exe -3 comfy_measure.py ...`",
129
+ " after copying the harness to a Windows path such as D:\\smeltcore-measure\\).",
130
+ " 2. If .wslconfig already has networkingMode=mirrored, 127.0.0.1 does reach Windows; then",
131
+ " ComfyUI is genuinely down or on another port.",
132
+ f" 3. The Windows host from WSL NAT is {ip or '(default gateway; `ip route show default`)'}, but",
133
+ " ComfyUI listens on 127.0.0.1 by default, so this only works if it was started with --listen.",
134
+ "Do not change .wslconfig, restart WSL, or change ComfyUI's launch settings unattended.",
135
+ ]
136
+ return "\n".join(lines)
137
+
138
+
139
+ def preflight(cfg: dict, client: ComfyClient, args, check_weights_on_disk: bool = True) -> Preflight:
140
+ pf = Preflight()
141
+ runs = [r for r in cfg["runs"] if r.get("enabled", True) and (not args.only or r["run"] in args.only)]
142
+ pf.info["runs_considered"] = [r["run"] for r in runs]
143
+ try:
144
+ pf.system_stats = client.system_stats()
145
+ except ComfyError:
146
+ pf.fatal.append(unreachable_help(client.base))
147
+ return pf
148
+ sysinfo = pf.system_stats.get("system", {})
149
+ devs = pf.system_stats.get("devices") or []
150
+ pf.info["comfyui_version"] = sysinfo.get("comfyui_version")
151
+ pf.info["comfyui_argv"] = sysinfo.get("argv")
152
+ pf.info["pytorch_version"] = sysinfo.get("pytorch_version")
153
+ if not devs or devs[0].get("type") != "cuda":
154
+ pf.fatal.append(f"ComfyUI's primary device is {devs[0] if devs else None}; expected a CUDA GPU")
155
+ else:
156
+ err = check_gpu_identity(cfg, devs[0].get("name", ""))
157
+ if err:
158
+ pf.fatal.append("ComfyUI device: " + err)
159
+
160
+ gate_ok, gate_msg = licence_gate_open(cfg)
161
+ pf.info["licence_gate"] = gate_msg
162
+ if not gate_ok:
163
+ for r in runs:
164
+ pf.block(r["run"], gate_msg)
165
+
166
+ if any(r.get("task", cfg.get("task")) in ("t2v", "i2v") for r in runs) and video_prober() is None:
167
+ pf.fatal.append("these runs produce video and neither PyAV nor ffprobe is available to read it back. "
168
+ "Install one: `python -m pip install av` (preferred) or put ffprobe on PATH.")
169
+
170
+ try:
171
+ pf.object_info = client.object_info()
172
+ except ComfyError as e:
173
+ pf.fatal.append(f"GET /object_info failed: {e}")
174
+ return pf
175
+
176
+ try:
177
+ pf.folder_paths = client.folder_paths()
178
+ except ComfyError as e:
179
+ pf.warnings.append(f"GET /internal/folder_paths failed ({e}); weight sizes cannot be verified on disk")
180
+
181
+ names = {r["workflow"] for r in runs}
182
+ workflows, wf_errors = load_workflows(cfg, names)
183
+ for name, err in wf_errors.items():
184
+ for r in runs:
185
+ if r["workflow"] == name:
186
+ pf.block(r["run"], f"workflow unavailable: {err}")
187
+ for name, wf in cfg["workflows"].items():
188
+ if name not in names:
189
+ continue
190
+ missing_nodes = [n for n in wf.get("requires_nodes") or [] if n not in pf.object_info]
191
+ if missing_nodes:
192
+ for r in runs:
193
+ if r["workflow"] == name:
194
+ pf.block(r["run"], f"custom node(s) not installed: {missing_nodes} ({wf.get('requires_note', '')})")
195
+
196
+ specs = weight_specs(cfg)
197
+ run_prompts: dict[str, dict] = {}
198
+ for r in runs:
199
+ if r["workflow"] not in workflows:
200
+ continue
201
+ try:
202
+ prompt, ovs, applied = build_prompt(cfg, r, workflows, pf.object_info)
203
+ except WorkflowError as e:
204
+ # A config that cannot land its knobs is broken as a whole: fail loudly.
205
+ pf.fatal.append(f"run {r['run']} ({r.get('key')}): {e}")
206
+ continue
207
+ pf.prompts[r["run"]] = (prompt, ovs, applied)
208
+ run_prompts[f"run{r['run']}"] = prompt
209
+ wf = cfg["workflows"][r["workflow"]]
210
+ outs = output_nodes(prompt, pf.object_info)
211
+ want = str(wf.get("output_node", ""))
212
+ if want and want not in outs and not any(b.startswith("custom node") for b in pf.blocked.get(r["run"], [])):
213
+ pf.fatal.append(f"run {r['run']}: output_node {want} is not an output node of the workflow (outputs: {outs})")
214
+ for a in overrides_that_change_nothing(prompt, applied, [want] if want else outs):
215
+ pf.fatal.append(f"run {r['run']} ({r.get('key')}): knob {a['knob']!r} sets node {a['node']}.{a['input']}, "
216
+ f"but that node does not feed output {want or outs} in this run, so it would change "
217
+ f"nothing. Refusing a silent no-op.")
218
+ v = validate_api_prompt(prompt, pf.object_info)
219
+ file_inputs = {(ref["node"], ref["input"]) for ref in model_references(prompt)}
220
+ weight_msgs = {m for (nid, inp, _val, m) in v.combo_misses if (nid, inp) in file_inputs}
221
+ not_installed = {m for (_nid, _ct, m) in v.not_installed}
222
+ for m in not_installed:
223
+ pf.block(r["run"], m)
224
+ for m in weight_msgs:
225
+ pf.block(r["run"], f"weight missing: {m}")
226
+ for e in v.errors:
227
+ if e not in weight_msgs and e not in not_installed:
228
+ pf.fatal.append(f"run {r['run']}: {e}")
229
+ pf.warnings += [f"run {r['run']}: {w}" for w in v.warnings]
230
+
231
+ need, problems = required_files(run_prompts, specs)
232
+ pf.fatal += problems
233
+ if need:
234
+ maps = parse_path_maps(args.path_map or [])
235
+ pres = check_presence({k: specs[k] for k in need}, pf.object_info,
236
+ pf.folder_paths if check_weights_on_disk else None, maps,
237
+ verify_sha256=getattr(args, "verify_sha256", False))
238
+ pf.presence = pres
239
+ for fname, p in pres.items():
240
+ users = [r["run"] for r in runs if r["run"] in pf.prompts and
241
+ any(ref["filename"] == fname for ref in model_references(pf.prompts[r["run"]][0]))]
242
+ if p.status == "missing":
243
+ for n in users:
244
+ pf.block(n, f"weight missing: {fname} ({p.spec.artifact})")
245
+ elif p.status == "present-size-mismatch":
246
+ # Measuring it would put an artifact in the row that was not what ran.
247
+ for n in users:
248
+ pf.block(n, f"{fname} on disk is not the pinned artifact: {p.detail}")
249
+ elif p.status == "present-unverified":
250
+ pf.warnings.append(f"{fname}: {p.detail}; rows will say the artifact is unverified")
251
+
252
+ argv = pf.info.get("comfyui_argv") or []
253
+ for flag in cfg.get("recipe_launch_flags") or []:
254
+ if flag not in argv:
255
+ pf.warnings.append(f"the recipe launches ComfyUI with {flag}; this ComfyUI was started without it "
256
+ f"(argv={argv}). The harness cannot change launch flags; rows record argv.")
257
+ return pf
258
+
259
+
260
+ def print_preflight(cfg: dict, pf: Preflight) -> None:
261
+ say(f"== preflight: {cfg['model_slug']} on {cfg['gpu_slug']}")
262
+ for k, v in pf.info.items():
263
+ say(f" {k}: {v}")
264
+ for fname, p in pf.presence.items():
265
+ say(f" weight {p.status:22s} {fname} <- {p.spec.artifact}@{p.spec.revision}"
266
+ + (f" [{p.local_path}]" if p.local_path else ""))
267
+ for w in pf.warnings:
268
+ say(f" WARNING {w}")
269
+ by_reason: dict[str, list[int]] = {}
270
+ for n, whys in sorted(pf.blocked.items()):
271
+ for why in whys:
272
+ by_reason.setdefault(why, []).append(n)
273
+ for why, runs in by_reason.items():
274
+ say(f" BLOCKED run{'s' if len(runs) > 1 else ''} {','.join(map(str, runs))}: {why}")
275
+ for f in pf.fatal:
276
+ say(f" FATAL {f}")
277
+
278
+
279
+ # ==========================================================================================
280
+ # measurement helpers
281
+ # ==========================================================================================
282
+ def torch_reserved_mib(stats: dict) -> Optional[int]:
283
+ """/system_stats devices[0].torch_vram_total is torch.cuda.memory_stats()['reserved_bytes.all.current']
284
+ on CUDA (comfy/model_management.py get_total_memory). On a CPU device it is system RAM: meaningless here."""
285
+ try:
286
+ d = stats["devices"][0]
287
+ if d.get("type") != "cuda":
288
+ return None
289
+ return int(d["torch_vram_total"] // (1024 * 1024))
290
+ except (KeyError, IndexError, TypeError):
291
+ return None
292
+
293
+
294
+ def free_and_settle(client: ComfyClient, ins: Instruments, session: Session, label: str) -> dict:
295
+ """POST /free, then MEASURE whether memory went down. /free only sets flags that the
296
+ prompt worker acts on when idle, so nothing here assumes it worked."""
297
+ last = ins.sampler.latest()
298
+ pre = last[1].used if last else None
299
+ try:
300
+ before = torch_reserved_mib(client.system_stats())
301
+ except ComfyError:
302
+ before = None
303
+ t0 = time.time()
304
+ free_error = None
305
+ try:
306
+ client.free(unload_models=True, free_memory=True)
307
+ except ComfyError as e:
308
+ free_error = str(e)[:300] # the run still happens; it just is not a verified cold start
309
+ reserved_after = None
310
+ deadline = time.time() + 60
311
+ while time.time() < deadline:
312
+ time.sleep(1.0)
313
+ try:
314
+ reserved_after = torch_reserved_mib(client.system_stats())
315
+ except ComfyError:
316
+ continue
317
+ if reserved_after is not None and reserved_after <= 256:
318
+ break
319
+ settle = ins.sampler.wait_settled(since=t0 + 1.0, window_s=3.0, tol_mib=64, timeout=90)
320
+ rec = {"label": label, "free_error": free_error, "pre_free_mib": pre, "post_free_mib": settle.get("median_mib"),
321
+ "settled": settle.get("settled"), "settle": settle, "torch_reserved_before_mib": before,
322
+ "torch_reserved_after_mib": reserved_after,
323
+ "dropped_mib": (pre - settle["median_mib"]) if pre is not None and settle.get("median_mib") else None}
324
+ session.event("free", **rec)
325
+ return rec
326
+
327
+
328
+ def classify_error(err: dict) -> tuple[str, str]:
329
+ et = str(err.get("exception_type", ""))
330
+ em = str(err.get("exception_message", ""))
331
+ text = f"{et} {em}".lower()
332
+ first = em.strip().splitlines()[0][:220] if em.strip() else ""
333
+ if "this error means you ran out of memory on your gpu" in text:
334
+ return "oom", f"GPU OOM (ComfyUI is_oom) in {err.get('node_type')}: {first}"
335
+ gpu_words = ("outofmemoryerror", "cuda out of memory", "cuda error: out of memory",
336
+ "cublas_status_alloc_failed", "cudnn_status_alloc_failed", "allocation on device",
337
+ "hip out of memory")
338
+ if any(w in text for w in gpu_words):
339
+ return "oom", f"GPU OOM in {err.get('node_type')}: {first}"
340
+ host_words = ("defaultcpuallocator", "can't allocate memory", "cannot allocate memory",
341
+ "not enough memory", "paging file is too small", "memoryerror")
342
+ if any(w in text for w in host_words):
343
+ return "oom", f"HOST RAM OOM (not VRAM) in {err.get('node_type')}: {first}"
344
+ return "crash", f"{et} in {err.get('node_type')}: {first}"
345
+
346
+
347
+ def parse_history(h: dict) -> dict:
348
+ msgs = (h.get("status") or {}).get("messages") or []
349
+ ev: dict[str, dict] = {}
350
+ for m in msgs:
351
+ if isinstance(m, (list, tuple)) and len(m) == 2 and isinstance(m[1], dict):
352
+ ev.setdefault(m[0], m[1])
353
+ start = (ev.get("execution_start") or {}).get("timestamp")
354
+ end_event = next((e for e in ("execution_success", "execution_error", "execution_interrupted") if e in ev), None)
355
+ end = (ev.get(end_event) or {}).get("timestamp") if end_event else None
356
+ return {
357
+ "status_str": (h.get("status") or {}).get("status_str"),
358
+ "events": [m[0] for m in msgs if isinstance(m, (list, tuple))],
359
+ "start_ms": start, "end_ms": end, "end_event": end_event,
360
+ "wall_s": round((end - start) / 1000.0, 3) if start is not None and end is not None else None,
361
+ "cached": list((ev.get("execution_cached") or {}).get("nodes") or []),
362
+ "error": ev.get("execution_error"),
363
+ "interrupted": ev.get("execution_interrupted"),
364
+ "success": "execution_success" in ev and "execution_error" not in ev and "execution_interrupted" not in ev,
365
+ }
366
+
367
+
368
+ class LogCollector:
369
+ """Copies ComfyUI's in-memory log ring (/internal/logs/raw, 300 entries) into the
370
+ session, often enough that nothing scrolls out between fetches."""
371
+
372
+ def __init__(self, client: ComfyClient, path: str):
373
+ self.client, self.path = client, path
374
+ self.seen: set = set()
375
+ self.last = 0.0
376
+
377
+ def fetch(self, force: bool = False) -> None:
378
+ if not force and time.time() - self.last < 20:
379
+ return
380
+ self.last = time.time()
381
+ try:
382
+ entries = self.client.logs_raw()
383
+ except ComfyError:
384
+ return
385
+ new = []
386
+ for e in entries:
387
+ key = (e.get("t"), e.get("m"))
388
+ if key not in self.seen:
389
+ self.seen.add(key)
390
+ new.append(e)
391
+ if new:
392
+ with open(self.path, "a", encoding="utf-8") as f:
393
+ for e in new:
394
+ f.write(json.dumps(e, ensure_ascii=False) + "\n")
395
+
396
+
397
+ UNREACHABLE_AFTER_S = 90.0 # refused/reset: nothing is listening
398
+ STALL_TOLERANCE_S = 900.0 # accepted but no answer: alive, e.g. paging 40 GB of weights
399
+
400
+
401
+ def wait_for_prompt(client: ComfyClient, pid: str, timeout_s: float, logs: LogCollector,
402
+ down_after: Optional[float] = None,
403
+ stall_after: Optional[float] = None) -> tuple[str, Optional[dict]]:
404
+ """done | timeout | unreachable | lost.
405
+
406
+ Two different silences: 'down' (connection refused/reset: the process is not listening)
407
+ is given `down_after` seconds; 'stalled' (connection accepted, no answer before the HTTP
408
+ timeout: alive but busy) is given `stall_after`. Whenever ComfyUI answers again, /queue is
409
+ consulted: a job still queued or running is waited for; a job that is neither there nor
410
+ in /history on two checks 5 s apart is 'lost' (ComfyUI restarted under us), so a quickly
411
+ restarted ComfyUI never costs us the whole run timeout."""
412
+ down_limit = UNREACHABLE_AFTER_S if down_after is None else down_after
413
+ stall_limit = STALL_TOLERANCE_S if stall_after is None else stall_after
414
+ t0 = time.time()
415
+ down_since = stall_since = None
416
+ last_queue_check = time.time()
417
+ missing = 0
418
+ while True:
419
+ try:
420
+ h = client.history(pid)
421
+ down_since = stall_since = None
422
+ except ComfyUnreachable as e:
423
+ h = None
424
+ now = time.time()
425
+ if e.kind == "timeout":
426
+ stall_since, down_since = stall_since or now, None
427
+ if now - stall_since > stall_limit:
428
+ return "unreachable", None
429
+ else:
430
+ down_since, stall_since = down_since or now, None
431
+ if now - down_since > down_limit:
432
+ return "unreachable", None
433
+ except ComfyError:
434
+ h = None
435
+ if h is not None and (h.get("status") or {}).get("messages"):
436
+ return "done", h
437
+ if down_since is None and stall_since is None and time.time() - last_queue_check >= 5:
438
+ last_queue_check = time.time()
439
+ try:
440
+ if pid in queue_ids(client.queue()):
441
+ missing = 0
442
+ else:
443
+ h2 = client.history(pid) # it may have finished between the two calls
444
+ if h2 and (h2.get("status") or {}).get("messages"):
445
+ return "done", h2
446
+ missing += 1
447
+ if missing >= 2:
448
+ return "lost", None
449
+ except ComfyError:
450
+ pass
451
+ if time.time() - t0 > timeout_s:
452
+ return "timeout", None
453
+ logs.fetch()
454
+ time.sleep(1.0)
455
+
456
+
457
+ def abort_prompt(client: ComfyClient, pid: str, grace_s: float, logs: LogCollector) -> tuple[str, Optional[dict]]:
458
+ """Targeted interrupt, then the jobs-API cancel, waiting for ComfyUI to let go."""
459
+ try:
460
+ client.interrupt(pid)
461
+ except ComfyError:
462
+ pass
463
+ st, h = wait_for_prompt(client, pid, grace_s, logs)
464
+ if st == "done":
465
+ return "interrupted", h
466
+ if st in ("lost", "unreachable"):
467
+ return ("gone" if st == "lost" else "unreachable"), None
468
+ try:
469
+ client.cancel_job(pid)
470
+ client.delete_queued([pid])
471
+ except ComfyError:
472
+ pass
473
+ st, h = wait_for_prompt(client, pid, 120, logs)
474
+ if st == "done":
475
+ return "interrupted", h
476
+ return {"lost": "gone", "unreachable": "unreachable"}.get(st, "stuck"), None
477
+
478
+
479
+ def queue_ids(q: dict) -> list[str]:
480
+ ids = []
481
+ for key in ("queue_running", "queue_pending"):
482
+ for item in q.get(key) or []:
483
+ if isinstance(item, (list, tuple)) and len(item) > 1:
484
+ ids.append(str(item[1]))
485
+ return ids
486
+
487
+
488
+ def ensure_idle_queue(client: ComfyClient, session: Session, logs: LogCollector, wait_s: float = 1800) -> None:
489
+ ids = queue_ids(client.queue())
490
+ if not ids:
491
+ return
492
+ ours = session.our_prompt_ids()
493
+ mine = [i for i in ids if i in ours]
494
+ if mine:
495
+ say(f" ComfyUI is still busy with {len(mine)} job(s) this harness queued before it stopped; cancelling")
496
+ for pid in mine:
497
+ abort_prompt(client, pid, 300, logs)
498
+ session.event("orphans_cancelled", ids=mine)
499
+ deadline = time.time() + wait_s
500
+ while time.time() < deadline:
501
+ ids = queue_ids(client.queue())
502
+ if not ids:
503
+ return
504
+ say(f" ComfyUI queue busy with {len(ids)} job(s) not queued by this harness; waiting")
505
+ time.sleep(30)
506
+ raise SystemExit("ComfyUI stayed busy with jobs this harness did not queue. Measuring alongside them would "
507
+ "contaminate every number. Stopping; nothing was recorded for the remaining runs.")
508
+
509
+
510
+ def artifact_and_quant(cfg: dict, prompt: dict, specs: dict, wf_name: str) -> tuple[str, Optional[str], dict]:
511
+ refs = model_references(prompt)
512
+ names = sorted({r["filename"] for r in refs},
513
+ key=lambda f: (FOLDER_ORDER.index(specs[f].folder) if specs[f].folder in FOLDER_ORDER else 99, f))
514
+ artifact = ";".join(specs[f].artifact for f in names)
515
+ per_file = {f: {"artifact": specs[f].artifact, "revision": specs[f].revision, "sha256": specs[f].sha256,
516
+ "bytes": specs[f].size, "quantization": specs[f].quantization} for f in names}
517
+ quant = cfg["workflows"][wf_name].get("quantization")
518
+ return artifact, quant, per_file
519
+
520
+
521
+ def literal_knobs(prompt: dict) -> dict:
522
+ """Every literal input of every node, long strings hashed, so config_json carries
523
+ each knob that can move memory or speed without carrying a 2 kB prompt text."""
524
+ import hashlib
525
+ out = {}
526
+ for nid, n in prompt.items():
527
+ lits = {}
528
+ for k, v in n["inputs"].items():
529
+ if is_link(v):
530
+ continue
531
+ if isinstance(v, str) and len(v) > 120:
532
+ v = "sha256:" + hashlib.sha256(v.encode("utf-8")).hexdigest()[:16]
533
+ lits[k] = v
534
+ out[nid] = {"class_type": n["class_type"], **lits}
535
+ return out
536
+
537
+
538
+ # ==========================================================================================
539
+ # commands
540
+ # ==========================================================================================
541
+ def cmd_check(args) -> int:
542
+ rc = 0
543
+ for path in args.config:
544
+ cfg = load_config(path)
545
+ pf = preflight(cfg, ComfyClient(args.comfy_url), args)
546
+ print_preflight(cfg, pf)
547
+ runnable = [r["run"] for r in cfg["runs"] if r.get("enabled", True) and r["run"] not in pf.blocked
548
+ and (not args.only or r["run"] in args.only)]
549
+ if pf.fatal:
550
+ # `run` refuses the whole config on any FATAL, so nothing is runnable; this line is the one
551
+ # most likely to be copied into a log, and it must not contradict the FATAL above it.
552
+ say(" => runnable now: [] (FATAL above; `run` will refuse this config)")
553
+ else:
554
+ say(f" => runnable now: {runnable}")
555
+ if pf.fatal:
556
+ rc = max(rc, 1)
557
+ elif pf.blocked:
558
+ rc = max(rc, 2)
559
+ return rc
560
+
561
+
562
+ def cmd_download(args) -> int:
563
+ rc = 0
564
+ for path in args.config:
565
+ cfg = load_config(path)
566
+ client = ComfyClient(args.comfy_url)
567
+ gate_ok, gate_msg = licence_gate_open(cfg)
568
+ if not gate_ok:
569
+ say(f"== {cfg['model_slug']}: {gate_msg}\n Nothing will be downloaded for this model.")
570
+ rc = max(rc, 2)
571
+ continue
572
+ pf = preflight(cfg, client, args)
573
+ if pf.fatal:
574
+ print_preflight(cfg, pf)
575
+ rc = 1
576
+ continue
577
+ missing = [p.spec for p in pf.presence.values() if p.status == "missing"]
578
+ say(f"== download plan for {cfg['model_slug']} ({'EXECUTE' if args.execute else 'DRY RUN'})")
579
+ for p in pf.presence.values():
580
+ if p.status != "missing":
581
+ say(f" have {p.spec.filename} ({p.status})")
582
+ if not missing:
583
+ say(" nothing to download")
584
+ continue
585
+ if pf.folder_paths is None:
586
+ say(" cannot plan: ComfyUI did not report its folder paths")
587
+ rc = 1
588
+ continue
589
+ items, problems = plan_downloads(missing, pf.folder_paths, parse_path_maps(args.path_map or []))
590
+ problems += disk_check(items)
591
+ total = sum(i.size or 0 for i in items)
592
+ for it in items:
593
+ say(f" get {it.spec.repo}/{it.spec.path}@{it.spec.revision}")
594
+ say(f" {it.size if it.size is not None else '?'} bytes ({(it.size or 0) / GIB:.2f} GiB), "
595
+ f"sha256 {it.sha256 or '?'}")
596
+ say(f" -> {os.path.join(it.dest_dir, it.spec.filename)} (staging {it.staging_dir})")
597
+ say(f" total {total} bytes = {total / GIB:.2f} GiB")
598
+ for pb in problems:
599
+ say(f" PROBLEM {pb}")
600
+ if problems:
601
+ rc = max(rc, 1)
602
+ if args.execute:
603
+ say(" not downloading while problems are listed")
604
+ continue
605
+ if not args.execute:
606
+ say(" dry run only; re-run with --execute to download")
607
+ continue
608
+ for it in items:
609
+ try:
610
+ execute_download(it, verify_sha256=not args.skip_sha256, log=say)
611
+ except Exception as e:
612
+ say(f" FAILED {it.spec.filename}: {e}")
613
+ rc = 1
614
+ return rc
615
+
616
+
617
+ def cmd_convert(args) -> int:
618
+ client = ComfyClient(args.comfy_url)
619
+ src = args.ui
620
+ if src.startswith("template:"):
621
+ ui = client.template(src.split(":", 1)[1])
622
+ elif src.startswith("userdata:"):
623
+ ui = client.userdata_get(src.split(":", 1)[1])
624
+ else:
625
+ with open(src, encoding="utf-8") as f:
626
+ ui = json.load(f)
627
+ oi = client.object_info() if not args.object_info else json.load(open(args.object_info, encoding="utf-8"))
628
+ try:
629
+ api, report = convert_ui_to_api(ui, oi)
630
+ except ConversionRefused as e:
631
+ say(f"REFUSED: {e}")
632
+ say("No API workflow was written. Do not hand-edit one; see README 'When a workflow cannot be obtained'.")
633
+ return 3
634
+ say(json.dumps({k: report[k] for k in ("defaulted_widgets", "dropped_frontend_only", "bypassed", "muted",
635
+ "named_crosschecks", "validation_errors")}, indent=1))
636
+ with open(args.out, "w", encoding="utf-8") as f:
637
+ json.dump(api, f, indent=1, ensure_ascii=False)
638
+ with open(args.out + ".report.json", "w", encoding="utf-8") as f:
639
+ json.dump({"source": src, "harness_version": HARNESS_VERSION, **report}, f, indent=1, ensure_ascii=False)
640
+ say(f"wrote {args.out} ({len(api)} nodes); report {args.out}.report.json")
641
+ non_weight = [e for e in report["validation_errors"] if "is not one of the available values" not in e]
642
+ return 1 if non_weight else 0
643
+
644
+
645
+ def cmd_verify(args) -> int:
646
+ path = os.path.join(args.session_dir, "runs.csv")
647
+ probs = check_csv_file(path)
648
+ for p in probs:
649
+ say(f" {p}")
650
+ say(f"{path}: {'OK' if not probs else f'{len(probs)} problem(s)'}")
651
+ return 1 if probs else 0
652
+
653
+
654
+ # ==========================================================================================
655
+ # the run loop
656
+ # ==========================================================================================
657
+ def cmd_run(args) -> int:
658
+ cfg = load_config(args.config)
659
+ if cfg["runtime"] != "comfyui":
660
+ raise SystemExit(f"{args.config} is a {cfg['runtime']} config; use llama_measure.py")
661
+ client = ComfyClient(args.comfy_url, timeout=args.http_timeout)
662
+ say(f"== {cfg['model_slug']} on {cfg['gpu_slug']} via ComfyUI at {client.base}")
663
+ pf = preflight(cfg, client, args)
664
+ print_preflight(cfg, pf)
665
+ if pf.fatal:
666
+ say("== FATAL problems above; nothing was run. Fix the config/workflow, do not work around it.")
667
+ return 1
668
+ runs = [r for r in cfg["runs"] if r.get("enabled", True) and (not args.only or r["run"] in args.only)]
669
+ runnable = [r for r in runs if r["run"] not in pf.blocked]
670
+ if not runnable:
671
+ say("== no runnable runs (see BLOCKED above). Nothing recorded.")
672
+ return 2
673
+
674
+ digest = config_digest(cfg)
675
+ session, resumed = Session.open(args.out_root, cfg["model_slug"], cfg["gpu_slug"], digest,
676
+ resume=not args.no_resume, explicit_id=args.session)
677
+ say(f"== session {session.session_id} ({'resumed' if resumed else 'new'}): {session.dir}")
678
+ session.event("invocation", argv=sys.argv, resumed=resumed, harness_version=HARNESS_VERSION,
679
+ blocked={str(k): v for k, v in pf.blocked.items()}, warnings=pf.warnings)
680
+ with open(os.path.join(session.raw, "outputs", "README.txt"), "w", encoding="utf-8") as f:
681
+ f.write("Generated media kept for local verification of the read-back numbers.\n"
682
+ "NOT for publication without review: some model licences (e.g. MiniMax H3) restrict\n"
683
+ "reproducing or displaying Outputs by territory.\n")
684
+
685
+ ins = Instruments(session, args.nvidia_smi, args.sample_ms, not args.no_spill_monitor,
686
+ args.display_attached)
687
+ if ins.display is None:
688
+ raise SystemExit("display_attached is required on every row and nvidia-smi would not say. "
689
+ "Pass --display-attached yes|no (the owner states a monitor IS attached).")
690
+ err = check_gpu_identity(cfg, ins.gpu_name)
691
+ if err:
692
+ raise SystemExit("nvidia-smi: " + err)
693
+ ins.start()
694
+ logs = LogCollector(client, os.path.join(session.raw, "comfyui_log.jsonl"))
695
+ sysinfo = pf.system_stats.get("system", {})
696
+ # Mutable run context: a ComfyUI restart mid-night refreshes these for the rows after it.
697
+ ctx = {"runtime_version": str(sysinfo.get("comfyui_version") or "unknown"), "argv": sysinfo.get("argv"),
698
+ "sysinfo": sysinfo, "baseline": None, "next_note": None}
699
+ stamp = utc_stamp()
700
+ session.write_json(f"raw/environment_{stamp}.json", environment_record({
701
+ "comfyui_url": client.base, "system_stats": pf.system_stats, "nvidia_smi_static": ins.static,
702
+ "display": {"attached": ins.display, "how": ins.display_how},
703
+ "sampler_clock": ins.sampler.clock_correction()[1], "spill_monitor": ins.spill.reason,
704
+ "folder_paths": pf.folder_paths,
705
+ "weights": {k: {"status": p.status, "local_path": p.local_path, "local_size": p.local_size,
706
+ "expected_size": p.spec.size, "artifact": p.spec.artifact, "revision": p.spec.revision,
707
+ "sha256_checked": p.sha256_ok} for k, p in pf.presence.items()},
708
+ "config_file": os.path.relpath(args.config, HARNESS_DIR), "config_digest": digest,
709
+ }))
710
+ session.write_json(f"raw/object_info_{stamp}.json", pf.object_info)
711
+ session.write_json("raw/config.json", cfg)
712
+
713
+ caveats: list[str] = [FAKE_NOTE] if ins.fake else []
714
+ caveats.append(f"VRAM figures are whole-card (nvidia-smi memory.used): they include the Windows desktop"
715
+ f"{' and the attached display' if ins.display else ''} and any other process; "
716
+ f"peak minus idle estimates the run's own use only if idle held constant.")
717
+ corr, clock_how = ins.sampler.clock_correction()
718
+ if corr:
719
+ caveats.append(f"nvidia-smi clock: {clock_how}")
720
+ if not ins.spill.available:
721
+ caveats.append(f"Windows sysmem-fallback spill was not monitored ({ins.spill.reason}); a run whose peak "
722
+ f"sits near the card's total may have spilled to system RAM without failing.")
723
+ caveats.append("wall_s is ComfyUI's own execution time: execution_success minus execution_start from "
724
+ "/history (ms timestamps on ComfyUI's clock), node overhead included.")
725
+ caveats.append(f"ComfyUI launched with argv={sysinfo.get('argv')}; launch flags change memory behaviour and "
726
+ f"are copied into every row's config_json.")
727
+
728
+ specs = weight_specs(cfg)
729
+ seen_outputs: set[str] = set()
730
+ for row in session.runs_csv.rows():
731
+ try:
732
+ seen_outputs |= set(json.loads(row["config_json"]).get("output_files") or [])
733
+ except (ValueError, KeyError):
734
+ pass
735
+
736
+ stop_reason: Optional[str] = None
737
+ try:
738
+ ensure_idle_queue(client, session, logs)
739
+ base = free_and_settle(client, ins, session, "session-baseline")
740
+ ctx["baseline"] = base.get("post_free_mib")
741
+ say(f"== baseline after /free: {ctx['baseline']} MiB whole-card (settled={base.get('settled')}, "
742
+ f"torch reserved {base.get('torch_reserved_after_mib')} MiB)")
743
+ session.save_state(baseline_mib=ctx["baseline"])
744
+ done = session.runs_csv.recorded_runs()
745
+ for r in runnable:
746
+ n = r["run"]
747
+ if n in done:
748
+ say(f"-- run {n} ({r.get('key')}): already recorded, skipping")
749
+ continue
750
+ if not ins.sampler.alive(max(30.0, 20 * args.sample_ms / 1000)):
751
+ stop_reason = ("the VRAM instrument (nvidia-smi) stopped producing samples; measuring without it "
752
+ "would record rows with no peak. Remaining runs not attempted.")
753
+ break
754
+ prior = session.interrupted_attempts(n)
755
+ if prior >= args.max_interrupted_attempts:
756
+ row = crash_row_after_interruptions(cfg, r, session, ins, ctx, specs, pf, prior)
757
+ session.runs_csv.append(stamp_fake(row, ins))
758
+ session.attempt(n, "end", outcome="recorded-after-interruptions")
759
+ say(f"-- run {n}: {prior} interrupted attempts; recorded as failure=crash and moving on")
760
+ continue
761
+ try:
762
+ outcome = measure_one(cfg, r, session, ins, client, logs, pf, specs, ctx, seen_outputs, args,
763
+ prior, caveats)
764
+ except Exception as e: # a harness bug must cost one run, not the night
765
+ import traceback
766
+ session.event("harness_error", run=n, error=repr(e), traceback=traceback.format_exc())
767
+ session.attempt(n, "end", outcome="harness-error")
768
+ caveats.append(f"run {n}: harness error ({type(e).__name__}: {str(e)[:200]}); no row written, "
769
+ f"traceback in raw/events.jsonl")
770
+ say(f" HARNESS ERROR on run {n}: {e!r}; continuing with the next run")
771
+ outcome = "next"
772
+ if outcome == "stop":
773
+ stop_reason = "ComfyUI did not come back or could not be freed; remaining runs not attempted"
774
+ break
775
+ logs.fetch(force=True)
776
+ except BaseException as e:
777
+ stop_reason = f"harness stopped early ({type(e).__name__}: {str(e)[:300]}); runs without a row were not completed"
778
+ raise
779
+ finally:
780
+ ins.stop()
781
+ finalize_session(cfg, session, ins, pf, caveats, ctx, stop_reason)
782
+ return 3 if stop_reason else 0
783
+
784
+
785
+ def crash_row_after_interruptions(cfg, r, session, ins, ctx, specs, pf, prior) -> dict:
786
+ prompt, ovs, applied = pf.prompts[r["run"]]
787
+ artifact, quant, per_file = artifact_and_quant(cfg, prompt, specs, r["workflow"])
788
+ return base_row(cfg, r, session, ins, ctx, artifact, quant, time.time(), {
789
+ "run_key": r.get("key"), "workflow": r["workflow"], "knobs": knob_values(cfg, r),
790
+ "artifacts": per_file}) | {
791
+ "cold_start": True, "ok": False, "failure": "crash",
792
+ "notes": (f"{prior} attempts at this run were interrupted without a result (the harness, ComfyUI or the "
793
+ f"host died mid-run); not retried again. Cause unknown; see raw/attempts.jsonl and events.jsonl."),
794
+ }
795
+
796
+
797
+ def knob_values(cfg: dict, r: dict) -> dict:
798
+ v = dict((cfg.get("defaults") or {}).get("set") or {})
799
+ v.update(r.get("set") or {})
800
+ return v
801
+
802
+
803
+ def base_row(cfg, r, session, ins, ctx, artifact, quant, t_start, config_json) -> dict:
804
+ return {
805
+ "session_id": session.session_id, "run": r["run"], "measured_at": utc_iso(t_start),
806
+ "model_slug": cfg["model_slug"], "gpu_slug": cfg["gpu_slug"], "vertical": cfg["vertical"],
807
+ "task": r.get("task", cfg.get("task")), "runtime": "comfyui", "runtime_version": ctx["runtime_version"],
808
+ "artifact": artifact, "quantization": quant, "width": None, "height": None, "frames": None,
809
+ "steps": knob_values(cfg, r).get("steps"), "context_tokens": None, "prompt_tokens": None,
810
+ "gen_tokens": None, "output_seconds": None, "config_json": config_json, "cold_start": True,
811
+ "ok": False, "failure": None, "wall_s": None, "prefill_tokens_per_s": None, "gen_tokens_per_s": None,
812
+ "idle_device_mib": None, "peak_device_mib": None, "peak_process_mib": None,
813
+ "vram_total_mib": ins.vram_total_mib, "display_attached": ins.display, "gpu_name": ins.gpu_name,
814
+ "driver": ins.driver, "sample_ms": ins.sample_ms, "notes": "",
815
+ }
816
+
817
+
818
+ def recover_after_loss(client, ins, session, logs, ctx, args, caveats, n) -> str:
819
+ """ComfyUI died, restarted, or would not let go. Wait for it (never restart it), make sure
820
+ the queue is ours to use, re-read what is now running, and re-baseline idle memory."""
821
+ session.event("comfyui_lost_during_run", run=n)
822
+ say(f" waiting up to {args.comfy_restart_wait:.0f}s for ComfyUI to answer again")
823
+ if not client.wait_reachable(args.comfy_restart_wait):
824
+ return "stop"
825
+ try:
826
+ ensure_idle_queue(client, session, logs, wait_s=600)
827
+ except SystemExit:
828
+ return "stop"
829
+ try:
830
+ new = client.system_stats().get("system", {})
831
+ except ComfyError:
832
+ return "stop"
833
+ old_v, old_argv = ctx["runtime_version"], ctx["argv"]
834
+ ctx["runtime_version"] = str(new.get("comfyui_version") or "unknown")
835
+ ctx["argv"], ctx["sysinfo"] = new.get("argv"), new
836
+ changed = (ctx["runtime_version"], ctx["argv"]) != (old_v, old_argv)
837
+ msg = (f"ComfyUI came back after run {n} as version {ctx['runtime_version']} with argv={ctx['argv']}"
838
+ + (f" (was {old_v}, argv={old_argv})" if changed else " (unchanged)"))
839
+ caveats.append(msg)
840
+ ctx["next_note"] = "first run after a ComfyUI restart" + (" with different version/launch flags" if changed else "")
841
+ base = free_and_settle(client, ins, session, f"rebaseline-after-run{n}")
842
+ if base.get("post_free_mib") is not None:
843
+ ctx["baseline"] = base["post_free_mib"]
844
+ return "next"
845
+
846
+
847
+ def measure_one(cfg, r, session, ins, client, logs, pf, specs, ctx, seen_outputs, args,
848
+ prior_interruptions, caveats) -> str:
849
+ n = r["run"]
850
+ prompt, ovs, applied = pf.prompts[n]
851
+ wf = cfg["workflows"][r["workflow"]]
852
+ timeout_s = float(r.get("timeout_s") or (cfg.get("defaults") or {}).get("timeout_s") or 3600)
853
+ say(f"-- run {n} ({r.get('key')}): {r.get('why', '')}")
854
+ say(f" knobs {knob_values(cfg, r)} timeout {timeout_s:.0f}s")
855
+ artifact, quant, per_file = artifact_and_quant(cfg, prompt, specs, r["workflow"])
856
+ notes: list[str] = []
857
+ if ctx.get("next_note"):
858
+ notes.append(ctx.pop("next_note"))
859
+ if prior_interruptions:
860
+ notes.append(f"retried after {prior_interruptions} interrupted attempt(s)")
861
+ unverified = sorted(f for f in per_file if getattr(pf.presence.get(f), "status", "") == "present-unverified")
862
+ if unverified:
863
+ notes.append(f"artifact identity not verified on disk (size unreadable from the harness): {unverified}")
864
+
865
+ # Nothing of ours (e.g. a prompt whose /prompt reply was lost) or anyone else's may run
866
+ # inside this run's window.
867
+ try:
868
+ ensure_idle_queue(client, session, logs, wait_s=1800)
869
+ except SystemExit:
870
+ return "stop"
871
+ except ComfyUnreachable:
872
+ return recover_after_loss(client, ins, session, logs, ctx, args, caveats, n)
873
+
874
+ cold = not args.warm
875
+ free_rec = None
876
+ if cold:
877
+ free_rec = free_and_settle(client, ins, session, f"run{n}")
878
+ if free_rec.get("free_error"):
879
+ notes.append(f"POST /free failed ({free_rec['free_error'][:120]})")
880
+ cold = False
881
+ if not free_rec.get("settled"):
882
+ notes.append("whole-card memory had not settled after /free (spread "
883
+ f"{free_rec['settle'].get('spread_mib')} MiB)")
884
+ baseline = ctx.get("baseline")
885
+ post = free_rec.get("post_free_mib")
886
+ if baseline is not None and post is not None and post - baseline > 256:
887
+ notes.append(f"/free left {post - baseline} MiB above the session baseline")
888
+ cold = False
889
+ torch_after = free_rec.get("torch_reserved_after_mib")
890
+ if torch_after is not None and torch_after > 256:
891
+ notes.append(f"ComfyUI's allocator still reserved {torch_after} MiB after /free")
892
+ cold = False
893
+ if not cold:
894
+ notes.append("so this run is NOT counted as a cold start")
895
+
896
+ pid = str(uuid.uuid4())
897
+ t_submit = time.time()
898
+ idle = ins.sampler.last_before(t_submit, max_age=3 * ins.sample_ms / 1000 + 1.0)
899
+ idle_mib = idle[1].used if idle else None
900
+ if idle is None:
901
+ notes.append("no fresh VRAM sample just before the run: idle not measured")
902
+ session.attempt(n, "start", prompt_id=pid)
903
+ session.write_json(f"raw/runs/run{n:02d}.prompt.json", prompt)
904
+ try:
905
+ client.submit(prompt, pid)
906
+ except PromptRejected as e:
907
+ say(f" REJECTED by ComfyUI validation: {e}")
908
+ session.event("prompt_rejected", run=n, payload=e.payload)
909
+ session.attempt(n, "end", outcome="rejected")
910
+ caveats.append(f"run {n} not attempted: ComfyUI rejected the prompt ({str(e)[:200]})")
911
+ return "next" # a rejected graph never ran: no row
912
+ except ComfyUnreachable as e:
913
+ # The reply may have been lost after ComfyUI queued it: the next run's ensure_idle_queue
914
+ # cancels it by prompt_id before anything else is measured.
915
+ say(f" ComfyUI unreachable at submit: {e}")
916
+ session.attempt(n, "end", outcome="unreachable-at-submit")
917
+ caveats.append(f"run {n} not attempted: ComfyUI unreachable when queueing it")
918
+ return recover_after_loss(client, ins, session, logs, ctx, args, caveats, n)
919
+ except ComfyError as e:
920
+ say(f" ComfyUI refused the submission: {e}")
921
+ session.event("submit_error", run=n, error=str(e))
922
+ session.attempt(n, "end", outcome="submit-error")
923
+ caveats.append(f"run {n} not attempted: POST /prompt failed ({str(e)[:200]})")
924
+ return "next"
925
+
926
+ status, h = wait_for_prompt(client, pid, timeout_s, logs, args.unreachable_after, args.stall_tolerance)
927
+ t_done = time.time()
928
+ failure = None
929
+ if status == "timeout":
930
+ say(f" hard timeout after {timeout_s:.0f}s; interrupting")
931
+ status2, h = abort_prompt(client, pid, args.interrupt_grace, logs)
932
+ t_done = time.time()
933
+ failure = "timeout"
934
+ notes.append(f"hard timeout at {timeout_s:.0f}s; interrupted" +
935
+ ("" if status2 in ("interrupted", "gone") else " but ComfyUI did not let go"))
936
+ if status2 in ("stuck", "unreachable"):
937
+ session.event("stuck", run=n, prompt_id=pid, how=status2)
938
+ status = "unreachable"
939
+ elif status == "unreachable":
940
+ failure = "crash"
941
+ notes.append("ComfyUI stopped answering mid-run (process died or hung); see comfyui_log.jsonl")
942
+ elif status == "lost":
943
+ failure = "crash"
944
+ notes.append("the job vanished from ComfyUI's queue and history while ComfyUI kept answering: "
945
+ "ComfyUI restarted mid-run (process died); see comfyui_log.jsonl")
946
+
947
+ covered = ins.sampler.wait_covered(t_done, timeout=120)
948
+ win = ins.sampler.window(t_submit, t_done)
949
+ spill = ins.spill.shared_delta(t_submit, t_done)
950
+ instrument_notes = window_notes(win, ins.sample_ms, ins.vram_total_mib, spill, covered)
951
+ hp = parse_history(h) if h else None
952
+
953
+ stored_problems = []
954
+ if h:
955
+ stored = h.get("prompt")
956
+ stored_prompt = stored[2] if isinstance(stored, (list, tuple)) and len(stored) > 2 else None
957
+ if isinstance(stored_prompt, dict):
958
+ stored_problems = verify_overrides_in(stored_prompt, ovs)
959
+ if stored_problems:
960
+ notes.append("override not found in the prompt ComfyUI stored: " + "; ".join(stored_problems))
961
+
962
+ row = base_row(cfg, r, session, ins, ctx, artifact, quant, t_submit, {})
963
+ probe = None
964
+ out_files: list[str] = []
965
+ if hp and failure is None:
966
+ if hp["error"]:
967
+ failure, detail = classify_error(hp["error"])
968
+ notes.append(detail)
969
+ elif hp["interrupted"]:
970
+ failure = "timeout"
971
+ notes.append("interrupted")
972
+ elif not hp["success"]:
973
+ failure = "crash"
974
+ notes.append(f"history status {hp['status_str']} without success: events {hp['events']}")
975
+ if cold and hp["cached"]:
976
+ notes.append(f"nodes served from ComfyUI's cache despite /free: {hp['cached']}")
977
+ row["cold_start"] = False
978
+ if hp and failure is None:
979
+ entries = [e for e in output_entries(h.get("outputs") or {})
980
+ if not wf.get("output_node") or e["node"] == str(wf["output_node"])]
981
+ if not entries:
982
+ failure = "invalid-output"
983
+ notes.append(f"no output file reported by node {wf.get('output_node')}")
984
+ else:
985
+ e = entries[0]
986
+ ident = f"{e['type']}/{e['subfolder']}/{e['filename']}"
987
+ out_files = [f"{x['type']}/{x['subfolder']}/{x['filename']}" for x in entries]
988
+ if ident in seen_outputs or str(e["node"]) in [str(c) for c in hp["cached"]]:
989
+ failure = "invalid-output"
990
+ notes.append(f"output {ident} is a cached result from an earlier run, not a new generation")
991
+ else:
992
+ local = os.path.join(session.raw, "outputs", f"run{n:02d}_{os.path.basename(e['filename'])}")
993
+ try:
994
+ data = client.view(e["filename"], e["subfolder"], e["type"])
995
+ with open(local, "wb") as f:
996
+ f.write(data)
997
+ probe = probe_file(local)
998
+ seen_outputs.add(ident)
999
+ except Exception as ex: # ComfyError, ProbeError, OSError, a PyAV decode error ...
1000
+ failure = "invalid-output"
1001
+ notes.append(f"output unreadable: {type(ex).__name__}: {str(ex)[:160]}")
1002
+ probe = None
1003
+ if stored_problems and failure is None:
1004
+ # POST /prompt runs node_replace_manager.apply_replacements() before validating, so what
1005
+ # ran can differ from what we sent. If a knob is not in the stored prompt, this row would
1006
+ # claim a configuration that did not run: it is not a valid measurement of that config.
1007
+ failure = "invalid-output"
1008
+ notes.append("the prompt ComfyUI ran is not the configured one (see above); not a measurement of this config")
1009
+ if probe:
1010
+ row["width"], row["height"] = probe["width"], probe["height"]
1011
+ if row["task"] in ("t2v", "i2v"):
1012
+ row["frames"] = probe["frames"]
1013
+ if probe.get("duration_s"):
1014
+ row["output_seconds"] = round(float(probe["duration_s"]), 4)
1015
+ elif failure is None:
1016
+ failure = "invalid-output"
1017
+ notes.append("the video file has no readable duration")
1018
+ want = knob_values(cfg, r)
1019
+ if want.get("width") and want.get("height") and (want["width"], want["height"]) != (probe["width"], probe["height"]):
1020
+ notes.append(f"requested {want['width']}x{want['height']}, file is {probe['width']}x{probe['height']}")
1021
+ exp = r.get("expect") or {}
1022
+ for k in ("width", "height", "frames"):
1023
+ if k in exp and row.get(k) is not None and row[k] != exp[k]:
1024
+ notes.append(f"expected {k}={exp[k]} from the recipe, file says {row[k]}")
1025
+ if failure is None and not probe:
1026
+ failure = "invalid-output"
1027
+ notes.append("no readable output")
1028
+
1029
+ row["ok"] = failure is None
1030
+ row["failure"] = failure
1031
+ row["cold_start"] = cold and row["cold_start"]
1032
+ row["idle_device_mib"] = idle_mib
1033
+ row["peak_device_mib"] = win.get("peak_mib")
1034
+ if hp and hp.get("wall_s") and hp["wall_s"] > 0:
1035
+ row["wall_s"] = hp["wall_s"]
1036
+ if failure:
1037
+ notes.append(f"wall_s is time to {hp['end_event']}")
1038
+ row["config_json"] = {
1039
+ "run_key": r.get("key"), "workflow": r["workflow"], "workflow_file": wf["api_file"],
1040
+ "prompt_sha256": prompt_digest(prompt), "prompt_id": pid, "knobs": knob_values(cfg, r),
1041
+ "overrides_applied": [{k: a[k] for k in ("node", "input", "old", "new", "replaced_link")} for a in applied],
1042
+ "node_literals": literal_knobs(prompt), "artifacts": per_file, "comfyui_argv": ctx["argv"],
1043
+ "cold_start_method": "POST /free {unload_models:true, free_memory:true}, then settle" if not args.warm else "warm",
1044
+ "output_files": out_files,
1045
+ }
1046
+ row["notes"] = "; ".join(notes + instrument_notes) # what happened first, then how well it was seen
1047
+ record = {"row": {k: v for k, v in row.items() if k != "config_json"}, "config_json": row["config_json"],
1048
+ "free": free_rec, "window": win, "window_covered": covered, "spill": list(spill), "history": hp,
1049
+ "history_raw_status": (h or {}).get("status"), "probe": probe, "stored_prompt_problems": stored_problems,
1050
+ "t_submit": t_submit, "t_done": t_done, "status": status}
1051
+ session.write_json(f"raw/runs/run{n:02d}.json", record)
1052
+ try:
1053
+ session.runs_csv.append(stamp_fake(row, ins))
1054
+ except SchemaError as e: # a harness bug: keep everything, write no invalid row
1055
+ session.write_json(f"raw/runs/run{n:02d}.schema_error.json", {"error": str(e), **record})
1056
+ session.attempt(n, "end", outcome="schema-error")
1057
+ caveats.append(f"run {n} was measured but its row failed schema validation ({str(e)[:200]}); nothing "
1058
+ f"was written to runs.csv; raw/runs/run{n:02d}.schema_error.json holds the measurement")
1059
+ say(f" SCHEMA ERROR for run {n}: {e}")
1060
+ return "next"
1061
+ session.attempt(n, "end", outcome="recorded", ok=row["ok"], failure=failure)
1062
+ say(f" -> ok={row['ok']} failure={failure} wall_s={row['wall_s']} idle={idle_mib} peak={row['peak_device_mib']} "
1063
+ f"file={row['width']}x{row['height']}x{row['frames']} notes={row['notes'][:200]}")
1064
+
1065
+ if status in ("unreachable", "lost"):
1066
+ return recover_after_loss(client, ins, session, logs, ctx, args, caveats, n)
1067
+ return "next"
1068
+
1069
+
1070
+ def finalize_session(cfg, session, ins, pf, caveats, ctx, stop_reason) -> None:
1071
+ rows = session.runs_csv.rows()
1072
+ frees = [e for e in session.events() if e.get("kind") == "free" and e.get("post_free_mib") is not None]
1073
+ if frees:
1074
+ post = [e["post_free_mib"] for e in frees]
1075
+ drops = [e["dropped_mib"] for e in frees if e.get("dropped_mib") is not None]
1076
+ caveats.append(f"/free verification this invocation and before: whole-card memory after /free ranged "
1077
+ f"{min(post)}-{max(post)} MiB over {len(post)} frees; largest drop measured "
1078
+ f"{max(drops) if drops else 'n/a'} MiB; ComfyUI torch-reserved after /free max "
1079
+ f"{max((e.get('torch_reserved_after_mib') or 0) for e in frees)} MiB.")
1080
+ if pf.blocked:
1081
+ for n, whys in sorted(pf.blocked.items()):
1082
+ caveats.append(f"run {n} not attempted: {'; '.join(whys)}")
1083
+ if stop_reason:
1084
+ caveats.append(stop_reason)
1085
+ all_caveats = session.add_caveats(caveats)
1086
+ sysinfo = ctx["sysinfo"]
1087
+ comfy_os = {"win32": "Windows", "linux": "Linux", "darwin": "macOS"}.get(sysinfo.get("os"), sysinfo.get("os"))
1088
+ host = {"os": f"ComfyUI on {comfy_os}; harness on {os_description()}",
1089
+ "ram_gib": round((sysinfo.get("ram_total") or 0) / (1024 ** 3)) or None}
1090
+ sj = new_session_json(
1091
+ session_id=session.session_id,
1092
+ gpu={"slug": cfg["gpu_slug"], "name": ins.gpu_name, "vram_total_mib": ins.vram_total_mib,
1093
+ "driver": ins.driver, "compute_capability": ins.compute_capability},
1094
+ host=host, display_attached=bool(ins.display),
1095
+ runtime={"name": "comfyui", "version": ctx["runtime_version"], "extras": {
1096
+ "pytorch": sysinfo.get("pytorch_version"), "python": sysinfo.get("python_version"),
1097
+ "argv": ctx["argv"], "frontend_required": sysinfo.get("required_frontend_version"),
1098
+ "templates": sysinfo.get("installed_templates_version"),
1099
+ "deploy_environment": sysinfo.get("deploy_environment"),
1100
+ "harness_version": HARNESS_VERSION,
1101
+ "pcie": {k: ins.static["optional"].get(k) for k in ("pcie.link.gen.max", "pcie.link.gen.current",
1102
+ "pcie.link.width.max", "pcie.link.width.current")},
1103
+ "display_detection": ins.display_how,
1104
+ }},
1105
+ sample_ms=ins.sample_ms, instrument_cmd=ins.instrument_description(), caveats=all_caveats)
1106
+ session.write_json("session.json", sj)
1107
+ try:
1108
+ session.copy_harness(HARNESS_DIR)
1109
+ except OSError as e:
1110
+ session.event("harness_copy_failed", error=str(e))
1111
+ write_session_readme(cfg, session, rows, all_caveats)
1112
+ all_done = {r["run"] for r in cfg["runs"] if r.get("enabled", True)} <= session.runs_csv.recorded_runs()
1113
+ session.save_state(status="finished" if all_done else "in_progress", finished_at=utc_iso(time.time()))
1114
+ probs = check_csv_file(session.runs_csv.path) if os.path.exists(session.runs_csv.path) else []
1115
+ say(f"== session {session.session_id}: {len(rows)} row(s); schema check "
1116
+ f"{'OK' if not probs else probs}; {session.dir}")
1117
+
1118
+
1119
+ def write_session_readme(cfg, session, rows, caveats) -> None:
1120
+ lines = [f"# {session.session_id}", "",
1121
+ f"Model `{cfg['model_slug']}` on `{cfg['gpu_slug']}` through ComfyUI. Written by the harness at "
1122
+ f"the end of the session; the owner reviews it before anything is published.", "",
1123
+ "**Nothing here has been uploaded or published.**", "",
1124
+ "| run | key | ok | failure | file WxHxF | wall_s | idle MiB | peak MiB | notes |",
1125
+ "|---:|---|---|---|---|---:|---:|---:|---|"]
1126
+ for r in rows:
1127
+ try:
1128
+ key = json.loads(r["config_json"]).get("run_key", "")
1129
+ except ValueError:
1130
+ key = ""
1131
+ size = "x".join(v for v in (r["width"], r["height"], r["frames"]) if v)
1132
+ lines.append(f"| {r['run']} | {key} | {r['ok']} | {r['failure']} | {size} | {r['wall_s']} | "
1133
+ f"{r['idle_device_mib']} | {r['peak_device_mib']} | {r['notes'][:160]} |")
1134
+ lines += ["", "## Caveats", ""] + [f"- {c}" for c in caveats]
1135
+ lines += ["", "## Recipe claims under test", ""] + [f"- {c}" for c in (cfg.get("recipe") or {}).get("claims", [])]
1136
+ with open(os.path.join(session.dir, "README.md"), "w", encoding="utf-8") as f:
1137
+ f.write("\n".join(lines) + "\n")
1138
+
1139
+
1140
+ # ==========================================================================================
1141
+ def parse_only(s: Optional[str]) -> Optional[list[int]]:
1142
+ if not s:
1143
+ return None
1144
+ return [int(x) for x in re.split(r"[,\s]+", s.strip()) if x]
1145
+
1146
+
1147
+ def main(argv=None) -> int:
1148
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
1149
+ ap.add_argument("--comfy-url", default=DEFAULT_URL, help="default %(default)s (env COMFYUI_URL)")
1150
+ ap.add_argument("--path-map", action="append", help=r"WIN=LOCAL prefix map, e.g. D:\ComfyUI=/mnt/d/ComfyUI")
1151
+ sub = ap.add_subparsers(dest="cmd", required=True)
1152
+
1153
+ c = sub.add_parser("check", help="preflight only: validate configs, workflows, weights; run nothing")
1154
+ c.add_argument("--config", nargs="+", required=True)
1155
+ c.add_argument("--only", type=parse_only)
1156
+ c.add_argument("--verify-sha256", action="store_true", help="hash existing weights (slow)")
1157
+
1158
+ d = sub.add_parser("download", help="plan (default) or --execute downloads of missing weights")
1159
+ d.add_argument("--config", nargs="+", required=True)
1160
+ d.add_argument("--only", type=parse_only)
1161
+ d.add_argument("--execute", action="store_true", help="actually download (default is a dry run)")
1162
+ d.add_argument("--skip-sha256", action="store_true", help="skip SHA-256 of fresh downloads (size still checked)")
1163
+
1164
+ r = sub.add_parser("run", help="measure the matrix of one config")
1165
+ r.add_argument("--config", required=True)
1166
+ r.add_argument("--only", type=parse_only, help="comma-separated run numbers")
1167
+ r.add_argument("--out-root", default=os.path.dirname(HARNESS_DIR),
1168
+ help="parent of sessions/ (default: the directory containing harness/)")
1169
+ r.add_argument("--session", help="resume this session id explicitly")
1170
+ r.add_argument("--no-resume", action="store_true", help="start a new session even if one is unfinished")
1171
+ r.add_argument("--sample-ms", type=int, default=500)
1172
+ r.add_argument("--display-attached", choices=["yes", "no", "auto"], default="auto")
1173
+ r.add_argument("--nvidia-smi", help="path to nvidia-smi if not on PATH")
1174
+ r.add_argument("--no-spill-monitor", action="store_true")
1175
+ r.add_argument("--warm", action="store_true", help="do NOT /free before each run (rows say cold_start=false)")
1176
+ r.add_argument("--interrupt-grace", type=float, default=300)
1177
+ r.add_argument("--comfy-restart-wait", type=float, default=900,
1178
+ help="after ComfyUI dies mid-run, wait this long for it to answer again (it is never restarted by us)")
1179
+ r.add_argument("--unreachable-after", type=float, default=UNREACHABLE_AFTER_S,
1180
+ help="seconds of refused/reset connections mid-run before the run is recorded as a crash")
1181
+ r.add_argument("--stall-tolerance", type=float, default=STALL_TOLERANCE_S,
1182
+ help="seconds ComfyUI may accept connections without answering (busy, paging) before giving up")
1183
+ r.add_argument("--http-timeout", type=float, default=30.0, help="per-request HTTP timeout to ComfyUI")
1184
+ r.add_argument("--max-interrupted-attempts", type=int, default=2)
1185
+ r.add_argument("--verify-sha256", action="store_true")
1186
+
1187
+ v = sub.add_parser("convert", help="UI-format workflow -> API format (conservative; refuses what it cannot prove)")
1188
+ v.add_argument("--ui", required=True, help="a file, template:<name>, or userdata:<path under user dir>")
1189
+ v.add_argument("--out", required=True)
1190
+ v.add_argument("--object-info", help="use a saved object_info.json instead of the live server")
1191
+
1192
+ f = sub.add_parser("verify", help="re-check a session's runs.csv against the schema")
1193
+ f.add_argument("--session-dir", required=True)
1194
+
1195
+ args = ap.parse_args(argv)
1196
+ utf8_stdio()
1197
+ return {"check": cmd_check, "download": cmd_download, "run": cmd_run, "convert": cmd_convert,
1198
+ "verify": cmd_verify}[args.cmd](args)
1199
+
1200
+
1201
+ if __name__ == "__main__":
1202
+ sys.exit(main())
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/krea-2_rtx-5060-ti.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "krea-2",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "image",
6
+ "runtime": "comfyui",
7
+ "task": "t2i",
8
+ "recipe": {
9
+ "slug": "krea-2-rtx-5060-ti",
10
+ "url": "https://smeltcore.com/recipes/krea-2-rtx-5060-ti/",
11
+ "read_from": "https://api.smeltcore.com/api/v1/recipes/krea-2-rtx-5060-ti (content_raw), 2026-09-11",
12
+ "claims": [
13
+ "Krea 2 Turbo FP8 (AlperKTS/Krea2_FP8) runs 8-step text-to-image at up to 1280x720 on a 16GB RTX 5060 Ti in native ComfyUI, no custom nodes.",
14
+ "ComfyUI encodes, frees the 4.88 GiB text encoder, then samples, so the sampling-stage peak sits near the 12 GiB transformer plus VAE and activations, within 16GB.",
15
+ "Very large resolutions or batch sizes can exceed it (no size is named)."
16
+ ]
17
+ },
18
+ "gaps": [
19
+ "The recipe publishes no speed figure (none existed), so there is no speed claim to test, only the fit claims.",
20
+ "The Raw (undistilled) tier has no turnkey native-ComfyUI build per the recipe itself; nothing to run.",
21
+ "'Very large resolutions ... can exceed it' names no size: runs 3 and 4 probe above the claimed 1280x720, chosen by us, not by the recipe.",
22
+ "The recipe's primary workflow ('Krea 2 simple workflow.json') ships with an EMPTY prompt; its sibling krea2_native_workflow.json is node-for-node identical except that it carries an example prompt. We use the simple workflow and set that example prompt through the 'prompt' knob.",
23
+ "The official ComfyUI Krea-2 template uses a different transformer file (Comfy-Org/Krea-2 krea2_turbo_fp8_scaled.safetensors). The recipe's lead is AlperKTS's krea2_turbo_fp8.safetensors, which is what is measured here."
24
+ ],
25
+ "workflows": {
26
+ "fp8": {
27
+ "api_file": "workflows/krea-2_turbo-fp8_alperkts.api.json",
28
+ "output_node": "5",
29
+ "quantization": "fp8_e4m3fn",
30
+ "knobs": {
31
+ "width": {"node": "10", "input": "width"},
32
+ "height": {"node": "10", "input": "height"},
33
+ "steps": {"node": "2", "input": "steps"},
34
+ "seed": {"node": "2", "input": "seed"},
35
+ "prompt": {"node": "6", "input": "text"}
36
+ }
37
+ }
38
+ },
39
+ "weights": {
40
+ "krea2_turbo_fp8.safetensors": {
41
+ "repo": "AlperKTS/Krea2_FP8",
42
+ "path": "krea2_turbo_fp8.safetensors",
43
+ "revision": "19c1c7da8760da12f338f7c4472575ab7dceb445",
44
+ "folder": "diffusion_models", "dest_basename": "unet",
45
+ "size": 12900096996,
46
+ "sha256": "2d3523507c59df965e5d4ec9a1b9b4591297a50c058915c36fb29d124d30f64e",
47
+ "quantization": "fp8 (float8_e4m3fn per the model card)",
48
+ "source": "recipe step 2: wget https://huggingface.co/AlperKTS/Krea2_FP8/resolve/main/krea2_turbo_fp8.safetensors into models/unet"
49
+ },
50
+ "qwen3vl_4b_fp8_scaled.safetensors": {
51
+ "repo": "Comfy-Org/Qwen3-VL",
52
+ "path": "text_encoders/qwen3vl_4b_fp8_scaled.safetensors",
53
+ "revision": "5529a3c630b649351fb72d8c251577b5962371d8",
54
+ "folder": "text_encoders",
55
+ "size": 5242467968,
56
+ "sha256": "54bd5144df0bbc25dd6ccadfcb826b521445a1b06ae5a42570bdd2974ca87094",
57
+ "quantization": "fp8_scaled",
58
+ "source": "recipe step 2 (identical bytes are also in AlperKTS/Krea2_FP8)"
59
+ },
60
+ "qwen_image_vae.safetensors": {
61
+ "repo": "Comfy-Org/Qwen-Image_ComfyUI",
62
+ "path": "split_files/vae/qwen_image_vae.safetensors",
63
+ "revision": "7beb7b647f04469fbe64ba8adc2bb0d7e5e9f73f",
64
+ "folder": "vae",
65
+ "size": 253806246,
66
+ "sha256": "a70580f0213e67967ee9c95f05bb400e8fb08307e017a924bf3441223e023d1f",
67
+ "quantization": "unstated (VAE)",
68
+ "source": "recipe step 2"
69
+ }
70
+ },
71
+ "defaults": {
72
+ "timeout_s": 900,
73
+ "set": {"prompt": "A cinematic photo of a cat wearing steampunk goggles, dramatic lighting, 8K", "steps": 8}
74
+ },
75
+ "runs": [
76
+ {"run": 1, "key": "r01_1280x720_8step_default", "workflow": "fp8",
77
+ "set": {"width": 1280, "height": 720, "seed": 2001},
78
+ "expect": {"width": 1280, "height": 720},
79
+ "why": "the recipe's default (8 steps, cfg 1.0, er_sde, simple, 1280x720) and also the largest size it claims ('up to 1280x720')"},
80
+ {"run": 2, "key": "r02_1024x576_smaller", "workflow": "fp8",
81
+ "set": {"width": 1024, "height": 576, "seed": 2002},
82
+ "expect": {"width": 1024, "height": 576},
83
+ "why": "one smaller, same aspect"},
84
+ {"run": 3, "key": "r03_1536x864_larger", "workflow": "fp8",
85
+ "set": {"width": 1536, "height": 864, "seed": 2003},
86
+ "expect": {"width": 1536, "height": 864},
87
+ "why": "one larger, 1.44x the pixels of the claimed maximum"},
88
+ {"run": 4, "key": "r04_1920x1088_beyond", "workflow": "fp8",
89
+ "set": {"width": 1920, "height": 1088, "seed": 2004},
90
+ "expect": {"width": 1920, "height": 1088},
91
+ "why": "2.27x the claimed maximum: where the recipe's 'very large resolutions can exceed it' is tested (an OOM or a spill here is a result)"},
92
+ {"run": 5, "key": "r05_1280x720_repeat", "workflow": "fp8",
93
+ "set": {"width": 1280, "height": 720, "seed": 2005},
94
+ "expect": {"width": 1280, "height": 720},
95
+ "why": "repeat of run 1 with a different seed: run-to-run spread"}
96
+ ]
97
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/minimax-h3_rtx-5060-ti.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "minimax-h3",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "video",
6
+ "runtime": "comfyui",
7
+ "task": "t2v",
8
+ "licence_gate": {
9
+ "ack_file": "ACK_LICENCE_minimax-h3",
10
+ "summary": "The MiniMax H3 Community License defines Excluded Territories as the European Union, the United Kingdom, the Republic of Korea and the United States (clause I.5) and forbids using the works or any of their Outputs outside the Applicable Territory (clause V.4); the recipe opens with this warning. Whether this machine may run it is the owner's decision, not the harness's."
11
+ },
12
+ "recipe": {
13
+ "slug": "minimax-h3-on-rtx-5060-ti-16-gb-two-published-runs-and-the-gap-between-them",
14
+ "url": "https://smeltcore.com/recipes/minimax-h3-on-rtx-5060-ti-16-gb-two-published-runs-and-the-gap-between-them/",
15
+ "read_from": "https://api.smeltcore.com/api/v1/recipes/minimax-h3-on-rtx-5060-ti-16-gb-two-published-runs-and-the-gap-between-them (content_raw), 2026-09-11",
16
+ "claims": [
17
+ "Queue the template unchanged: 864x480, 124 frames (5.17 s at 24 fps), 20 steps; both published 5060 Ti runs sit there.",
18
+ "864x480 to 960x544 is the realistic practical upper limit on this card (time, not VRAM, stops you).",
19
+ "1344x768 at 124 frames is 'a realistic ceiling for 16 GB' and the node's MAX_PIXELS cap.",
20
+ "The text-encode stage needs 15.800 GiB on Linux / 16.093 GiB under the Windows reserve; the 19.530 GiB transformer is streamed, never fully resident.",
21
+ "The VRAM you see in use is a property of how much was free when the stage loaded, not of H3."
22
+ ]
23
+ },
24
+ "recipe_launch_flags": ["--disable-pinned-memory"],
25
+ "gaps": [
26
+ "The current official template has changed since the recipe: it now also references the optional Turbo LoRA (lightx2v/Minimax-h3-Turbo, 1,956,193,000 B) behind a switch that is off. ComfyUI's validate_prompt rejects the stock template when that file is absent, even though the branch is never evaluated (measured 2026-09-11 on ComfyUI 0.35.0). A reader who installs only the recipe's four files and queues the template 'unchanged' gets 'Value not in list: lora_name'. The shipped workflow prunes that dead branch (workflows/build.json says exactly how).",
27
+ "The recipe's launch line is `python main.py --disable-pinned-memory`. The harness cannot set ComfyUI's launch flags; every row records argv, and preflight warns when the flag is absent.",
28
+ "EasyCache, SageAttention (KJNodes patch) and the Turbo LoRA are discussed but never specified as an exact graph change (node, parameters, insertion point), so none of them is built into a run.",
29
+ "The two published runs time different spans (one includes a 4K upscale); nothing in the recipe pins what 'wall time' covered, so our wall_s (ComfyUI execution only) is not directly comparable to either."
30
+ ],
31
+ "workflows": {
32
+ "t2v": {
33
+ "api_file": "workflows/minimax-h3_t2v_turbo-branch-pruned.api.json",
34
+ "output_node": "92",
35
+ "quantization": "int8_convrot",
36
+ "requires_nodes": ["MiniMaxH3ImageToVideo", "ComfyMathExpression", "ComfySwitchNode", "ResolutionSelector", "PrimitiveFloat"],
37
+ "requires_note": "ComfyUI core >= 0.30.0 (recipe prerequisite); the template also uses core utility nodes from newer releases",
38
+ "knobs": {
39
+ "megapixels": {"node": "115", "input": "megapixels"},
40
+ "width_direct": {"node": "140:131", "input": "width", "replace_link": true},
41
+ "height_direct": {"node": "140:131", "input": "height", "replace_link": true},
42
+ "duration_s": {"node": "140:133", "input": "value"},
43
+ "steps": {"node": "140:137", "input": "value"},
44
+ "seed": {"node": "140:129", "input": "noise_seed"}
45
+ }
46
+ }
47
+ },
48
+ "weights": {
49
+ "minimax_h3_fl2va_pruned_int8_convrot.safetensors": {
50
+ "repo": "Comfy-Org/MiniMax-H3",
51
+ "path": "diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors",
52
+ "revision": "a98869194787969724c7425d95d0ed73ce9202af",
53
+ "folder": "diffusion_models", "dest_basename": "diffusion_models",
54
+ "size": 20970379616,
55
+ "sha256": "e889202c41dafb67b10d67b97f0d8541508036a6090af23425a5c2615d03c47a",
56
+ "quantization": "int8_convrot",
57
+ "source": "recipe step 2 (byte count matches the recipe)"
58
+ },
59
+ "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors": {
60
+ "repo": "Comfy-Org/MiniMax-H3",
61
+ "path": "text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
62
+ "revision": "a98869194787969724c7425d95d0ed73ce9202af",
63
+ "folder": "text_encoders",
64
+ "size": 15687142551,
65
+ "sha256": "35a88d51044231fe332301d7a62aa81e3f2cba62febeb446e2c1e3e0ef76f2c6",
66
+ "quantization": "nvfp4_awq",
67
+ "source": "recipe step 2 (byte count matches the recipe)"
68
+ },
69
+ "minimax_h3_video_vae_fp16.safetensors": {
70
+ "repo": "Comfy-Org/MiniMax-H3",
71
+ "path": "vae/minimax_h3_video_vae_fp16.safetensors",
72
+ "revision": "a98869194787969724c7425d95d0ed73ce9202af",
73
+ "folder": "vae",
74
+ "size": 5207808496,
75
+ "sha256": "7c1f131492e7eddacaac9069a61b81bdd39de5cc96561e677c5eab1cdce5e522",
76
+ "quantization": "fp16",
77
+ "source": "recipe step 2 (byte count matches the recipe)"
78
+ },
79
+ "minimax_h3_audio_vae_fp32.safetensors": {
80
+ "repo": "Comfy-Org/MiniMax-H3",
81
+ "path": "vae/minimax_h3_audio_vae_fp32.safetensors",
82
+ "revision": "a98869194787969724c7425d95d0ed73ce9202af",
83
+ "folder": "vae",
84
+ "size": 605254808,
85
+ "sha256": "8e505d95dd1561d47abd43d4238fd40d9bb1ae9e147ed0a4cba778d76ae4db48",
86
+ "quantization": "fp32",
87
+ "source": "recipe step 2 (byte count matches the recipe)"
88
+ }
89
+ },
90
+ "defaults": {"timeout_s": 3600, "set": {"duration_s": 5.0, "steps": 20}},
91
+ "runs": [
92
+ {"run": 1, "key": "r01_864x480_124f_template_default", "workflow": "t2v",
93
+ "set": {"megapixels": 0.4, "seed": 3001},
94
+ "expect": {"width": 864, "height": 480, "frames": 124},
95
+ "why": "the recipe's default: template unchanged (ResolutionSelector 16:9 @ 0.4 MP, multiple 32 -> 864x480; 5 s -> 124 frames; 20 steps; turbo off)"},
96
+ {"run": 2, "key": "r02_736x416_124f_smaller", "workflow": "t2v",
97
+ "set": {"megapixels": 0.3, "seed": 3002},
98
+ "expect": {"width": 736, "height": 416, "frames": 124}, "timeout_s": 2700,
99
+ "why": "one smaller: the next ResolutionSelector step down (0.3 MP)"},
100
+ {"run": 3, "key": "r03_960x544_124f_practical_limit", "workflow": "t2v",
101
+ "set": {"megapixels": 0.5, "seed": 3003},
102
+ "expect": {"width": 960, "height": 544, "frames": 124}, "timeout_s": 4500,
103
+ "why": "one larger: 0.5 MP -> 960x544, the published run's 'realistic practical upper limit' on this card"},
104
+ {"run": 4, "key": "r04_1344x768_124f_claimed_ceiling", "workflow": "t2v",
105
+ "set": {"width_direct": 1344, "height_direct": 768, "seed": 3004},
106
+ "expect": {"width": 1344, "height": 768, "frames": 124}, "timeout_s": 9000,
107
+ "why": "the largest the recipe claims for 16 GB ('a realistic ceiling ... 1344x768 at 124 frames', also MAX_PIXELS). Done the way the recipe describes: the template node's own 1344x768 applies once the ResolutionSelector link is cut."},
108
+ {"run": 5, "key": "r05_864x480_124f_repeat", "workflow": "t2v",
109
+ "set": {"megapixels": 0.4, "seed": 3005},
110
+ "expect": {"width": 864, "height": 480, "frames": 124},
111
+ "why": "repeat of run 1 with a different seed, last in the session: run-to-run spread and drift"}
112
+ ]
113
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/qwen-image-2-1_rtx-5060-ti.json ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "qwen-image-2-1",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "image",
6
+ "runtime": "comfyui",
7
+ "task": "t2i",
8
+ "recipe": {
9
+ "slug": null,
10
+ "url": null,
11
+ "read_from": "No published recipe yet (2026-09-21, the day after release). The claims below are the round brief's DECISIONS in .claude/skills/recipe-research/state/model-qwen-image-2-1.md — derived from file sizes, ComfyUI source and community reports — and this session tests them BEFORE the rtx-5060-ti page is cut, not after.",
12
+ "claims": [
13
+ "The official ComfyUI template 'Qwen Image 2.1: Text to Image' (int8_convrot DiT 7,256,783,064 B + int8_convrot Qwen3-VL-8B encoder 9,350,798,360 B + bf16 VAE 675,509,688 B; 25 steps, cfg 1, euler, simple) produces a 1024x1024 image on a 16 GB RTX 5060 Ti on ComfyUI >= v0.37.0.",
14
+ "The DiT and the int8 encoder together (6,920.6 + 8,917.6 MiB of weights — the '6920MB / 8916MB Staged' lines in issue #16437 are these file sizes, not peaks) exceed a 16 GiB card, so they are not both fully resident; at v0.37.0 ComfyUI's dynamic-VRAM loader is the default on NVIDIA and pages weights on demand rather than unloading one whole model for another. The sampling-stage peak at 1024x1024 is expected well inside 16 GB.",
15
+ "Native 2K (2048x2048 and 2752x1536) works on the same files; the margin at 2K is unknown (no consumer-card 2K peak has been published).",
16
+ "The w4a8 encoder (6,312,105,364 B) lets encoder and DiT co-reside on 16 GB, removing the per-prompt reload; the bf16 DiT (14,230,280,616 B) fits resident at 1024x1024 with the int8 encoder evicted, and is the quality reference against int8."
17
+ ]
18
+ },
19
+ "gaps": [
20
+ "No recipe exists yet, so there is no speed claim to test; the only named-GPU speed figures are a 4090 (~5 s per 1 MP, HN comment 49776977), a 5080 edit (PR #16429) and a 5090 (PR #16430). Runs record wall_s; nothing here is a comparison.",
21
+ "The template's ResolutionSelector drives EmptyLatentImage; runs 1 and 8 keep it untouched (1 MP -> 1024x1024). Every other size is set directly on EmptyLatentImage (width_direct/height_direct replace the link), so the requested pixels are exact.",
22
+ "The template ships a 1.9 kB example prompt; it is left as-is in every run so that run 1 is byte-identical to 'load the template and queue'. Prompt length moves encoder time, not the sampling peak.",
23
+ "Runs 5-7 use two sibling workflows built from the same template with one loader widget changed (w4a8 encoder; bf16 DiT) — see workflows/build.qwen-image-2-1.json. They are the brief's alternatives, not template defaults; the swapped files are Comfy-Org's own (same repo, same revision). If only the three template files are downloaded, runs 5-7 are BLOCKED and the rest still run.",
24
+ "The 'Qwen Image 2.1: Image Edit' template is NOT measured tonight: the converter refuses its ImageCompare display node ('IMAGECOMPARE widget ... does not port') and its LoadImage nodes need the template's input PNGs in ComfyUI/input/. If the owner wants edit numbers: File > Export (API) of that template from the UI, save it beside this config, and a config is written from it the next day.",
25
+ "ComfyUI on this PC must already be at v0.37.0 or newer (git checkout of the tag, or the v0.37.0 Windows portable published 2026-09-21T07:35Z; a Desktop build carrying it was unverified that day) before check runs: the nodes TextEncodeQwenImage21 and SaveImageAdvanced do not exist below it. Updating ComfyUI is the owner's action, done before the harness starts, never by the harness."
26
+ ],
27
+ "workflows": {
28
+ "t2i": {
29
+ "api_file": "workflows/qwen-image-2-1_t2i_int8-template.api.json",
30
+ "output_node": "461",
31
+ "quantization": "int8_convrot",
32
+ "requires_nodes": ["TextEncodeQwenImage21", "ResolutionSelector", "SaveImageAdvanced", "UNETLoader", "CLIPLoader", "VAELoader", "EmptyLatentImage", "KSampler", "VAEDecode"],
33
+ "requires_note": "ComfyUI core >= v0.37.0 (PR #16400 'feat: Qwen-image 2.1 support', merged 2026-09-19; tag v0.37.0 dated 2026-09-20T15:27Z). PRs #16429 (KV-cache placement) and #16430 (block compile) landed after the tag and only affect edit / heavy-offload runs.",
34
+ "knobs": {
35
+ "megapixels": {"node": "13", "input": "megapixels"},
36
+ "aspect_ratio": {"node": "13", "input": "aspect_ratio"},
37
+ "width_direct": {"node": "459:456", "input": "width", "replace_link": true},
38
+ "height_direct": {"node": "459:456", "input": "height", "replace_link": true},
39
+ "steps": {"node": "459:458", "input": "steps"},
40
+ "seed": {"node": "459:458", "input": "seed"},
41
+ "prompt": {"node": "459:452", "input": "prompt"}
42
+ }
43
+ },
44
+ "t2i_w4a8_encoder": {
45
+ "api_file": "workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json",
46
+ "output_node": "461",
47
+ "quantization": "int8_convrot (DiT) + w4a8 (encoder)",
48
+ "requires_nodes": ["TextEncodeQwenImage21", "ResolutionSelector", "SaveImageAdvanced", "UNETLoader", "CLIPLoader", "VAELoader", "EmptyLatentImage", "KSampler", "VAEDecode"],
49
+ "requires_note": "same as t2i; the CLIPLoader names qwen3vl_8b_w4a8.safetensors",
50
+ "knobs": {
51
+ "megapixels": {"node": "13", "input": "megapixels"},
52
+ "aspect_ratio": {"node": "13", "input": "aspect_ratio"},
53
+ "width_direct": {"node": "459:456", "input": "width", "replace_link": true},
54
+ "height_direct": {"node": "459:456", "input": "height", "replace_link": true},
55
+ "steps": {"node": "459:458", "input": "steps"},
56
+ "seed": {"node": "459:458", "input": "seed"},
57
+ "prompt": {"node": "459:452", "input": "prompt"}
58
+ }
59
+ },
60
+ "t2i_bf16_dit": {
61
+ "api_file": "workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json",
62
+ "output_node": "461",
63
+ "quantization": "bf16 (DiT) + int8_convrot (encoder)",
64
+ "requires_nodes": ["TextEncodeQwenImage21", "ResolutionSelector", "SaveImageAdvanced", "UNETLoader", "CLIPLoader", "VAELoader", "EmptyLatentImage", "KSampler", "VAEDecode"],
65
+ "requires_note": "same as t2i; the UNETLoader names qwen_image_2.1_bf16.safetensors",
66
+ "knobs": {
67
+ "megapixels": {"node": "13", "input": "megapixels"},
68
+ "aspect_ratio": {"node": "13", "input": "aspect_ratio"},
69
+ "width_direct": {"node": "459:456", "input": "width", "replace_link": true},
70
+ "height_direct": {"node": "459:456", "input": "height", "replace_link": true},
71
+ "steps": {"node": "459:458", "input": "steps"},
72
+ "seed": {"node": "459:458", "input": "seed"},
73
+ "prompt": {"node": "459:452", "input": "prompt"}
74
+ }
75
+ }
76
+ },
77
+ "weights": {
78
+ "qwen_image_2.1_int8_convrot.safetensors": {
79
+ "repo": "Comfy-Org/Qwen-Image-2.1",
80
+ "path": "diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
81
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
82
+ "folder": "diffusion_models",
83
+ "size": 7256783064,
84
+ "sha256": "cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d",
85
+ "quantization": "int8_convrot (ComfyUI comfy_quant int8_tensorwise + convrot)",
86
+ "source": "the template's UNETLoader default; Comfy-Org repack README lists it under models/diffusion_models/"
87
+ },
88
+ "qwen3vl_8b_int8_convrot.safetensors": {
89
+ "repo": "Comfy-Org/Qwen-Image-2.1",
90
+ "path": "text_encoders/qwen3vl_8b_int8_convrot.safetensors",
91
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
92
+ "folder": "text_encoders",
93
+ "size": 9350798360,
94
+ "sha256": "8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f",
95
+ "quantization": "int8_convrot",
96
+ "source": "the template's CLIPLoader default since workflow_templates #1277 (2026-09-20); byte-identical (same LFS sha256) to the file of the same name in Comfy-Org/Qwen3-VL"
97
+ },
98
+ "qwen_image_2.1_vae_bf16.safetensors": {
99
+ "repo": "Comfy-Org/Qwen-Image-2.1",
100
+ "path": "vae/qwen_image_2.1_vae_bf16.safetensors",
101
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
102
+ "folder": "vae",
103
+ "size": 675509688,
104
+ "sha256": "bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9",
105
+ "quantization": "bf16 (VAE; 64-channel RGBA, 16x spatial)",
106
+ "source": "the template's VAELoader default"
107
+ },
108
+ "qwen3vl_8b_w4a8.safetensors": {
109
+ "repo": "Comfy-Org/Qwen-Image-2.1",
110
+ "path": "text_encoders/qwen3vl_8b_w4a8.safetensors",
111
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
112
+ "folder": "text_encoders",
113
+ "size": 6312105364,
114
+ "sha256": "7754425e55e7bea2bfde4dde59a4cc236cb44e5ee9c215ea66ef8d47012824eb",
115
+ "quantization": "w4a8",
116
+ "source": "the brief's co-residence alternative (run 5); uploaded by Kijai 2026-09-20T07:54Z"
117
+ },
118
+ "qwen_image_2.1_bf16.safetensors": {
119
+ "repo": "Comfy-Org/Qwen-Image-2.1",
120
+ "path": "diffusion_models/qwen_image_2.1_bf16.safetensors",
121
+ "revision": "ace0edeb3791a594ddfa36ed5f41a178a394e921",
122
+ "folder": "diffusion_models",
123
+ "size": 14230280616,
124
+ "sha256": "89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc",
125
+ "quantization": "bf16",
126
+ "source": "the brief's quality reference (runs 6-7); the docs page lists it as the 'needs more memory' alternative to int8"
127
+ }
128
+ },
129
+ "defaults": {
130
+ "timeout_s": 1200,
131
+ "set": {"steps": 25}
132
+ },
133
+ "runs": [
134
+ {"run": 1, "key": "r01_1024x1024_25step_template_default", "workflow": "t2i",
135
+ "set": {"megapixels": 1, "seed": 4001},
136
+ "expect": {"width": 1024, "height": 1024},
137
+ "why": "the template exactly as shipped: int8 DiT + int8 encoder, ResolutionSelector 1:1 @ 1 MP (1024x1024), 25 steps, cfg 1, euler/simple — claim 1"},
138
+ {"run": 2, "key": "r02_2048x2048_25step_native_2k", "workflow": "t2i",
139
+ "set": {"width_direct": 2048, "height_direct": 2048, "seed": 4002},
140
+ "expect": {"width": 2048, "height": 2048},
141
+ "why": "native 2K, the model card's headline size; 4x the tokens of run 1 — claim 3 (an OOM or a spill here is a result)"},
142
+ {"run": 3, "key": "r03_1024x1024_40step_vendor_steps", "workflow": "t2i",
143
+ "set": {"width_direct": 1024, "height_direct": 1024, "steps": 40, "seed": 4003},
144
+ "expect": {"width": 1024, "height": 1024},
145
+ "why": "the vendor's diffusers default of 40 steps against the template's 25: same memory, 1.6x the sampling time"},
146
+ {"run": 4, "key": "r04_2752x1536_2k_16x9", "workflow": "t2i",
147
+ "set": {"width_direct": 2752, "height_direct": 1536, "seed": 4004},
148
+ "expect": {"width": 2752, "height": 1536},
149
+ "why": "the widest of the card's seven official 2K ratios (16:9); 4.23 MP, slightly more than 2048x2048 — claim 3"},
150
+ {"run": 5, "key": "r05_1024x1024_w4a8_encoder", "workflow": "t2i_w4a8_encoder",
151
+ "set": {"width_direct": 1024, "height_direct": 1024, "seed": 4001},
152
+ "expect": {"width": 1024, "height": 1024},
153
+ "why": "same seed and size as run 1 with the 5.88 GiB w4a8 encoder: does the encoder stay resident beside the DiT (claim 4), and what does the output look like against run 1"},
154
+ {"run": 6, "key": "r06_1024x1024_bf16_dit", "workflow": "t2i_bf16_dit",
155
+ "set": {"width_direct": 1024, "height_direct": 1024, "seed": 4001},
156
+ "expect": {"width": 1024, "height": 1024},
157
+ "why": "same seed and size as run 1 with the 13.25 GiB bf16 DiT: fit at 1024x1024 with the int8 encoder evicted (claim 4), and the quality reference for int8"},
158
+ {"run": 7, "key": "r07_2048x2048_bf16_dit", "workflow": "t2i_bf16_dit", "timeout_s": 2400,
159
+ "set": {"width_direct": 2048, "height_direct": 2048, "seed": 4002},
160
+ "expect": {"width": 2048, "height": 2048},
161
+ "why": "bf16 DiT at 2K on 16 GB: the brief expects a spill into host RAM or an OOM; either is the answer to 'can a 16 GB card run bf16 at native 2K'"},
162
+ {"run": 8, "key": "r08_1024x1024_25step_repeat", "workflow": "t2i",
163
+ "set": {"megapixels": 1, "seed": 4008},
164
+ "expect": {"width": 1024, "height": 1024},
165
+ "why": "repeat of run 1 with a different seed: run-to-run spread of wall_s and peak"}
166
+ ]
167
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/qwen3-8-27b_rtx-5060-ti.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "qwen3-8-27b",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "multimodal",
6
+ "runtime": "llama.cpp",
7
+ "task": "llm",
8
+ "recipe": {
9
+ "slug": "qwen3-8-27b-on-rtx-5060-ti-a-vision-capable-27b-in-16-gb-on-a-128-bit-bus",
10
+ "url": "https://smeltcore.com/recipes/qwen3-8-27b-on-rtx-5060-ti-a-vision-capable-27b-in-16-gb-on-a-128-bit-bus/",
11
+ "read_from": "https://api.smeltcore.com/api/v1/recipes/qwen3-8-27b-on-rtx-5060-ti-a-vision-capable-27b-in-16-gb-on-a-128-bit-bus (content_raw), 2026-09-11",
12
+ "claims": [
13
+ "UD-Q3_K_XL + mmproj-F16 + 32768 context + q8_0 K/V + --parallel 1 fits a 16 GB card: derived working set 14.590 GiB, 1.410 GiB headroom (derived, not measured).",
14
+ "Decode ceiling by arithmetic: ~33 tok/s with an empty context, ~30 tok/s with a full 32K window ('expect to land materially under both').",
15
+ "Text-only (--no-mmproj) with --ctx-size 65536 is offered as the way to get context back.",
16
+ "OOM ladder step 1: --ctx-size 16384."
17
+ ]
18
+ },
19
+ "gaps": [
20
+ "llama-bench cannot load a vision projector, so bench runs are text-only. The recipe's headline configuration (projector + 32K) is measured by run 5, a llama-server probe with the recipe's exact flags and one synthetic 1024x1024 image.",
21
+ "The recipe budgets Qwen3.8-27B-UD-Q3_K_XL.gguf at 13,441,059,904 bytes (sha256 00cf92e6...). unsloth replaced that file on 2026-08-19, three days after the recipe was published; the repo now serves 13,146,393,504 bytes (sha256 8c2a45ff...). Runs 1-5 measure the file a reader gets today. Run 6 (disabled by default, +13.4 GB) measures the file the recipe budgeted, pinned by revision.",
22
+ "The recipe names no prompt length or generation length for its speed expectations; 512 prompt / 128 generated tokens are ours (llama-bench's defaults).",
23
+ "The recipe's server listens on port 8080; the probe uses 8089 to avoid colliding with anything already on 8080 (a port changes nothing measured).",
24
+ "The '65536 text-only' offer buys 32,768 more tokens of KV (1.063 GiB) while dropping a 0.864 GiB projector, and the recipe's own sentence says dropping the projector buys 'about 26,600 more tokens'. Run 4 measures whether 65536 actually fits."
25
+ ],
26
+ "weights": {
27
+ "main": {
28
+ "filename": "Qwen3.8-27B-UD-Q3_K_XL.gguf",
29
+ "repo": "unsloth/Qwen3.8-27B-GGUF", "path": "Qwen3.8-27B-UD-Q3_K_XL.gguf",
30
+ "revision": "4ca720788d1e01f1bff70c033e0d0028fd02e502",
31
+ "size": 13146393504,
32
+ "sha256": "8c2a45ff85e7674ca185ec8eb6cdeab0e617ed9d8018caed0b64380eb2a67a5e",
33
+ "quantization": "UD-Q3_K_XL",
34
+ "source": "recipe step 2 (hf download unsloth/Qwen3.8-27B-GGUF Qwen3.8-27B-UD-Q3_K_XL.gguf), pinned to the revision current on 2026-09-11"
35
+ },
36
+ "mmproj": {
37
+ "filename": "mmproj-F16.gguf",
38
+ "repo": "unsloth/Qwen3.8-27B-GGUF", "path": "mmproj-F16.gguf",
39
+ "revision": "4ca720788d1e01f1bff70c033e0d0028fd02e502",
40
+ "size": 927607488,
41
+ "sha256": "cbb841a9ee0636b2ec172f5bb8df2ea8dfeb01e90fe7c6126581d662a0b4e43e",
42
+ "quantization": "F16",
43
+ "source": "recipe step 2 (byte count matches the recipe)"
44
+ },
45
+ "main_recipe_rev": {
46
+ "filename": "Qwen3.8-27B-UD-Q3_K_XL.rev430473d9.gguf",
47
+ "repo": "unsloth/Qwen3.8-27B-GGUF", "path": "Qwen3.8-27B-UD-Q3_K_XL.gguf",
48
+ "revision": "430473d9d0e975450ce1f445642b6527cb4faea1",
49
+ "size": 13441059904,
50
+ "sha256": "00cf92e666c6af6566996c38c89a44ccdb6449ea25ef0f112a452c853b2a71e2",
51
+ "quantization": "UD-Q3_K_XL",
52
+ "source": "the file the recipe budgeted (present from 2026-08-14 until 2026-08-19 13:15 UTC); saved under a distinct local name"
53
+ }
54
+ },
55
+ "runs": [
56
+ {"run": 1, "key": "r01_bench_ctx32768_q8kv", "mode": "bench", "model": "main",
57
+ "ctx": 32768, "n_prompt": 512, "n_gen": 128,
58
+ "bench_args": ["-ngl", "99", "-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0", "-b", "2048", "-ub", "512", "-r", "3"],
59
+ "timeout_s": 3600,
60
+ "why": "the recipe's default context and cache settings (32768 cells, q8_0 K/V, flash-attn on, b2048/ub512, all layers on GPU), text-only; tg at depth 32256 tests the '~30 tok/s full-window' ceiling"},
61
+ {"run": 2, "key": "r02_bench_ctx512_empty", "mode": "bench", "model": "main",
62
+ "ctx": 512, "n_prompt": 512, "n_gen": 128,
63
+ "bench_args": ["-ngl", "99", "-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0", "-b", "2048", "-ub", "512", "-r", "3"],
64
+ "timeout_s": 1800,
65
+ "why": "one smaller: empty context; tests the '~33 tok/s empty-context' ceiling"},
66
+ {"run": 3, "key": "r03_bench_ctx16384", "mode": "bench", "model": "main",
67
+ "ctx": 16384, "n_prompt": 512, "n_gen": 128,
68
+ "bench_args": ["-ngl", "99", "-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0", "-b", "2048", "-ub", "512", "-r", "3"],
69
+ "timeout_s": 3600,
70
+ "why": "the recipe's OOM-ladder step 1 (--ctx-size 16384)"},
71
+ {"run": 4, "key": "r04_bench_ctx65536_textonly", "mode": "bench", "model": "main",
72
+ "ctx": 65536, "n_prompt": 512, "n_gen": 128,
73
+ "bench_args": ["-ngl", "99", "-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0", "-b", "2048", "-ub", "512", "-r", "3"],
74
+ "timeout_s": 5400,
75
+ "why": "the largest configuration the recipe offers for this card: text-only at 65536 context with q8_0 K/V"},
76
+ {"run": 5, "key": "r05_server_vision_ctx32768", "mode": "server", "model": "main", "mmproj": "mmproj",
77
+ "ctx": 32768, "port": 8089, "startup_timeout_s": 900, "timeout_s": 1800,
78
+ "server_args": ["--alias", "qwen3.8-27b", "--n-gpu-layers", "99", "--ctx-size", "32768", "--parallel", "1",
79
+ "--cache-type-k", "q8_0", "--cache-type-v", "q8_0", "--flash-attn", "on",
80
+ "--batch-size", "2048", "--ubatch-size", "512", "--image-min-tokens", "1024", "--jinja",
81
+ "--no-reasoning-preserve", "--chat-template-kwargs", "{\"reasoning_effort\":\"medium\"}",
82
+ "--temp", "1.0", "--top-p", "0.95", "--top-k", "20", "--min-p", "0.0",
83
+ "--presence-penalty", "0.0", "--repeat-penalty", "1.0"],
84
+ "request": {"prompt": "Describe this image in one sentence.", "max_tokens": 512, "seed": 1234,
85
+ "temperature": 1.0, "top_p": 0.95, "top_k": 20, "min_p": 0.0, "image_size": [1024, 1024]},
86
+ "why": "the recipe's headline claim, its exact llama-server command: vision projector + 32768 context + q8_0 K/V in 16 GB, exercised with one image request"},
87
+ {"run": 6, "key": "r06_bench_ctx32768_recipe_revision", "mode": "bench", "model": "main_recipe_rev",
88
+ "ctx": 32768, "n_prompt": 512, "n_gen": 128, "enabled": false,
89
+ "bench_args": ["-ngl", "99", "-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0", "-b", "2048", "-ub", "512", "-r", "3"],
90
+ "timeout_s": 3600,
91
+ "why": "run 1 on the exact file the recipe budgeted (replaced upstream 2026-08-19). Disabled by default: another 13.4 GB download. Enable only if the owner asks."}
92
+ ]
93
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/configs/wan-2-2_rtx-5060-ti.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_schema": 1,
3
+ "model_slug": "wan-2-2",
4
+ "gpu_slug": "rtx-5060-ti",
5
+ "vertical": "video",
6
+ "runtime": "comfyui",
7
+ "task": "t2v",
8
+ "recipe": {
9
+ "slug": "wan-2-2-ti2v-5b-on-rtx-5060-ti-720p-text-image-to-video-in-comfyui",
10
+ "url": "https://smeltcore.com/recipes/wan-2-2-ti2v-5b-on-rtx-5060-ti-720p-text-image-to-video-in-comfyui/",
11
+ "read_from": "https://api.smeltcore.com/api/v1/recipes/wan-2-2-ti2v-5b-on-rtx-5060-ti-720p-text-image-to-video-in-comfyui (content_raw), 2026-09-11",
12
+ "claims": [
13
+ "The official ComfyUI template (FP16 safetensors, native offloading) produces 720p output, 1280x704 at 24 fps for 5 seconds, on a 16GB 5060 Ti with comfortable headroom.",
14
+ "The QuantStack Q8_0 GGUF via Unet Loader (GGUF) lowers peak VRAM 'significantly'.",
15
+ "~7 minutes for a 1024x574 5-second clip with Q8 GGUF + Sage Attention 2.2 (a community report the recipe cites)."
16
+ ]
17
+ },
18
+ "gaps": [
19
+ "The recipe names the three FP16 files and points at the ComfyUI docs, not at a repository. The repositories and paths below are the ones the official template itself embeds (properties.models url on each loader node).",
20
+ "Sage Attention is a ComfyUI launch flag (--use-sage-attention), not a workflow change; the harness cannot set it. Rows record ComfyUI's argv, so a run without it says so. The ~7 min claim is only comparable when argv shows sage.",
21
+ "The recipe's '1024x574' is not a size this node can produce (Wan22ImageToVideoLatent steps width/height by 32); run 4 uses 1024x576.",
22
+ "The recipe's storage line ('~13GB' for FP16 weights + VAE + text encoder) disagrees with the bytes: 9,999,658,848 + 1,409,400,960 + 6,735,906,897 = 18.1 GB."
23
+ ],
24
+ "workflows": {
25
+ "fp16": {
26
+ "api_file": "workflows/wan-2-2_ti2v-5b_fp16.api.json",
27
+ "output_node": "58",
28
+ "quantization": "fp16",
29
+ "knobs": {
30
+ "width": {"node": "55", "input": "width"},
31
+ "height": {"node": "55", "input": "height"},
32
+ "frames": {"node": "55", "input": "length"},
33
+ "steps": {"node": "3", "input": "steps"},
34
+ "seed": {"node": "3", "input": "seed"}
35
+ }
36
+ },
37
+ "q8gguf": {
38
+ "api_file": "workflows/wan-2-2_ti2v-5b_q8-gguf.api.json",
39
+ "output_node": "58",
40
+ "quantization": "Q8_0",
41
+ "requires_nodes": ["UnetLoaderGGUF"],
42
+ "requires_note": "city96/ComfyUI-GGUF custom node, as the recipe's step 3 installs it",
43
+ "knobs": {
44
+ "width": {"node": "55", "input": "width"},
45
+ "height": {"node": "55", "input": "height"},
46
+ "frames": {"node": "55", "input": "length"},
47
+ "steps": {"node": "3", "input": "steps"},
48
+ "seed": {"node": "3", "input": "seed"}
49
+ }
50
+ }
51
+ },
52
+ "weights": {
53
+ "wan2.2_ti2v_5B_fp16.safetensors": {
54
+ "repo": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
55
+ "path": "split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
56
+ "revision": "c4f60d30c55a624e35427060fdd217579a6c1d77",
57
+ "folder": "diffusion_models", "dest_basename": "diffusion_models",
58
+ "size": 9999658848,
59
+ "sha256": "456f901338bd9eadbded3828b819109a9b68e8a525ca5cf8d0049a69fcfeca1e",
60
+ "quantization": "fp16",
61
+ "source": "official template properties.models url; recipe names the filename"
62
+ },
63
+ "umt5_xxl_fp8_e4m3fn_scaled.safetensors": {
64
+ "repo": "Comfy-Org/Wan_2.1_ComfyUI_repackaged",
65
+ "path": "split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
66
+ "revision": "617a7633e636506f850e043bc4605f290a466a8e",
67
+ "folder": "text_encoders",
68
+ "size": 6735906897,
69
+ "sha256": "c3355d30191f1f066b26d93fba017ae9809dce6c627dda5f6a66eaa651204f68",
70
+ "quantization": "fp8_e4m3fn_scaled",
71
+ "source": "official template properties.models url; recipe names the filename"
72
+ },
73
+ "wan2.2_vae.safetensors": {
74
+ "repo": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
75
+ "path": "split_files/vae/wan2.2_vae.safetensors",
76
+ "revision": "c4f60d30c55a624e35427060fdd217579a6c1d77",
77
+ "folder": "vae",
78
+ "size": 1409400960,
79
+ "sha256": "e40321bd36b9709991dae2530eb4ac303dd168276980d3e9bc4b6e2b75fed156",
80
+ "quantization": "unstated (VAE)",
81
+ "source": "official template properties.models url; recipe names the filename"
82
+ },
83
+ "Wan2.2-TI2V-5B-Q8_0.gguf": {
84
+ "repo": "QuantStack/Wan2.2-TI2V-5B-GGUF",
85
+ "path": "Wan2.2-TI2V-5B-Q8_0.gguf",
86
+ "revision": "57437632ddd08bdcbd1508c866aa22e126ed51d2",
87
+ "folder": "diffusion_models", "dest_basename": "unet",
88
+ "size": 5400179040,
89
+ "sha256": "57bece983817ab2f957546683bb670f13be7d99022d45674840cd999a050ea8f",
90
+ "quantization": "Q8_0",
91
+ "source": "recipe step 3: huggingface-cli download QuantStack/Wan2.2-TI2V-5B-GGUF Wan2.2-TI2V-5B-Q8_0.gguf --local-dir ./ComfyUI/models/unet"
92
+ }
93
+ },
94
+ "defaults": {"timeout_s": 5400},
95
+ "runs": [
96
+ {"run": 1, "key": "r01_fp16_1280x704_121f_default", "workflow": "fp16",
97
+ "set": {"width": 1280, "height": 704, "frames": 121, "steps": 20, "seed": 1001},
98
+ "expect": {"width": 1280, "height": 704, "frames": 121},
99
+ "why": "the recipe's default: official template unchanged (720p, 121 frames = 5 s at 24 fps, 20 steps, uni_pc, cfg 5, shift 8); also the largest configuration the recipe claims fits (720p 5 s with 'comfortable headroom')"},
100
+ {"run": 2, "key": "r02_fp16_1024x576_121f_smaller", "workflow": "fp16",
101
+ "set": {"width": 1024, "height": 576, "frames": 121, "steps": 20, "seed": 1002},
102
+ "expect": {"width": 1024, "height": 576, "frames": 121}, "timeout_s": 4500,
103
+ "why": "one smaller: the canvas of the recipe's speed line, on the FP16 path"},
104
+ {"run": 3, "key": "r03_fp16_1280x704_145f_larger", "workflow": "fp16",
105
+ "set": {"width": 1280, "height": 704, "frames": 145, "steps": 20, "seed": 1003},
106
+ "expect": {"width": 1280, "height": 704, "frames": 145}, "timeout_s": 6300,
107
+ "why": "one larger: 6 s instead of the 5 s the recipe claims, same canvas - where 'comfortable headroom' is tested"},
108
+ {"run": 4, "key": "r04_q8_1024x576_121f_speed_claim", "workflow": "q8gguf",
109
+ "set": {"width": 1024, "height": 576, "frames": 121, "steps": 20, "seed": 1004},
110
+ "expect": {"width": 1024, "height": 576, "frames": 121}, "timeout_s": 4500,
111
+ "why": "the recipe's speed claim configuration: Q8_0 GGUF, ~1024x574, 5 s (comparable to '~7 min' only if argv shows sage attention)"},
112
+ {"run": 5, "key": "r05_q8_1280x704_121f", "workflow": "q8gguf",
113
+ "set": {"width": 1280, "height": 704, "frames": 121, "steps": 20, "seed": 1005},
114
+ "expect": {"width": 1280, "height": 704, "frames": 121},
115
+ "why": "the recipe's claim that Q8 lowers peak VRAM 'significantly', paired against run 1"},
116
+ {"run": 6, "key": "r06_fp16_1280x704_121f_repeat", "workflow": "fp16",
117
+ "set": {"width": 1280, "height": 704, "frames": 121, "steps": 20, "seed": 1006},
118
+ "expect": {"width": 1280, "height": 704, "frames": 121},
119
+ "why": "repeat of run 1 with a different seed, last in the session: run-to-run spread and drift"}
120
+ ]
121
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/llama_measure.py ADDED
@@ -0,0 +1,807 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """llama.cpp measurement adapter (schema v1). Read README.md first.
3
+
4
+ python llama_measure.py check --config configs/qwen3-8-27b_rtx-5060-ti.json
5
+ python llama_measure.py download --config configs/qwen3-8-27b_rtx-5060-ti.json [--execute]
6
+ python llama_measure.py run --config configs/qwen3-8-27b_rtx-5060-ti.json --display-attached yes
7
+
8
+ Two run modes:
9
+ bench one llama-bench process per run (so every run is cold), `-o json`. llama-bench
10
+ sizes the context as n_prompt + n_gen + n_depth (llama-bench.cpp to_llama_cparams),
11
+ so a run asking for context C uses -d C-n_prompt: the prompt test then allocates
12
+ exactly C cells. llama-bench cannot load a vision projector.
13
+ server one llama-server process with the recipe's exact flags (including --mmproj),
14
+ one image+text request, the server's own `timings`, then shutdown. This is the only
15
+ way to measure the recipe's headline claim (projector + 32K context in 16 GB).
16
+
17
+ The same nvidia-smi sampler as the ComfyUI harness; the peak window is the process's
18
+ whole life (load + work). llama-bench does the real work; this file only launches it,
19
+ reads what it prints and writes rows. It never builds or installs llama.cpp.
20
+ """
21
+ from __future__ import annotations
22
+
23
+ import argparse
24
+ import base64
25
+ import functools
26
+ import json
27
+ import os
28
+ import re
29
+ import shutil
30
+ import signal
31
+ import struct
32
+ import subprocess
33
+ import sys
34
+ import time
35
+ import urllib.error
36
+ import urllib.request
37
+ import zlib
38
+ from typing import Optional
39
+
40
+ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
41
+
42
+ from mharness import HARNESS_VERSION # noqa: E402
43
+ from mharness.comfy_api import ComfyClient, ComfyError # noqa: E402
44
+ from mharness.platform_util import is_windows, os_description, total_ram_bytes # noqa: E402
45
+ from mharness.runner_common import (FAKE_NOTE, HARNESS_DIR, Instruments, check_gpu_identity, # noqa: E402
46
+ config_digest, environment_record, load_config, say, utf8_stdio, stamp_fake,
47
+ utc_stamp, window_notes)
48
+ from mharness.schema import SchemaError, check_csv_file, new_session_json, utc_iso # noqa: E402
49
+ from mharness.session import Session # noqa: E402
50
+ from mharness.weights import GIB, DownloadItem, WeightSpec, disk_check, execute_download, hf_paths_info # noqa: E402
51
+
52
+ OOM_PATTERNS = [r"out of memory", r"cudaMalloc failed", r"failed to allocate \S* ?buffer", r"unable to allocate",
53
+ r"CUBLAS_STATUS_ALLOC_FAILED", r"ErrorOutOfDeviceMemory", r"not enough memory"]
54
+ # The parsers' own messages, verbatim (tools/llama-bench/llama-bench.cpp:1075; common/arg.cpp:824, 870).
55
+ # Anchored at line start so CUDA's runtime string "CUDA error: invalid argument" never matches.
56
+ BAD_ARG_PATTERNS = [r"(?m)^error: invalid parameter for argument: ", r"(?m)^error: invalid argument: ",
57
+ r'(?m)^error while handling argument "']
58
+ LOAD_MARKERS = ("llama_model_load", "load_tensors", "llama_model_loader", "loading model", "llama_context")
59
+
60
+
61
+ # ------------------------------------------------------------------------------------------
62
+ def find_bin(name: str, bin_dir: Optional[str]) -> Optional[str]:
63
+ cands = []
64
+ exts = ("", ".exe", ".cmd", ".bat") if is_windows() else ("", ".exe")
65
+ if bin_dir:
66
+ cands += [os.path.join(bin_dir, name + e) for e in exts]
67
+ for n in (name + e for e in exts):
68
+ p = shutil.which(n)
69
+ if p:
70
+ cands.append(p)
71
+ return next((c for c in cands if os.path.isfile(c)), None)
72
+
73
+
74
+ def specs_from(cfg: dict) -> dict[str, WeightSpec]:
75
+ out = {}
76
+ for key, w in cfg["weights"].items():
77
+ out[key] = WeightSpec(filename=w["filename"], repo=w["repo"], path=w["path"], folder="llm",
78
+ revision=w.get("revision", "main"), size=w.get("size"), sha256=w.get("sha256"),
79
+ quantization=w.get("quantization"), source=w.get("source", ""))
80
+ return out
81
+
82
+
83
+ def models_dir(args) -> str:
84
+ return os.path.abspath(args.models_dir or os.path.join(os.path.dirname(HARNESS_DIR), "models"))
85
+
86
+
87
+ def run_needs(r: dict) -> list[str]:
88
+ return [k for k in (r.get("model"), r.get("mmproj")) if k]
89
+
90
+
91
+ def presence(cfg: dict, args) -> dict[str, dict]:
92
+ md = models_dir(args)
93
+ out = {}
94
+ for key, s in specs_from(cfg).items():
95
+ p = os.path.join(md, s.filename)
96
+ if not os.path.isfile(p):
97
+ out[key] = {"status": "missing", "path": p}
98
+ continue
99
+ size = os.path.getsize(p)
100
+ ok = s.size is None or size == s.size
101
+ out[key] = {"status": "present-verified" if ok else "present-size-mismatch", "path": p, "size": size,
102
+ "expected": s.size}
103
+ return out
104
+
105
+
106
+ def preflight(cfg: dict, args) -> tuple[list[str], dict[int, list[str]], dict]:
107
+ fatal: list[str] = []
108
+ blocked: dict[int, list[str]] = {}
109
+ info: dict = {"models_dir": models_dir(args)}
110
+ bench = find_bin("llama-bench", args.llama_bin_dir)
111
+ server = find_bin("llama-server", args.llama_bin_dir)
112
+ info["llama_bench"] = bench
113
+ info["llama_server"] = server
114
+ pres = presence(cfg, args)
115
+ info["weights"] = pres
116
+ for r in cfg["runs"]:
117
+ if not r.get("enabled", True) or (args.only and r["run"] not in args.only):
118
+ continue
119
+ need_bin = bench if r["mode"] == "bench" else server
120
+ if need_bin is None:
121
+ blocked.setdefault(r["run"], []).append(
122
+ f"{'llama-bench' if r['mode'] == 'bench' else 'llama-server'} not found (pass --llama-bin-dir). "
123
+ f"The harness does not build or install llama.cpp.")
124
+ for k in run_needs(r):
125
+ if k not in pres:
126
+ fatal.append(f"run {r['run']}: weight key {k!r} not in config weights")
127
+ elif pres[k]["status"] == "missing":
128
+ blocked.setdefault(r["run"], []).append(f"weight missing: {cfg['weights'][k]['filename']}")
129
+ elif pres[k]["status"] == "present-size-mismatch":
130
+ blocked.setdefault(r["run"], []).append(
131
+ f"{pres[k]['path']} is {pres[k]['size']} bytes, config expects {pres[k]['expected']}: "
132
+ f"not the pinned artifact")
133
+ return fatal, blocked, info
134
+
135
+
136
+ # ------------------------------------------------------------------------------------------
137
+ def synthetic_png(path: str, w: int = 1024, h: int = 1024) -> None:
138
+ """A deterministic test image (gradient + grid + a diagonal), no dependencies."""
139
+ rows = []
140
+ for y in range(h):
141
+ row = bytearray([0])
142
+ for x in range(w):
143
+ grid = 40 if (x // 64 + y // 64) % 2 else 0
144
+ diag = 255 if abs(x - y) < 6 else 0
145
+ row += bytes(((x * 255 // w + grid) % 256, (y * 255 // h) ^ diag, (128 + grid) % 256))
146
+ rows.append(bytes(row))
147
+ raw = zlib.compress(b"".join(rows), 6)
148
+
149
+ def chunk(t: bytes, d: bytes) -> bytes:
150
+ return struct.pack(">I", len(d)) + t + d + struct.pack(">I", zlib.crc32(t + d) & 0xFFFFFFFF)
151
+
152
+ with open(path, "wb") as f:
153
+ f.write(b"\x89PNG\r\n\x1a\n" + chunk(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 2, 0, 0, 0))
154
+ + chunk(b"IDAT", raw) + chunk(b"IEND", b""))
155
+
156
+
157
+ def read_log(path: str) -> str:
158
+ with open(path, encoding="utf-8", errors="replace") as f:
159
+ return f.read()
160
+
161
+
162
+ def classify_log(text: str, rc: Optional[int]) -> tuple[str, str]:
163
+ """oom if any allocation-failure pattern appears, else crash. Checked BEFORE bad_args."""
164
+ for pat in OOM_PATTERNS:
165
+ m = re.search(pat, text, re.IGNORECASE)
166
+ if m:
167
+ line = next((l for l in text.splitlines() if re.search(pat, l, re.IGNORECASE)), m.group(0))
168
+ return "oom", line.strip()[:220]
169
+ tail = [l for l in text.strip().splitlines() if l.strip()][-1:] or [""]
170
+ return "crash", f"exit code {rc}: {tail[0].strip()[:200]}"
171
+
172
+
173
+ def bad_args(text: str) -> Optional[str]:
174
+ """The run never started because the build rejected an argument: only the parsers' exact
175
+ messages count, and only if nothing was loaded (a model-load line means it ran)."""
176
+ if any(mk in text for mk in LOAD_MARKERS):
177
+ return None
178
+ for pat in BAD_ARG_PATTERNS:
179
+ m = re.search(pat, text)
180
+ if m:
181
+ return next((l for l in text.splitlines() if re.search(pat, l)), m.group(0)).strip()[:220]
182
+ return None
183
+
184
+
185
+ def classify_failure(text: str, rc: Optional[int]) -> tuple[Optional[str], str]:
186
+ """(failure, detail); failure None means 'not attempted: bad arguments' (no row)."""
187
+ f, why = classify_log(text, rc)
188
+ if f == "oom":
189
+ return f, why
190
+ ba = bad_args(text)
191
+ if ba:
192
+ return None, ba
193
+ return f, why
194
+
195
+
196
+ # ----- our own child processes, so a resumed night can clean up after a killed one -------------
197
+ def process_image(pid: int) -> Optional[str]:
198
+ """Executable name of a live PID, or None. Never signals the process."""
199
+ try:
200
+ if is_windows():
201
+ out = subprocess.run(["tasklist", "/FI", f"PID eq {pid}", "/FO", "CSV", "/NH"],
202
+ capture_output=True, text=True, timeout=20).stdout.strip()
203
+ if not out or out.startswith("INFO:"):
204
+ return None
205
+ return out.split(",")[0].strip('"')
206
+ if os.path.exists(f"/proc/{pid}/cmdline"):
207
+ with open(f"/proc/{pid}/cmdline", "rb") as f:
208
+ return os.path.basename(f.read().split(b"\0")[0].decode(errors="replace"))
209
+ out = subprocess.run(["ps", "-p", str(pid), "-o", "comm="], capture_output=True, text=True).stdout.strip()
210
+ return os.path.basename(out) if out else None
211
+ except Exception:
212
+ return None
213
+
214
+
215
+ def kill_orphans(session, log=print) -> list[str]:
216
+ """Children we launched in an earlier attempt whose run never recorded an end, still alive,
217
+ and still llama-bench/llama-server by name (PID reuse after a reboot must not kill anything
218
+ else)."""
219
+ atts = session.attempts()
220
+ killed = []
221
+ for i, a in enumerate(atts):
222
+ if a.get("what") != "child" or not a.get("pid"):
223
+ continue
224
+ if any(b.get("run") == a.get("run") and b.get("what") == "end" for b in atts[i + 1:]):
225
+ continue
226
+ name = process_image(int(a["pid"]))
227
+ if not name or not ("llama-server" in name or "llama-bench" in name):
228
+ continue
229
+ log(f" killing orphaned {name} (pid {a['pid']}) left by an interrupted run {a.get('run')}")
230
+ try:
231
+ if is_windows():
232
+ subprocess.run(["taskkill", "/PID", str(a["pid"]), "/T", "/F"], capture_output=True, timeout=30)
233
+ else:
234
+ os.kill(int(a["pid"]), signal.SIGKILL)
235
+ except Exception:
236
+ pass
237
+ killed.append(f"{name}:{a['pid']}")
238
+ if killed:
239
+ session.event("orphans_killed", processes=killed)
240
+ time.sleep(3)
241
+ return killed
242
+
243
+
244
+ def port_busy(port: int) -> bool:
245
+ import socket
246
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sk:
247
+ sk.settimeout(1.0)
248
+ return sk.connect_ex(("127.0.0.1", port)) == 0
249
+
250
+
251
+ LLAMA_VERSION_LINES = (
252
+ # current (common/build-info.cpp.in at b10951): "version: 0.4.0 (build 10951, commit 093a2f86c)"
253
+ re.compile(r"version:\s*\S+\s*\(build\s+(\d+),\s*commit\s+([0-9a-f]+)\)"),
254
+ # older builds: "version: 10442 (abc1234)"
255
+ re.compile(r"version:\s*(\d+)\s*\(([0-9a-f]+)\)"),
256
+ )
257
+
258
+
259
+ def parse_llama_version(text: str) -> Optional[str]:
260
+ for rx in LLAMA_VERSION_LINES:
261
+ m = rx.search(text)
262
+ if m:
263
+ return f"b{m.group(1)} ({m.group(2)})"
264
+ return None
265
+
266
+
267
+ @functools.lru_cache(maxsize=None)
268
+ def llama_version(binary: str) -> Optional[str]:
269
+ try:
270
+ p = subprocess.run([binary, "--version"], capture_output=True, text=True, encoding="utf-8",
271
+ errors="replace", timeout=60)
272
+ return parse_llama_version(p.stdout + p.stderr)
273
+ except Exception:
274
+ return None
275
+
276
+
277
+ def breakdown_self_mib(text: str) -> Optional[str]:
278
+ """common_memory_breakdown_print: '| CUDA0 (...) | total = free + (self = model + context + compute) + unaccounted |'"""
279
+ m = re.search(r"\|\s*-?\s*CUDA0[^|]*\|\s*(\d+)\s*=\s*(\d+)\s*\+\s*\(\s*(\d+)\s*=\s*(\d+)\s*\+\s*(\d+)\s*\+\s*(\d+)\s*\)", text)
280
+ if not m:
281
+ return None
282
+ return (f"llama.cpp breakdown at exit: self={m.group(3)} MiB = model {m.group(4)} + context {m.group(5)} + "
283
+ f"compute {m.group(6)} (llama_context only: excludes the mmproj encoder and the CUDA context)")
284
+
285
+
286
+ # ------------------------------------------------------------------------------------------
287
+ def base_row(cfg, r, session, ins, t0) -> dict:
288
+ return {
289
+ "session_id": session.session_id, "run": r["run"], "measured_at": utc_iso(t0),
290
+ "model_slug": cfg["model_slug"], "gpu_slug": cfg["gpu_slug"], "vertical": cfg["vertical"], "task": "llm",
291
+ "runtime": "llama.cpp", "runtime_version": "unknown", "artifact": "", "quantization": None,
292
+ "width": None, "height": None, "frames": None, "steps": None, "context_tokens": r.get("ctx"),
293
+ "prompt_tokens": None, "gen_tokens": None, "output_seconds": None, "config_json": {},
294
+ "cold_start": True, "ok": False, "failure": None, "wall_s": None, "prefill_tokens_per_s": None,
295
+ "gen_tokens_per_s": None, "idle_device_mib": None, "peak_device_mib": None, "peak_process_mib": None,
296
+ "vram_total_mib": ins.vram_total_mib, "display_attached": ins.display, "gpu_name": ins.gpu_name,
297
+ "driver": ins.driver, "sample_ms": ins.sample_ms, "notes": "",
298
+ }
299
+
300
+
301
+ def run_bench(cfg, r, session, ins, args, bench_bin, specs) -> tuple[dict, dict]:
302
+ n = r["run"]
303
+ model = os.path.join(models_dir(args), specs[r["model"]].filename)
304
+ n_prompt, n_gen, ctx = int(r["n_prompt"]), int(r["n_gen"]), int(r["ctx"])
305
+ depth = ctx - n_prompt
306
+ if depth < 0:
307
+ raise SystemExit(f"run {n}: ctx {ctx} < n_prompt {n_prompt}")
308
+ argv = [bench_bin, "-m", model, "-p", str(n_prompt), "-n", str(n_gen), "-d", str(depth),
309
+ *[str(a) for a in r.get("bench_args", [])], "-o", "json"]
310
+ log_path = os.path.join(session.raw, "runs", f"run{n:02d}.llama-bench.stderr.log")
311
+ out_path = os.path.join(session.raw, "runs", f"run{n:02d}.llama-bench.json")
312
+ timeout_s = float(r.get("timeout_s", 3600))
313
+ idle = ins.sampler.last_before(time.time(), max_age=3 * ins.sample_ms / 1000 + 1.0)
314
+ t0 = time.time()
315
+ with open(log_path, "w", encoding="utf-8") as errf:
316
+ proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=errf, text=True)
317
+ session.attempt(n, "child", pid=proc.pid, binary="llama-bench")
318
+ try:
319
+ stdout, _ = proc.communicate(timeout=timeout_s)
320
+ rc = proc.returncode
321
+ timed_out = False
322
+ except subprocess.TimeoutExpired:
323
+ proc.kill()
324
+ stdout, _ = proc.communicate()
325
+ rc, timed_out = None, True
326
+ t1 = time.time()
327
+ with open(out_path, "w", encoding="utf-8") as f:
328
+ f.write(stdout or "")
329
+ with open(log_path, encoding="utf-8", errors="replace") as f:
330
+ errtext = f.read()
331
+ row = base_row(cfg, r, session, ins, t0)
332
+ notes = []
333
+ results = None
334
+ try:
335
+ results = json.loads(stdout) if stdout and stdout.strip() else None
336
+ except json.JSONDecodeError:
337
+ results = None
338
+ pp = next((x for x in results or [] if x.get("n_prompt", 0) > 0 and x.get("n_gen", 0) == 0), None)
339
+ tg = next((x for x in results or [] if x.get("n_gen", 0) > 0 and x.get("n_prompt", 0) == 0), None)
340
+ if timed_out:
341
+ row["failure"] = "timeout"
342
+ notes.append(f"hard timeout at {timeout_s:.0f}s; killed")
343
+ elif rc != 0:
344
+ failure, why = classify_failure(errtext, rc)
345
+ if failure is None:
346
+ return {}, {"not_attempted": f"llama-bench rejected the arguments: {why}", "t0": t0, "t1": t1}
347
+ row["failure"] = failure
348
+ notes.append(why)
349
+ elif not (pp and tg):
350
+ row["failure"] = "invalid-output"
351
+ notes.append("llama-bench exited 0 without both a pp and a tg result")
352
+ row["ok"] = row["failure"] is None
353
+ if pp:
354
+ row["prefill_tokens_per_s"] = round(float(pp["avg_ts"]), 3)
355
+ row["prompt_tokens"] = int(pp["n_prompt"])
356
+ if tg:
357
+ row["gen_tokens_per_s"] = round(float(tg["avg_ts"]), 3)
358
+ row["gen_tokens"] = int(tg["n_gen"])
359
+ first = pp or tg or {}
360
+ if first.get("build_number"):
361
+ row["runtime_version"] = f"b{first['build_number']} ({first.get('build_commit')})"
362
+ else:
363
+ row["runtime_version"] = llama_version(bench_bin) or "unknown"
364
+ row["artifact"] = specs[r["model"]].artifact
365
+ row["quantization"] = specs[r["model"]].quantization
366
+ row["config_json"] = {
367
+ "run_key": r.get("key"), "mode": "bench", "argv": [os.path.basename(argv[0])] + argv[1:],
368
+ "n_depth": depth, "n_ctx_prompt_test": n_prompt + depth, "n_ctx_gen_test": n_gen + depth,
369
+ "model_revision": specs[r["model"]].revision, "model_sha256": specs[r["model"]].sha256,
370
+ "model_bytes": specs[r["model"]].size,
371
+ "bench": [{k: x.get(k) for k in ("n_prompt", "n_gen", "n_depth", "avg_ns", "stddev_ns", "avg_ts", "stddev_ts",
372
+ "samples_ns", "type_k", "type_v", "flash_attn", "n_gpu_layers", "n_batch",
373
+ "n_ubatch", "gpu_info", "backends", "model_size")}
374
+ for x in results or []],
375
+ "wall_s_note": "llama-bench reports per-test averages (avg_ns), not a single job time; wall_s left empty",
376
+ }
377
+ extra = {"t0": t0, "t1": t1, "idle": idle[1].used if idle else None, "pid": proc.pid}
378
+ return row, {"notes": notes, **extra}
379
+
380
+
381
+ def http_json(url: str, body: Optional[dict] = None, timeout: float = 30) -> tuple[int, dict]:
382
+ data = json.dumps(body).encode() if body is not None else None
383
+ req = urllib.request.Request(url, data=data, method="POST" if body is not None else "GET",
384
+ headers={"Content-Type": "application/json"} if body is not None else {})
385
+ try:
386
+ with urllib.request.urlopen(req, timeout=timeout) as resp:
387
+ return resp.status, json.loads(resp.read().decode() or "{}")
388
+ except urllib.error.HTTPError as e:
389
+ try:
390
+ return e.code, json.loads(e.read().decode() or "{}")
391
+ except json.JSONDecodeError:
392
+ return e.code, {}
393
+ finally:
394
+ e.close()
395
+
396
+
397
+ def run_server(cfg, r, session, ins, args, server_bin, specs) -> tuple[dict, dict]:
398
+ n = r["run"]
399
+ md = models_dir(args)
400
+ model = os.path.join(md, specs[r["model"]].filename)
401
+ port = int(r.get("port", 8089))
402
+ sargs = [str(a) for a in r.get("server_args", [])]
403
+ argv = [server_bin, "--model", model]
404
+ if r.get("mmproj"):
405
+ argv += ["--mmproj", os.path.join(md, specs[r["mmproj"]].filename)]
406
+ argv += ["--host", "127.0.0.1", "--port", str(port)] + sargs
407
+ log_path = os.path.join(session.raw, "runs", f"run{n:02d}.llama-server.log")
408
+ img_path = os.path.join(session.raw, "runs", f"run{n:02d}.input.png")
409
+ synthetic_png(img_path, *r.get("request", {}).get("image_size", [1024, 1024]))
410
+ req = r.get("request", {})
411
+ if port_busy(port):
412
+ # Something already answers here (an orphaned llama-server?). Its /health would pass for
413
+ # ours and its timings would land in our row.
414
+ return {}, {"not_attempted": f"port {port} is already in use; refusing to measure whatever answers there",
415
+ "t0": time.time(), "t1": time.time()}
416
+ idle = ins.sampler.last_before(time.time(), max_age=3 * ins.sample_ms / 1000 + 1.0)
417
+ t0 = time.time()
418
+ flags = subprocess.CREATE_NEW_PROCESS_GROUP if is_windows() else 0 # type: ignore[attr-defined]
419
+ logf = open(log_path, "w", encoding="utf-8")
420
+ proc = subprocess.Popen(argv, stdout=logf, stderr=subprocess.STDOUT, text=True, creationflags=flags)
421
+ session.attempt(n, "child", pid=proc.pid, binary="llama-server")
422
+ row = base_row(cfg, r, session, ins, t0)
423
+ notes: list[str] = []
424
+ resp = None
425
+ try:
426
+ ready = False
427
+ deadline = time.time() + float(r.get("startup_timeout_s", 900))
428
+ while time.time() < deadline:
429
+ if proc.poll() is not None:
430
+ break
431
+ try:
432
+ code, body = http_json(f"http://127.0.0.1:{port}/health", timeout=5)
433
+ if code == 200 and proc.poll() is None: # healthy AND it is our process answering
434
+ ready = True
435
+ break
436
+ except (urllib.error.URLError, OSError):
437
+ pass
438
+ time.sleep(1.0)
439
+ if not ready:
440
+ logf.flush()
441
+ text = read_log(log_path)
442
+ if proc.poll() is None:
443
+ row["failure"] = "timeout"
444
+ notes.append("server never became healthy before the startup timeout")
445
+ else:
446
+ failure, why = classify_failure(text, proc.returncode)
447
+ if failure is None:
448
+ return {}, {"not_attempted": f"llama-server rejected the recipe's flags: {why}", "t0": t0,
449
+ "t1": time.time()}
450
+ row["failure"] = failure
451
+ notes.append(f"server died during load: {why}")
452
+ else:
453
+ with open(img_path, "rb") as f:
454
+ b64 = base64.b64encode(f.read()).decode()
455
+ body = {"model": "measure", "stream": False, "max_tokens": int(req.get("max_tokens", 256)),
456
+ "seed": int(req.get("seed", 1234)),
457
+ "messages": [{"role": "user", "content": [
458
+ {"type": "text", "text": req.get("prompt", "Describe this image in one sentence.")},
459
+ {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{b64}"}}]}]}
460
+ for k in ("temperature", "top_p", "top_k", "min_p"):
461
+ if k in req:
462
+ body[k] = req[k]
463
+ try:
464
+ code, resp = http_json(f"http://127.0.0.1:{port}/v1/chat/completions", body,
465
+ timeout=float(r.get("timeout_s", 1800)))
466
+ except (urllib.error.URLError, OSError, TimeoutError) as e:
467
+ code, resp = None, None
468
+ try:
469
+ proc.wait(timeout=10) # a reset connection often precedes the exit by a moment
470
+ except subprocess.TimeoutExpired:
471
+ pass
472
+ if proc.poll() is not None:
473
+ logf.flush()
474
+ row["failure"], why = classify_log(read_log(log_path), proc.returncode)
475
+ notes.append(f"server died during the request: {why}")
476
+ else:
477
+ row["failure"] = "timeout"
478
+ notes.append(f"request failed/timed out: {e}")
479
+ if resp is not None:
480
+ t = resp.get("timings") or {}
481
+ choices = resp.get("choices") or []
482
+ if code != 200 or not choices or not t:
483
+ f_body, why_body = classify_log(json.dumps(resp), code)
484
+ row["failure"] = "oom" if f_body == "oom" else "invalid-output"
485
+ notes.append(f"HTTP {code}: {json.dumps(resp)[:200]}")
486
+ else:
487
+ row["prompt_tokens"] = int(t.get("prompt_n")) if t.get("prompt_n") else None
488
+ row["gen_tokens"] = int(t.get("predicted_n")) if t.get("predicted_n") else None
489
+ row["prefill_tokens_per_s"] = round(float(t["prompt_per_second"]), 3) if t.get("prompt_per_second") else None
490
+ row["gen_tokens_per_s"] = round(float(t["predicted_per_second"]), 3) if t.get("predicted_per_second") else None
491
+ ms = (t.get("prompt_ms") or 0) + (t.get("predicted_ms") or 0)
492
+ row["wall_s"] = round(ms / 1000.0, 3) if ms > 0 else None
493
+ if t.get("cache_n"):
494
+ notes.append(f"{t['cache_n']} prompt tokens came from cache")
495
+ finally:
496
+ if proc.poll() is None:
497
+ if is_windows():
498
+ proc.terminate()
499
+ else:
500
+ proc.send_signal(signal.SIGINT) # graceful: prints the memory breakdown
501
+ try:
502
+ proc.wait(timeout=60)
503
+ except subprocess.TimeoutExpired:
504
+ proc.kill()
505
+ proc.wait()
506
+ logf.close()
507
+ t1 = time.time()
508
+ text = read_log(log_path)
509
+ bd = breakdown_self_mib(text)
510
+ if bd:
511
+ notes.append(bd)
512
+ row["ok"] = row["failure"] is None
513
+ row["runtime_version"] = llama_version(server_bin) or "unknown"
514
+ arts = [specs[r["model"]]] + ([specs[r["mmproj"]]] if r.get("mmproj") else [])
515
+ row["artifact"] = ";".join(s.artifact for s in arts)
516
+ row["quantization"] = specs[r["model"]].quantization
517
+ row["config_json"] = {
518
+ "run_key": r.get("key"), "mode": "server",
519
+ "argv": [os.path.basename(argv[0])] + [a if not os.path.isabs(a) else os.path.basename(a) for a in argv[1:]],
520
+ "request": {k: v for k, v in req.items()}, "image": os.path.basename(img_path),
521
+ "model_revision": specs[r["model"]].revision, "model_sha256": specs[r["model"]].sha256,
522
+ "model_bytes": specs[r["model"]].size,
523
+ "timings": (resp or {}).get("timings"), "usage": (resp or {}).get("usage"),
524
+ "answer_head": (((resp or {}).get("choices") or [{}])[0].get("message") or {}).get("content", "")[:300],
525
+ "wall_s_note": "wall_s = the server's prompt_ms + predicted_ms for the one request",
526
+ }
527
+ return row, {"notes": notes, "t0": t0, "t1": t1, "idle": idle[1].used if idle else None, "pid": proc.pid}
528
+
529
+
530
+ # ------------------------------------------------------------------------------------------
531
+ def free_comfyui(args, session, ins) -> Optional[str]:
532
+ if args.no_comfy_free:
533
+ return None
534
+ client = ComfyClient(args.comfy_url, timeout=10)
535
+ try:
536
+ client.free(True, True)
537
+ except ComfyError:
538
+ return None
539
+ t0 = time.time()
540
+ st = ins.sampler.wait_settled(since=t0 + 2, window_s=3, tol_mib=64, timeout=90)
541
+ session.event("comfyui_free_before_llama", **st)
542
+ return (f"ComfyUI at {args.comfy_url} was running; it was sent POST /free before these runs and its process "
543
+ f"(CUDA context) stayed resident, so idle_device_mib includes it")
544
+
545
+
546
+ def print_blocked(blocked: dict[int, list[str]]) -> None:
547
+ by_reason: dict[str, list[int]] = {}
548
+ for n, whys in sorted(blocked.items()):
549
+ for why in whys:
550
+ by_reason.setdefault(why, []).append(n)
551
+ for why, runs in by_reason.items():
552
+ say(f" BLOCKED run{'s' if len(runs) > 1 else ''} {','.join(map(str, runs))}: {why}")
553
+
554
+
555
+ def cmd_check(args) -> int:
556
+ cfg = load_config(args.config)
557
+ fatal, blocked, info = preflight(cfg, args)
558
+ say(f"== preflight: {cfg['model_slug']} ({cfg['runtime']})")
559
+ for k, v in info.items():
560
+ say(f" {k}: {json.dumps(v) if isinstance(v, dict) else v}")
561
+ print_blocked(blocked)
562
+ for f in fatal:
563
+ say(f" FATAL {f}")
564
+ return 1 if fatal else (2 if blocked else 0)
565
+
566
+
567
+ def cmd_download(args) -> int:
568
+ cfg = load_config(args.config)
569
+ specs = specs_from(cfg)
570
+ pres = presence(cfg, args)
571
+ wanted = set()
572
+ for r in cfg["runs"]:
573
+ if (r.get("enabled", True) or args.include_disabled) and (not args.only or r["run"] in args.only):
574
+ wanted |= set(run_needs(r))
575
+ md = models_dir(args)
576
+ items, problems = [], []
577
+ say(f"== download plan for {cfg['model_slug']} into {md} ({'EXECUTE' if args.execute else 'DRY RUN'})")
578
+ for key in sorted(wanted):
579
+ s = specs[key]
580
+ if pres[key]["status"] != "missing":
581
+ say(f" have {s.filename} ({pres[key]['status']})")
582
+ continue
583
+ try:
584
+ meta = hf_paths_info(s.repo, [s.path], s.revision).get(s.path)
585
+ except Exception as e:
586
+ problems.append(f"{s.filename}: cannot read metadata for {s.repo}@{s.revision}: {e}")
587
+ continue
588
+ if not meta:
589
+ problems.append(f"{s.filename}: {s.path} not in {s.repo}@{s.revision}")
590
+ continue
591
+ if s.size is not None and meta["size"] != s.size:
592
+ problems.append(f"{s.filename}: {s.repo}@{s.revision} has {meta['size']} bytes, config expects {s.size}")
593
+ it = DownloadItem(s, md, os.path.join(md, ".smeltcore-staging", f"{s.repo.replace('/', '__')}@{s.revision[:12]}"),
594
+ s.size or meta["size"], s.sha256 or meta.get("sha256"))
595
+ items.append(it)
596
+ say(f" get {s.repo}/{s.path}@{s.revision}\n {it.size} bytes ({(it.size or 0) / GIB:.2f} GiB)"
597
+ f" sha256 {it.sha256}\n -> {os.path.join(md, s.filename)}")
598
+ problems += disk_check(items)
599
+ say(f" total {sum(i.size or 0 for i in items)} bytes = {sum(i.size or 0 for i in items) / GIB:.2f} GiB")
600
+ for p in problems:
601
+ say(f" PROBLEM {p}")
602
+ if problems:
603
+ return 1
604
+ if not args.execute:
605
+ say(" dry run only; re-run with --execute to download")
606
+ return 0
607
+ rc = 0
608
+ for it in items:
609
+ try:
610
+ execute_download(it, verify_sha256=not args.skip_sha256, log=say)
611
+ except Exception as e:
612
+ say(f" FAILED {it.spec.filename}: {e}")
613
+ rc = 1
614
+ return rc
615
+
616
+
617
+ def cmd_run(args) -> int:
618
+ cfg = load_config(args.config)
619
+ if cfg["runtime"] != "llama.cpp":
620
+ raise SystemExit(f"{args.config} is a {cfg['runtime']} config; use comfy_measure.py")
621
+ fatal, blocked, info = preflight(cfg, args)
622
+ print_blocked(blocked)
623
+ if fatal:
624
+ for f in fatal:
625
+ say(f" FATAL {f}")
626
+ return 1
627
+ runs = [r for r in cfg["runs"] if r.get("enabled", True) and (not args.only or r["run"] in args.only)]
628
+ runnable = [r for r in runs if r["run"] not in blocked]
629
+ if not runnable:
630
+ say("== nothing runnable; nothing recorded")
631
+ return 2
632
+ specs = specs_from(cfg)
633
+ session, resumed = Session.open(args.out_root, cfg["model_slug"], cfg["gpu_slug"], config_digest(cfg),
634
+ resume=not args.no_resume, explicit_id=args.session)
635
+ say(f"== session {session.session_id} ({'resumed' if resumed else 'new'}): {session.dir}")
636
+ session.event("invocation", argv=sys.argv, resumed=resumed, blocked={str(k): v for k, v in blocked.items()})
637
+ ins = Instruments(session, args.nvidia_smi, args.sample_ms, not args.no_spill_monitor, args.display_attached)
638
+ if ins.display is None:
639
+ raise SystemExit("Pass --display-attached yes|no: nvidia-smi would not say, and every row needs it.")
640
+ err = check_gpu_identity(cfg, ins.gpu_name)
641
+ if err:
642
+ raise SystemExit("nvidia-smi: " + err)
643
+ ins.start()
644
+ caveats = ([FAKE_NOTE] if ins.fake else []) + ["VRAM figures are whole-card (nvidia-smi memory.used) and include the desktop/display; the peak "
645
+ "window is each process's whole life (model load included)."]
646
+ if not ins.spill.available:
647
+ caveats.append(f"Windows sysmem-fallback spill not monitored ({ins.spill.reason}); llama.cpp allocations "
648
+ f"beyond VRAM can spill to shared memory on Windows without an error.")
649
+ stamp = utc_stamp()
650
+ session.write_json(f"raw/environment_{stamp}.json", environment_record({
651
+ "nvidia_smi_static": ins.static, "display": {"attached": ins.display, "how": ins.display_how},
652
+ "preflight": info, "config_file": os.path.relpath(args.config, HARNESS_DIR)}))
653
+ session.write_json("raw/config.json", cfg)
654
+ stop_reason = None
655
+ try:
656
+ kill_orphans(session, log=say)
657
+ c = free_comfyui(args, session, ins)
658
+ if c:
659
+ caveats.append(c)
660
+ done = session.runs_csv.recorded_runs()
661
+ for r in runnable:
662
+ n = r["run"]
663
+ if n in done:
664
+ say(f"-- run {n}: already recorded")
665
+ continue
666
+ if not ins.sampler.alive(max(30.0, 20 * args.sample_ms / 1000)):
667
+ stop_reason = ("the VRAM instrument (nvidia-smi) stopped producing samples; remaining runs not "
668
+ "attempted")
669
+ break
670
+ prior = session.interrupted_attempts(n)
671
+ if prior >= args.max_interrupted_attempts:
672
+ row = base_row(cfg, r, session, ins, time.time())
673
+ row.update(runtime_version="unknown", artifact=specs[r["model"]].artifact,
674
+ quantization=specs[r["model"]].quantization, failure="crash",
675
+ config_json={"run_key": r.get("key"), "mode": r["mode"]},
676
+ notes=f"{prior} attempts were interrupted without a result; not retried again")
677
+ session.runs_csv.append(stamp_fake(row, ins))
678
+ session.attempt(n, "end", outcome="recorded-after-interruptions")
679
+ continue
680
+ say(f"-- run {n} ({r.get('key')}): {r.get('why', '')}")
681
+ try:
682
+ st = ins.sampler.wait_settled(since=time.time(), window_s=3, tol_mib=64, timeout=60)
683
+ session.attempt(n, "start")
684
+ if r["mode"] == "bench":
685
+ row, extra = run_bench(cfg, r, session, ins, args, info["llama_bench"], specs)
686
+ else:
687
+ row, extra = run_server(cfg, r, session, ins, args, info["llama_server"], specs)
688
+ if "not_attempted" in extra:
689
+ say(f" not attempted: {extra['not_attempted']}")
690
+ session.event("not_attempted", run=n, why=extra["not_attempted"])
691
+ caveats.append(f"run {n} not attempted: {extra['not_attempted']}")
692
+ session.attempt(n, "end", outcome="not-attempted")
693
+ continue
694
+ covered = ins.sampler.wait_covered(extra["t1"], timeout=120)
695
+ win = ins.sampler.window(extra["t0"], extra["t1"])
696
+ spill = ins.spill.shared_delta(extra["t0"], extra["t1"])
697
+ notes = ([] if prior == 0 else [f"retried after {prior} interrupted attempt(s)"]) + extra["notes"]
698
+ if not st.get("settled"):
699
+ notes.append("memory had not settled before launch")
700
+ if extra["idle"] is None:
701
+ notes.append("no fresh VRAM sample just before launch: idle not measured")
702
+ notes += window_notes(win, ins.sample_ms, ins.vram_total_mib, spill, covered)
703
+ row["idle_device_mib"] = extra["idle"]
704
+ row["peak_device_mib"] = win.get("peak_mib")
705
+ row["notes"] = "; ".join(notes)
706
+ record = {"row": {k: v for k, v in row.items() if k != "config_json"},
707
+ "config_json": row["config_json"], "window": win, "window_covered": covered,
708
+ "spill": list(spill), "pre_launch_settle": st, "pid": extra.get("pid")}
709
+ session.write_json(f"raw/runs/run{n:02d}.json", record)
710
+ try:
711
+ session.runs_csv.append(stamp_fake(row, ins))
712
+ except SchemaError as e:
713
+ session.write_json(f"raw/runs/run{n:02d}.schema_error.json", {"error": str(e), **record})
714
+ caveats.append(f"run {n} was measured but its row failed schema validation ({str(e)[:200]}); "
715
+ f"raw/runs/run{n:02d}.schema_error.json holds the measurement")
716
+ session.attempt(n, "end", outcome="schema-error")
717
+ continue
718
+ session.attempt(n, "end", outcome="recorded", ok=row["ok"], failure=row["failure"])
719
+ say(f" -> ok={row['ok']} failure={row['failure']} pp={row['prefill_tokens_per_s']} "
720
+ f"tg={row['gen_tokens_per_s']} idle={row['idle_device_mib']} peak={row['peak_device_mib']} "
721
+ f"notes={row['notes'][:200]}")
722
+ except Exception as e: # a harness bug must cost one run, not the night
723
+ import traceback
724
+ session.event("harness_error", run=n, error=repr(e), traceback=traceback.format_exc())
725
+ session.attempt(n, "end", outcome="harness-error")
726
+ caveats.append(f"run {n}: harness error ({type(e).__name__}: {str(e)[:200]}); no row written")
727
+ say(f" HARNESS ERROR on run {n}: {e!r}; continuing")
728
+ except BaseException as e:
729
+ stop_reason = f"harness stopped early ({type(e).__name__}: {str(e)[:200]})"
730
+ raise
731
+ finally:
732
+ ins.stop()
733
+ for n, whys in sorted(blocked.items()):
734
+ caveats.append(f"run {n} not attempted: {'; '.join(whys)}")
735
+ if stop_reason:
736
+ caveats.append(stop_reason)
737
+ caveats = session.add_caveats(caveats)
738
+ rows = session.runs_csv.rows()
739
+ version = next((r["runtime_version"] for r in rows if r["runtime_version"] != "unknown"), "unknown")
740
+ sj = new_session_json(
741
+ session_id=session.session_id,
742
+ gpu={"slug": cfg["gpu_slug"], "name": ins.gpu_name, "vram_total_mib": ins.vram_total_mib,
743
+ "driver": ins.driver, "compute_capability": ins.compute_capability},
744
+ host={"os": os_description(), "ram_gib": round((total_ram_bytes() or 0) / GIB) or None},
745
+ display_attached=bool(ins.display),
746
+ runtime={"name": "llama.cpp", "version": version,
747
+ "extras": {"llama_bench": info.get("llama_bench"), "llama_server": info.get("llama_server"),
748
+ "harness_version": HARNESS_VERSION, "display_detection": ins.display_how}},
749
+ sample_ms=ins.sample_ms, instrument_cmd=ins.instrument_description(), caveats=caveats)
750
+ session.write_json("session.json", sj)
751
+ try:
752
+ session.copy_harness(HARNESS_DIR)
753
+ except OSError as e:
754
+ session.event("harness_copy_failed", error=str(e))
755
+ with open(os.path.join(session.dir, "README.md"), "w", encoding="utf-8") as f:
756
+ f.write(f"# {session.session_id}\n\n`{cfg['model_slug']}` via llama.cpp. Nothing here has been uploaded "
757
+ f"or published.\n\n| run | mode | ok | failure | ctx | pp t/s | tg t/s | idle | peak | notes |\n"
758
+ f"|---:|---|---|---|---:|---:|---:|---:|---:|---|\n")
759
+ for r in rows:
760
+ mode = json.loads(r["config_json"]).get("mode", "")
761
+ f.write(f"| {r['run']} | {mode} | {r['ok']} | {r['failure']} | {r['context_tokens']} | "
762
+ f"{r['prefill_tokens_per_s']} | {r['gen_tokens_per_s']} | {r['idle_device_mib']} | "
763
+ f"{r['peak_device_mib']} | {r['notes'][:160]} |\n")
764
+ f.write("\n## Caveats\n\n" + "\n".join(f"- {c}" for c in caveats) + "\n")
765
+ f.write("\n## Recipe claims under test\n\n" + "\n".join(f"- {c}" for c in (cfg.get('recipe') or {}).get('claims', [])) + "\n")
766
+ all_done = {r["run"] for r in cfg["runs"] if r.get("enabled", True)} <= session.runs_csv.recorded_runs()
767
+ session.save_state(status="finished" if all_done else "in_progress", finished_at=utc_iso(time.time()))
768
+ probs = check_csv_file(session.runs_csv.path) if os.path.exists(session.runs_csv.path) else []
769
+ say(f"== session {session.session_id}: {len(rows)} row(s); schema check {'OK' if not probs else probs}")
770
+ return 3 if stop_reason else 0
771
+
772
+
773
+ def main(argv=None) -> int:
774
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
775
+ ap.add_argument("--llama-bin-dir", help="directory holding llama-bench / llama-server")
776
+ ap.add_argument("--models-dir", help="where GGUF files live (default: <measurements>/models)")
777
+ sub = ap.add_subparsers(dest="cmd", required=True)
778
+ only = lambda s: [int(x) for x in re.split(r"[,\s]+", s.strip()) if x] # noqa: E731
779
+ c = sub.add_parser("check")
780
+ c.add_argument("--config", required=True)
781
+ c.add_argument("--only", type=only)
782
+ d = sub.add_parser("download")
783
+ d.add_argument("--config", required=True)
784
+ d.add_argument("--only", type=only)
785
+ d.add_argument("--execute", action="store_true")
786
+ d.add_argument("--include-disabled", action="store_true", help="also fetch weights of runs marked enabled:false")
787
+ d.add_argument("--skip-sha256", action="store_true")
788
+ r = sub.add_parser("run")
789
+ r.add_argument("--config", required=True)
790
+ r.add_argument("--only", type=only)
791
+ r.add_argument("--out-root", default=os.path.dirname(HARNESS_DIR))
792
+ r.add_argument("--session")
793
+ r.add_argument("--no-resume", action="store_true")
794
+ r.add_argument("--sample-ms", type=int, default=500)
795
+ r.add_argument("--display-attached", choices=["yes", "no", "auto"], default="auto")
796
+ r.add_argument("--nvidia-smi")
797
+ r.add_argument("--no-spill-monitor", action="store_true")
798
+ r.add_argument("--comfy-url", default=os.environ.get("COMFYUI_URL", "http://127.0.0.1:8000"))
799
+ r.add_argument("--no-comfy-free", action="store_true", help="do not ask ComfyUI to unload before LLM runs")
800
+ r.add_argument("--max-interrupted-attempts", type=int, default=2)
801
+ args = ap.parse_args(argv)
802
+ utf8_stdio()
803
+ return {"check": cmd_check, "download": cmd_download, "run": cmd_run}[args.cmd](args)
804
+
805
+
806
+ if __name__ == "__main__":
807
+ sys.exit(main())
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/__init__.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Smeltcore measurement harness (schema v1).
2
+
3
+ Modules:
4
+ schema the runs.csv / session.json contract, and the only writer of rows
5
+ gpu nvidia-smi instrument: static query, background sampler, windows
6
+ spill best-effort Windows shared-GPU-memory monitor (sysmem fallback)
7
+ comfy_api stdlib HTTP client for ComfyUI's API
8
+ workflow API-format workflow loading, validation, overrides
9
+ ui2api conservative UI-format -> API-format converter (refuses what it cannot prove)
10
+ outputs read-back of produced files (PNG natively, video via PyAV or ffprobe)
11
+ weights which weight files a run needs, what is present, dry-run/real download
12
+ session session directory, resume, attempts journal, events log
13
+ platform_util OS/WSL detection, path translation, host facts
14
+ """
15
+
16
+ HARNESS_VERSION = "1.0.0"
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/comfy_api.py ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """ComfyUI HTTP API client (stdlib only).
2
+
3
+ Every endpoint used here was read in ComfyUI's own source (server.py, execution.py,
4
+ main.py, api_server/routes/internal/internal_routes.py) at comfyui_version 0.35.0,
5
+ commit 1d48d9cf7bcecb6022a87b3cb13e0fb435bf9b8a (2026-09-10). See README "Verified
6
+ against source" for the facts each call relies on.
7
+
8
+ Nothing here drives the browser UI and nothing writes to ComfyUI's install.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import json
13
+ import socket
14
+ import time
15
+ import urllib.error
16
+ import urllib.parse
17
+ import urllib.request
18
+ from typing import Any, Optional
19
+
20
+
21
+ class ComfyError(RuntimeError):
22
+ pass
23
+
24
+
25
+ class ComfyUnreachable(ComfyError):
26
+ """kind: 'timeout' = the process accepted the connection but did not answer in time
27
+ (alive but stalled, e.g. paging); 'down' = refused/reset/unresolvable (not listening)."""
28
+
29
+ def __init__(self, msg: str, kind: str = "down"):
30
+ super().__init__(msg)
31
+ self.kind = kind
32
+
33
+
34
+ class PromptRejected(ComfyError):
35
+ """POST /prompt answered 400: ComfyUI's own validate_prompt refused the graph.
36
+ That is a setup problem (missing file, wrong input), not a measurement result."""
37
+
38
+ def __init__(self, payload: dict):
39
+ self.payload = payload
40
+ err = payload.get("error") or {}
41
+ msg = err.get("message") if isinstance(err, dict) else str(err)
42
+ super().__init__(f"ComfyUI rejected the prompt: {msg}; node_errors={json.dumps(payload.get('node_errors'))[:1500]}")
43
+
44
+
45
+ class ComfyClient:
46
+ def __init__(self, base_url: str = "http://127.0.0.1:8000", timeout: float = 30.0):
47
+ self.base = base_url.rstrip("/")
48
+ self.timeout = timeout
49
+
50
+ # ----- plumbing -------------------------------------------------------------------
51
+ def _request(self, method: str, path: str, body: Any = None, timeout: Optional[float] = None,
52
+ raw: bool = False) -> Any:
53
+ url = self.base + path
54
+ data = None
55
+ headers = {}
56
+ if body is not None:
57
+ data = json.dumps(body).encode("utf-8")
58
+ headers["Content-Type"] = "application/json"
59
+ req = urllib.request.Request(url, data=data, method=method, headers=headers)
60
+ try:
61
+ with urllib.request.urlopen(req, timeout=timeout or self.timeout) as resp:
62
+ payload = resp.read()
63
+ except urllib.error.HTTPError as e:
64
+ text = e.read().decode("utf-8", "replace")
65
+ if e.code == 400 and path == "/prompt":
66
+ try:
67
+ raise PromptRejected(json.loads(text)) from None
68
+ except json.JSONDecodeError:
69
+ raise PromptRejected({"error": {"message": text[:1000]}}) from None
70
+ raise ComfyError(f"{method} {path} -> HTTP {e.code}: {text[:500]}") from None
71
+ except urllib.error.URLError as e:
72
+ kind = "timeout" if isinstance(e.reason, (socket.timeout, TimeoutError)) else "down"
73
+ raise ComfyUnreachable(f"{method} {url}: {e}", kind) from None
74
+ except (socket.timeout, TimeoutError) as e:
75
+ raise ComfyUnreachable(f"{method} {url}: {e}", "timeout") from None
76
+ except (ConnectionError, OSError) as e:
77
+ raise ComfyUnreachable(f"{method} {url}: {e}", "down") from None
78
+ if raw:
79
+ return payload
80
+ if not payload:
81
+ return None
82
+ try:
83
+ return json.loads(payload.decode("utf-8"))
84
+ except json.JSONDecodeError:
85
+ return payload.decode("utf-8", "replace")
86
+
87
+ def get(self, path: str, timeout: Optional[float] = None) -> Any:
88
+ return self._request("GET", path, timeout=timeout)
89
+
90
+ def post(self, path: str, body: Any, timeout: Optional[float] = None) -> Any:
91
+ return self._request("POST", path, body=body, timeout=timeout)
92
+
93
+ # ----- endpoints ------------------------------------------------------------------
94
+ def system_stats(self) -> dict:
95
+ return self.get("/system_stats")
96
+
97
+ def object_info(self) -> dict:
98
+ # GET /object_info builds every node's schema and rescans model folders: slow.
99
+ return self.get("/object_info", timeout=max(self.timeout, 180))
100
+
101
+ def queue(self) -> dict:
102
+ return self.get("/queue")
103
+
104
+ def submit(self, prompt: dict, prompt_id: str, extra_data: Optional[dict] = None) -> dict:
105
+ """POST /prompt. ComfyUI accepts a client-chosen prompt_id (canonical lowercase
106
+ UUID) since the jobs API landed; we choose it so a restarted harness can recognise
107
+ its own orphaned job."""
108
+ body: dict = {"prompt": prompt, "prompt_id": prompt_id}
109
+ if extra_data:
110
+ body["extra_data"] = extra_data
111
+ return self.post("/prompt", body, timeout=max(self.timeout, 120))
112
+
113
+ def history(self, prompt_id: str) -> Optional[dict]:
114
+ h = self.get(f"/history/{urllib.parse.quote(prompt_id)}")
115
+ if isinstance(h, dict) and prompt_id in h:
116
+ return h[prompt_id]
117
+ return None
118
+
119
+ def free(self, unload_models: bool = True, free_memory: bool = True) -> None:
120
+ # Asynchronous: this only sets flags; the prompt worker acts on them when idle.
121
+ # Callers must MEASURE the effect (see comfy_measure.free_and_settle).
122
+ self.post("/free", {"unload_models": unload_models, "free_memory": free_memory})
123
+
124
+ def interrupt(self, prompt_id: Optional[str] = None) -> None:
125
+ self.post("/interrupt", {"prompt_id": prompt_id} if prompt_id else {})
126
+
127
+ def cancel_job(self, prompt_id: str) -> Optional[bool]:
128
+ """POST /api/jobs/{id}/cancel (newer ComfyUI). None if the endpoint does not exist."""
129
+ try:
130
+ r = self.post(f"/api/jobs/{prompt_id}/cancel", {})
131
+ return bool((r or {}).get("cancelled"))
132
+ except ComfyError as e:
133
+ if "HTTP 404" in str(e) or "HTTP 405" in str(e):
134
+ return None
135
+ raise
136
+
137
+ def delete_queued(self, prompt_ids: list[str]) -> None:
138
+ self.post("/queue", {"delete": prompt_ids})
139
+
140
+ def view(self, filename: str, subfolder: str, folder_type: str) -> bytes:
141
+ q = urllib.parse.urlencode({"filename": filename, "subfolder": subfolder, "type": folder_type})
142
+ return self._request("GET", f"/view?{q}", timeout=max(self.timeout, 300), raw=True)
143
+
144
+ def models(self, folder: str) -> list[str]:
145
+ r = self.get(f"/models/{urllib.parse.quote(folder)}")
146
+ return list(r or [])
147
+
148
+ def folder_paths(self) -> dict:
149
+ """GET /internal/folder_paths -> {folder_type: [absolute paths as ComfyUI sees them]}"""
150
+ return self.get("/internal/folder_paths")
151
+
152
+ def logs_raw(self) -> list[dict]:
153
+ """GET /internal/logs/raw -> the in-memory log ring (300 entries, {"t","m"})."""
154
+ r = self.get("/internal/logs/raw")
155
+ return list((r or {}).get("entries") or [])
156
+
157
+ def template(self, name: str) -> dict:
158
+ n = name if name.endswith(".json") else name + ".json"
159
+ return self.get(f"/templates/{urllib.parse.quote(n)}")
160
+
161
+ def userdata_list(self, directory: str = "workflows") -> list:
162
+ q = urllib.parse.urlencode({"dir": directory, "recurse": "true"})
163
+ return self.get(f"/api/userdata?{q}") or []
164
+
165
+ def userdata_get(self, relpath: str) -> Any:
166
+ return self.get("/api/userdata/" + urllib.parse.quote(relpath, safe=""))
167
+
168
+ # ----- helpers --------------------------------------------------------------------
169
+ def reachable(self) -> bool:
170
+ try:
171
+ self.system_stats()
172
+ return True
173
+ except ComfyError:
174
+ return False
175
+
176
+ def wait_reachable(self, timeout: float) -> bool:
177
+ deadline = time.time() + timeout
178
+ while time.time() < deadline:
179
+ if self.reachable():
180
+ return True
181
+ time.sleep(5)
182
+ return False
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/gpu.py ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """nvidia-smi: the VRAM instrument.
2
+
3
+ Schema v1 fixes the instrument:
4
+ nvidia-smi --query-gpu=timestamp,memory.used,memory.total,utilization.gpu \
5
+ --format=csv,noheader,nounits -lms 500
6
+ It is whole-card (it includes the desktop, a browser, any other process). It reports
7
+ MiB as integers and we store them as such.
8
+
9
+ Two traps this module handles explicitly:
10
+
11
+ * nvidia-smi prints LOCAL wall-clock time with no zone ("2026/08/13 10:24:15.550").
12
+ We parse it as local time of the process that ran it (the harness launched it, so
13
+ they share a zone), and we keep a running minimum of (arrival - printed) to detect
14
+ a zone/clock mismatch instead of assuming there is none. A mismatch that is a whole
15
+ number of quarter hours is corrected as a zone offset and recorded; anything else
16
+ falls back to arrival timestamps and is recorded as a caveat.
17
+ * The pipe may be block-buffered. We never read a window's peak until the trace
18
+ demonstrably covers the end of the window (`wait_covered`).
19
+ """
20
+ from __future__ import annotations
21
+
22
+ import os
23
+ import platform
24
+ import shutil
25
+ import statistics
26
+ import subprocess
27
+ import sys
28
+ import threading
29
+ import time
30
+ from dataclasses import dataclass
31
+ from datetime import datetime
32
+ from typing import Callable, Optional
33
+
34
+ STREAM_QUERY = "timestamp,memory.used,memory.total,utilization.gpu"
35
+
36
+
37
+ def instrument_cmd(interval_ms: int) -> str:
38
+ return (f"nvidia-smi --query-gpu={STREAM_QUERY} --format=csv,noheader,nounits "
39
+ f"-lms {interval_ms}")
40
+
41
+
42
+ class GpuError(RuntimeError):
43
+ pass
44
+
45
+
46
+ def _cmd(nvsmi, args: list[str]) -> list[str]:
47
+ """nvsmi is an executable path, or a command prefix list (used by the self-test's fake)."""
48
+ return (list(nvsmi) if isinstance(nvsmi, (list, tuple)) else [nvsmi]) + args
49
+
50
+
51
+ def find_nvidia_smi(explicit: Optional[str] = None) -> Optional[str]:
52
+ cands = []
53
+ if explicit:
54
+ cands.append(explicit)
55
+ for name in ("nvidia-smi", "nvidia-smi.exe"):
56
+ p = shutil.which(name)
57
+ if p:
58
+ cands.append(p)
59
+ if sys.platform == "win32":
60
+ cands += [r"C:\Windows\System32\nvidia-smi.exe",
61
+ r"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"]
62
+ else:
63
+ cands += ["/usr/lib/wsl/lib/nvidia-smi", "/usr/bin/nvidia-smi"]
64
+ for c in cands:
65
+ if c and os.path.isfile(c):
66
+ return c
67
+ return None
68
+
69
+
70
+ def run_query(nvsmi, fields: list[str], gpu_index: int = 0, timeout: float = 30) -> list[str]:
71
+ cmd = _cmd(nvsmi, [f"--query-gpu={','.join(fields)}", "--format=csv,noheader,nounits",
72
+ "-i", str(gpu_index)])
73
+ p = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
74
+ out = p.stdout.strip()
75
+ if p.returncode != 0 or not out or "not a valid field" in out.lower():
76
+ raise GpuError(f"{' '.join(cmd)} -> rc={p.returncode} out={out!r} err={p.stderr.strip()!r}")
77
+ first = out.splitlines()[0]
78
+ vals = [v.strip() for v in first.split(",")]
79
+ if len(vals) != len(fields):
80
+ raise GpuError(f"expected {len(fields)} values for {fields}, got {vals!r}")
81
+ return vals
82
+
83
+
84
+ OPTIONAL_FIELDS = [
85
+ "compute_cap", "pci.bus_id", "uuid", "vbios_version",
86
+ "pcie.link.gen.current", "pcie.link.gen.max", "pcie.link.gen.gpumax", "pcie.link.gen.hostmax",
87
+ "pcie.link.width.current", "pcie.link.width.max",
88
+ "display_attached", "display_active", "display_mode",
89
+ "memory.reserved", "power.limit", "clocks.max.graphics", "clocks.max.memory",
90
+ "driver_model.current",
91
+ ]
92
+
93
+
94
+ def query_static(nvsmi, gpu_index: int = 0) -> dict:
95
+ """Everything about the card that does not change during a session. Optional fields
96
+ are queried one at a time so an older driver that lacks one does not lose the rest."""
97
+ name, total, driver = run_query(nvsmi, ["name", "memory.total", "driver_version"], gpu_index)
98
+ info: dict = {"name": name, "memory.total": int(total), "driver_version": driver, "optional": {}}
99
+ for f in OPTIONAL_FIELDS:
100
+ try:
101
+ info["optional"][f] = run_query(nvsmi, [f], gpu_index)[0]
102
+ except (GpuError, subprocess.TimeoutExpired, ValueError) as e:
103
+ info["optional"][f] = None
104
+ info.setdefault("optional_errors", {})[f] = str(e)[:200]
105
+ return info
106
+
107
+
108
+ def display_attached_from(static: dict) -> tuple[Optional[bool], str]:
109
+ """(attached?, how we know). None means the driver would not say."""
110
+ opt = static.get("optional", {})
111
+ for field in ("display_attached", "display_active", "display_mode"):
112
+ v = opt.get(field)
113
+ if v is None or v in ("[N/A]", "N/A", "[Not Supported]"):
114
+ continue
115
+ lv = v.strip().lower()
116
+ if lv in ("yes", "enabled", "true", "1"):
117
+ return True, f"nvidia-smi {field}={v}"
118
+ if lv in ("no", "disabled", "false", "0"):
119
+ return False, f"nvidia-smi {field}={v}"
120
+ return None, "nvidia-smi exposes none of display_attached/display_active/display_mode"
121
+
122
+
123
+ def nvidia_smi_full_report(nvsmi, gpu_index: int = 0) -> str:
124
+ try:
125
+ p = subprocess.run(_cmd(nvsmi, ["-q", "-i", str(gpu_index)]), capture_output=True, text=True, timeout=60)
126
+ return p.stdout + (("\n--- stderr ---\n" + p.stderr) if p.stderr else "")
127
+ except Exception as e: # evidence only; never fatal
128
+ return f"nvidia-smi -q failed: {e}"
129
+
130
+
131
+ def parse_nvsmi_timestamp(s: str) -> float:
132
+ """'2026/08/13 10:24:15.550' (local time, no zone) -> epoch seconds, as local time."""
133
+ s = s.strip()
134
+ for fmt in ("%Y/%m/%d %H:%M:%S.%f", "%Y/%m/%d %H:%M:%S"):
135
+ try:
136
+ return datetime.strptime(s, fmt).timestamp() # naive -> local zone, DST-aware
137
+ except ValueError:
138
+ continue
139
+ raise ValueError(f"unparseable nvidia-smi timestamp {s!r}")
140
+
141
+
142
+ @dataclass(frozen=True)
143
+ class Sample:
144
+ printed: float # nvidia-smi's own timestamp, parsed as local time
145
+ arrival: float # time.time() when the line reached us
146
+ used: int # MiB
147
+ total: int # MiB
148
+ util: Optional[int]
149
+
150
+
151
+ def parse_sample_line(line: str, arrival: float) -> Optional[Sample]:
152
+ parts = [p.strip() for p in line.strip().split(",")]
153
+ if len(parts) != 4:
154
+ return None
155
+ try:
156
+ ts = parse_nvsmi_timestamp(parts[0])
157
+ used = int(parts[1])
158
+ total = int(parts[2])
159
+ except ValueError:
160
+ return None
161
+ try:
162
+ util: Optional[int] = int(parts[3])
163
+ except ValueError:
164
+ util = None
165
+ return Sample(printed=ts, arrival=arrival, used=used, total=total, util=util)
166
+
167
+
168
+ class GpuSampler:
169
+ """Runs nvidia-smi -lms N for the whole session, keeps every line verbatim in a raw
170
+ file, and serves per-window statistics. Restarts nvidia-smi if it dies and records
171
+ the gap through `on_event`."""
172
+
173
+ def __init__(self, nvsmi, raw_path: str, interval_ms: int = 500, gpu_index: int = 0,
174
+ on_event: Optional[Callable[[str, dict], None]] = None,
175
+ argv_override: Optional[list[str]] = None):
176
+ self.nvsmi = nvsmi
177
+ self.raw_path = raw_path
178
+ self.interval_ms = interval_ms
179
+ self.gpu_index = gpu_index
180
+ self.on_event = on_event or (lambda kind, data: None)
181
+ self.argv_override = argv_override
182
+ self._samples: list[Sample] = []
183
+ self._lock = threading.Lock()
184
+ self._stop = threading.Event()
185
+ self._proc: Optional[subprocess.Popen] = None
186
+ self._thread: Optional[threading.Thread] = None
187
+ self.restarts = 0
188
+ self.gave_up = False
189
+ self.unparsed_lines = 0
190
+
191
+ # ----- process management ---------------------------------------------------------
192
+ def _argv(self) -> list[str]:
193
+ if self.argv_override:
194
+ return list(self.argv_override)
195
+ argv = _cmd(self.nvsmi, [f"--query-gpu={STREAM_QUERY}", "--format=csv,noheader,nounits",
196
+ "-lms", str(self.interval_ms), "-i", str(self.gpu_index)])
197
+ if platform.system() == "Linux" and shutil.which("stdbuf"):
198
+ argv = ["stdbuf", "-oL"] + argv # ask for line buffering; wait_covered guards anyway
199
+ return argv
200
+
201
+ def start(self) -> None:
202
+ os.makedirs(os.path.dirname(self.raw_path) or ".", exist_ok=True)
203
+ self._spawn()
204
+ self._thread = threading.Thread(target=self._reader, name="nvidia-smi-reader", daemon=True)
205
+ self._thread.start()
206
+
207
+ def _spawn(self) -> None:
208
+ # stderr goes to a file: an unread stderr pipe can fill and block the child.
209
+ if getattr(self, "_stderr_f", None):
210
+ self._stderr_f.close()
211
+ self._stderr_f = open(self.raw_path + ".stderr.log", "a", encoding="utf-8")
212
+ self.argv_used = self._argv()
213
+ self._proc = subprocess.Popen(self.argv_used, stdout=subprocess.PIPE, stderr=self._stderr_f,
214
+ text=True, bufsize=1)
215
+
216
+ def _reader(self) -> None:
217
+ with open(self.raw_path, "a", encoding="utf-8", newline="") as raw:
218
+ while not self._stop.is_set():
219
+ proc = self._proc
220
+ assert proc is not None and proc.stdout is not None
221
+ for line in proc.stdout:
222
+ arrival = time.time()
223
+ raw.write(line if line.endswith("\n") else line + "\n")
224
+ raw.flush()
225
+ s = parse_sample_line(line, arrival)
226
+ if s is None:
227
+ self.unparsed_lines += 1
228
+ continue
229
+ with self._lock:
230
+ self._samples.append(s)
231
+ if self._stop.is_set():
232
+ break
233
+ if self._stop.is_set():
234
+ break
235
+ rc = proc.wait()
236
+ self.on_event("sampler_exit", {"rc": rc, "restarts": self.restarts,
237
+ "stderr_log": self.raw_path + ".stderr.log"})
238
+ if self.restarts >= 50:
239
+ self.gave_up = True # the run loop stops: no instrument, no measurement
240
+ self.on_event("sampler_gave_up", {"restarts": self.restarts})
241
+ return
242
+ self.restarts += 1
243
+ time.sleep(1.0)
244
+ try:
245
+ self._spawn()
246
+ self.on_event("sampler_restart", {"restarts": self.restarts})
247
+ except OSError as e:
248
+ self.on_event("sampler_restart_failed", {"error": str(e)})
249
+ return
250
+
251
+ def stop(self) -> None:
252
+ self._stop.set()
253
+ p = self._proc
254
+ if p and p.poll() is None:
255
+ p.terminate()
256
+ try:
257
+ p.wait(timeout=5)
258
+ except subprocess.TimeoutExpired:
259
+ p.kill()
260
+ if self._thread:
261
+ self._thread.join(timeout=5)
262
+ if getattr(self, "_stderr_f", None):
263
+ self._stderr_f.close()
264
+ self._stderr_f = None
265
+ if p and p.stdout:
266
+ p.stdout.close()
267
+
268
+ # ----- clock ----------------------------------------------------------------------
269
+ def clock_correction(self) -> tuple[float, str]:
270
+ """Seconds to ADD to a printed timestamp to put it on the harness clock. Estimated as the
271
+ minimum (arrival - printed) over the trailing 240 samples: the minimum is the line that
272
+ was flushed immediately; trailing, so one clock step does not become permanent."""
273
+ with self._lock:
274
+ recent = self._samples[-240:]
275
+ mo = min((x.arrival - x.printed for x in recent), default=None)
276
+ if mo is None:
277
+ return 0.0, "no samples yet"
278
+ if abs(mo) < 2.0:
279
+ return 0.0, f"same clock (min arrival-printed {mo:+.3f}s)"
280
+ q = round(mo / 900.0) * 900.0
281
+ if abs(mo - q) < 2.0:
282
+ return q, f"printed timestamps are {q:+.0f}s off the harness clock (zone mismatch); corrected"
283
+ return mo, (f"printed timestamps disagree with the harness clock by {mo:+.3f}s, not a zone "
284
+ f"offset; windows use arrival-aligned times")
285
+
286
+ def _aligned(self) -> list[tuple[float, Sample]]:
287
+ corr, _ = self.clock_correction()
288
+ with self._lock:
289
+ return [(s.printed + corr, s) for s in self._samples]
290
+
291
+ # ----- queries --------------------------------------------------------------------
292
+ def latest(self) -> Optional[tuple[float, Sample]]:
293
+ a = self._aligned()
294
+ return a[-1] if a else None
295
+
296
+ def wait_first_sample(self, timeout: float = 30.0) -> bool:
297
+ end = time.time() + timeout
298
+ while time.time() < end:
299
+ if self.latest() is not None:
300
+ return True
301
+ time.sleep(0.1)
302
+ return False
303
+
304
+ def wait_covered(self, t_end: float, timeout: float = 120.0) -> bool:
305
+ """Block until the trace holds a sample at or after t_end (harness clock)."""
306
+ deadline = time.time() + timeout
307
+ while time.time() < deadline:
308
+ last = self.latest()
309
+ if last is not None and last[0] >= t_end:
310
+ return True
311
+ time.sleep(0.1)
312
+ return False
313
+
314
+ def window(self, t0: float, t1: float) -> dict:
315
+ """Statistics for samples with t0 <= t <= t1 (harness clock)."""
316
+ pts = [(t, s) for t, s in self._aligned() if t0 <= t <= t1]
317
+ out: dict = {"n": len(pts), "t0": t0, "t1": t1}
318
+ if not pts:
319
+ out.update(peak_mib=None, max_gap_s=None, first_after_start_s=None, last_before_end_s=None)
320
+ return out
321
+ times = [t for t, _ in pts]
322
+ gaps = [b - a for a, b in zip(times, times[1:])]
323
+ out.update(
324
+ peak_mib=max(s.used for _, s in pts),
325
+ peak_at=max(pts, key=lambda p: p[1].used)[0],
326
+ min_mib=min(s.used for _, s in pts),
327
+ total_mib=pts[-1][1].total,
328
+ max_gap_s=max(gaps) if gaps else None,
329
+ first_after_start_s=times[0] - t0,
330
+ last_before_end_s=t1 - times[-1],
331
+ max_util=max((s.util for _, s in pts if s.util is not None), default=None),
332
+ )
333
+ return out
334
+
335
+ def last_before(self, t: float, max_age: Optional[float] = None) -> Optional[tuple[float, Sample]]:
336
+ """Newest sample at or before t; None if there is none, or if it is older than max_age
337
+ (a stale idle is worse than an empty cell)."""
338
+ cand = [(ts, s) for ts, s in self._aligned() if ts <= t]
339
+ if not cand:
340
+ return None
341
+ if max_age is not None and t - cand[-1][0] > max_age:
342
+ return None
343
+ return cand[-1]
344
+
345
+ def alive(self, max_silence_s: float = 30.0) -> bool:
346
+ with self._lock:
347
+ last = self._samples[-1].arrival if self._samples else None
348
+ return not self.gave_up and last is not None and time.time() - last <= max_silence_s
349
+
350
+ def wait_settled(self, since: float, window_s: float = 3.0, tol_mib: int = 64,
351
+ timeout: float = 90.0) -> dict:
352
+ """Wait until whole-card memory stops moving: every sample in the trailing
353
+ `window_s` within `tol_mib` of each other. Returns what it saw, settled or not."""
354
+ need = max(3, int(window_s * 1000 / self.interval_ms * 0.8))
355
+ deadline = time.time() + timeout
356
+ last: dict = {"settled": False}
357
+ while time.time() < deadline:
358
+ now_latest = self.latest()
359
+ if now_latest is not None:
360
+ t_last = now_latest[0]
361
+ pts = [s.used for t, s in self._aligned() if t >= max(since, t_last - window_s)]
362
+ if len(pts) >= need:
363
+ spread = max(pts) - min(pts)
364
+ last = {"settled": spread <= tol_mib, "spread_mib": spread,
365
+ "median_mib": int(statistics.median(pts)), "n": len(pts),
366
+ "waited_s": round(time.time() - since, 1)}
367
+ if last["settled"]:
368
+ return last
369
+ time.sleep(0.25)
370
+ last["timed_out"] = True
371
+ return last
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/outputs.py ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Read back what a run actually produced. A requested size is not the produced size
2
+ (templates snap sizes to multiples, frame counts to model grids, and a wired input
3
+ beats a stored widget), so width/height/frames/duration come from the file.
4
+
5
+ PNG is parsed natively (IHDR, and IEND to reject a truncated file). Video goes
6
+ through PyAV if importable, else ffprobe. If neither exists the harness refuses to
7
+ start a matrix that produces video, rather than writing rows with empty sizes.
8
+ """
9
+ from __future__ import annotations
10
+
11
+ import json
12
+ import os
13
+ import shutil
14
+ import struct
15
+ import subprocess
16
+ from fractions import Fraction
17
+ from typing import Optional
18
+
19
+ IMAGE_EXT = (".png", ".jpg", ".jpeg", ".webp")
20
+ VIDEO_EXT = (".mp4", ".webm", ".mkv", ".mov", ".gif")
21
+ AUDIO_EXT = (".flac", ".wav", ".mp3", ".ogg", ".opus")
22
+
23
+
24
+ class ProbeError(RuntimeError):
25
+ pass
26
+
27
+
28
+ def video_prober() -> Optional[str]:
29
+ try:
30
+ import av # noqa: F401
31
+ return "pyav"
32
+ except Exception:
33
+ pass
34
+ if shutil.which("ffprobe") or shutil.which("ffprobe.exe"):
35
+ return "ffprobe"
36
+ return None
37
+
38
+
39
+ def probe_png(path: str) -> dict:
40
+ with open(path, "rb") as f:
41
+ head = f.read(33)
42
+ if len(head) < 33 or head[:8] != b"\x89PNG\r\n\x1a\n" or head[12:16] != b"IHDR":
43
+ raise ProbeError("not a PNG (bad signature/IHDR)")
44
+ width, height = struct.unpack(">II", head[16:24])
45
+ f.seek(0, os.SEEK_END)
46
+ size = f.tell()
47
+ f.seek(max(0, size - 12))
48
+ tail = f.read(12)
49
+ if tail[4:8] != b"IEND":
50
+ raise ProbeError("PNG has no IEND chunk (truncated file)")
51
+ if width <= 0 or height <= 0:
52
+ raise ProbeError(f"PNG reports {width}x{height}")
53
+ return {"kind": "image", "width": width, "height": height, "frames": None, "duration_s": None,
54
+ "probe": "png-header", "bytes": size}
55
+
56
+
57
+ def _probe_video_pyav(path: str) -> dict:
58
+ import av
59
+ with av.open(path) as c:
60
+ if not c.streams.video:
61
+ raise ProbeError("no video stream")
62
+ vs = c.streams.video[0]
63
+ width, height = vs.codec_context.width, vs.codec_context.height
64
+ rate = vs.average_rate or vs.guessed_rate
65
+ stream_dur = float(vs.duration * vs.time_base) if vs.duration is not None and vs.time_base else None
66
+ has_audio = bool(c.streams.audio)
67
+ audio_dur = None
68
+ if has_audio:
69
+ a = c.streams.audio[0]
70
+ if a.duration is not None and a.time_base:
71
+ audio_dur = float(a.duration * a.time_base)
72
+ frames = 0
73
+ for _ in c.decode(video=0): # count what decodes, not what the header claims
74
+ frames += 1
75
+ header_frames = vs.frames or None
76
+ fps = float(rate) if rate else None
77
+ duration = stream_dur if stream_dur else (frames / fps if fps else None)
78
+ return {"kind": "video", "width": width, "height": height, "frames": frames, "header_frames": header_frames,
79
+ "fps": fps, "duration_s": duration, "has_audio": has_audio, "audio_duration_s": audio_dur,
80
+ "probe": "pyav"}
81
+
82
+
83
+ def _probe_video_ffprobe(path: str) -> dict:
84
+ exe = shutil.which("ffprobe") or shutil.which("ffprobe.exe")
85
+ cmd = [exe, "-v", "error", "-count_frames", "-show_entries",
86
+ "stream=codec_type,width,height,nb_read_frames,nb_frames,duration,avg_frame_rate,r_frame_rate",
87
+ "-of", "json", path]
88
+ p = subprocess.run(cmd, capture_output=True, text=True, timeout=600)
89
+ if p.returncode != 0:
90
+ raise ProbeError(f"ffprobe failed: {p.stderr.strip()[:300]}")
91
+ streams = json.loads(p.stdout).get("streams") or []
92
+ v = next((s for s in streams if s.get("codec_type") == "video"), None)
93
+ if not v:
94
+ raise ProbeError("no video stream")
95
+ a = next((s for s in streams if s.get("codec_type") == "audio"), None)
96
+ rate = v.get("avg_frame_rate") or v.get("r_frame_rate") or "0/1"
97
+ try:
98
+ fps = float(Fraction(rate)) if rate != "0/0" else None
99
+ except (ValueError, ZeroDivisionError):
100
+ fps = None
101
+ frames = int(v["nb_read_frames"]) if v.get("nb_read_frames", "").isdigit() else None
102
+ dur = float(v["duration"]) if v.get("duration") not in (None, "N/A") else None
103
+ if dur is None and frames and fps:
104
+ dur = frames / fps
105
+ return {"kind": "video", "width": int(v["width"]), "height": int(v["height"]), "frames": frames,
106
+ "header_frames": int(v["nb_frames"]) if str(v.get("nb_frames", "")).isdigit() else None,
107
+ "fps": fps, "duration_s": dur, "has_audio": a is not None,
108
+ "audio_duration_s": float(a["duration"]) if a and a.get("duration") not in (None, "N/A") else None,
109
+ "probe": "ffprobe"}
110
+
111
+
112
+ def probe_file(path: str) -> dict:
113
+ """Raise ProbeError if the file cannot be read as the output it claims to be."""
114
+ if not os.path.isfile(path) or os.path.getsize(path) == 0:
115
+ raise ProbeError("output file missing or empty")
116
+ ext = os.path.splitext(path)[1].lower()
117
+ if ext == ".png":
118
+ return probe_png(path)
119
+ if ext in VIDEO_EXT:
120
+ which = video_prober()
121
+ if which == "pyav":
122
+ info = _probe_video_pyav(path)
123
+ elif which == "ffprobe":
124
+ info = _probe_video_ffprobe(path)
125
+ else:
126
+ raise ProbeError("no video prober (install PyAV: pip install av, or put ffprobe on PATH)")
127
+ if not info.get("frames"):
128
+ raise ProbeError(f"video decodes to {info.get('frames')!r} frames")
129
+ info["bytes"] = os.path.getsize(path)
130
+ return info
131
+ if ext in IMAGE_EXT:
132
+ try:
133
+ from PIL import Image # optional
134
+ with Image.open(path) as im:
135
+ im.load()
136
+ return {"kind": "image", "width": im.width, "height": im.height, "frames": None,
137
+ "duration_s": None, "probe": "pillow", "bytes": os.path.getsize(path)}
138
+ except ImportError:
139
+ raise ProbeError(f"{ext} image and no Pillow to read it") from None
140
+ raise ProbeError(f"do not know how to read back a {ext} output")
141
+
142
+
143
+ def output_entries(history_outputs: dict) -> list[dict]:
144
+ """Every file ComfyUI reports in a history entry's outputs, with its node id.
145
+ SaveImage/PreviewImage and SaveVideo all report under lists of {filename, subfolder, type}."""
146
+ found = []
147
+ for nid, out in (history_outputs or {}).items():
148
+ if not isinstance(out, dict):
149
+ continue
150
+ for key, lst in out.items():
151
+ if not isinstance(lst, list):
152
+ continue
153
+ for e in lst:
154
+ if isinstance(e, dict) and "filename" in e:
155
+ found.append({"node": str(nid), "key": key, "filename": e["filename"],
156
+ "subfolder": e.get("subfolder", ""), "type": e.get("type", "output")})
157
+ return found
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/platform_util.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """OS facts and path translation.
2
+
3
+ ComfyUI on this rig runs natively on Windows. The harness may run on Windows (the
4
+ simple case) or inside WSL2. From WSL2, ComfyUI's Windows paths (D:\\ComfyUI\\models\\vae)
5
+ are reachable as /mnt/d/ComfyUI/models/vae through the drvfs mount.
6
+ """
7
+ from __future__ import annotations
8
+
9
+ import ctypes
10
+ import os
11
+ import platform
12
+ import re
13
+ import subprocess
14
+ import sys
15
+ from typing import Optional
16
+
17
+ _WIN_ABS = re.compile(r"^([A-Za-z]):[\\/](.*)$")
18
+
19
+
20
+ def is_windows() -> bool:
21
+ return sys.platform == "win32"
22
+
23
+
24
+ def is_wsl() -> bool:
25
+ if sys.platform != "linux":
26
+ return False
27
+ rel = platform.release().lower()
28
+ return "microsoft" in rel or "wsl" in rel or os.path.exists("/proc/sys/fs/binfmt_misc/WSLInterop")
29
+
30
+
31
+ def os_description() -> str:
32
+ if is_windows():
33
+ return f"Windows {platform.release()} ({platform.version()})"
34
+ if is_wsl():
35
+ distro = ""
36
+ try:
37
+ with open("/etc/os-release", encoding="utf-8") as f:
38
+ kv = dict(line.rstrip().split("=", 1) for line in f if "=" in line)
39
+ distro = kv.get("PRETTY_NAME", "").strip('"')
40
+ except OSError:
41
+ pass
42
+ return f"WSL2 {distro} (kernel {platform.release()})"
43
+ return f"{platform.system()} {platform.release()}"
44
+
45
+
46
+ def total_ram_bytes() -> Optional[int]:
47
+ """RAM of the OS the harness runs in (inside WSL2 this is the VM's share, not the host's)."""
48
+ try:
49
+ if is_windows():
50
+ class MEMORYSTATUSEX(ctypes.Structure):
51
+ _fields_ = [("dwLength", ctypes.c_ulong), ("dwMemoryLoad", ctypes.c_ulong),
52
+ ("ullTotalPhys", ctypes.c_ulonglong), ("ullAvailPhys", ctypes.c_ulonglong),
53
+ ("ullTotalPageFile", ctypes.c_ulonglong), ("ullAvailPageFile", ctypes.c_ulonglong),
54
+ ("ullTotalVirtual", ctypes.c_ulonglong), ("ullAvailVirtual", ctypes.c_ulonglong),
55
+ ("sullAvailExtendedVirtual", ctypes.c_ulonglong)]
56
+ st = MEMORYSTATUSEX()
57
+ st.dwLength = ctypes.sizeof(MEMORYSTATUSEX)
58
+ ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(st)) # type: ignore[attr-defined]
59
+ return int(st.ullTotalPhys)
60
+ if sys.platform == "linux":
61
+ with open("/proc/meminfo", encoding="utf-8") as f:
62
+ for line in f:
63
+ if line.startswith("MemTotal:"):
64
+ return int(line.split()[1]) * 1024
65
+ if sys.platform == "darwin":
66
+ out = subprocess.run(["sysctl", "-n", "hw.memsize"], capture_output=True, text=True).stdout
67
+ return int(out.strip())
68
+ except Exception:
69
+ return None
70
+ return None
71
+
72
+
73
+ def parse_path_maps(specs: list[str]) -> list[tuple[str, str]]:
74
+ """--path-map 'D:\\ComfyUI=/mnt/d/ComfyUI' (repeatable)."""
75
+ maps = []
76
+ for s in specs or []:
77
+ if "=" not in s:
78
+ raise ValueError(f"--path-map expects WIN=LOCAL, got {s!r}")
79
+ a, b = s.split("=", 1)
80
+ maps.append((a.rstrip("\\/"), b.rstrip("/")))
81
+ return maps
82
+
83
+
84
+ def to_local_path(path: str, maps: Optional[list[tuple[str, str]]] = None) -> str:
85
+ """Translate a path as ComfyUI reports it into one this process can open."""
86
+ if is_windows():
87
+ return path
88
+ for win, local in maps or []:
89
+ if path.lower().startswith(win.lower()):
90
+ rest = path[len(win):].lstrip("\\/").replace("\\", "/")
91
+ return f"{local}/{rest}" if rest else local
92
+ m = _WIN_ABS.match(path)
93
+ if m and (is_wsl() or os.path.isdir(f"/mnt/{m.group(1).lower()}")):
94
+ return f"/mnt/{m.group(1).lower()}/" + m.group(2).replace("\\", "/")
95
+ return path
96
+
97
+
98
+ def wsl_windows_host_ip() -> Optional[str]:
99
+ """The Windows host as seen from WSL2 NAT networking: the default gateway."""
100
+ try:
101
+ out = subprocess.run(["ip", "route", "show", "default"], capture_output=True, text=True, timeout=5).stdout
102
+ m = re.search(r"default via (\S+)", out)
103
+ return m.group(1) if m else None
104
+ except Exception:
105
+ return None
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/runner_common.py ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Pieces shared by comfy_measure.py and llama_measure.py."""
2
+ from __future__ import annotations
3
+
4
+ import hashlib
5
+ import json
6
+ import os
7
+ import sys
8
+ import time
9
+ from datetime import datetime, timezone
10
+ from typing import Any, Optional
11
+
12
+ from . import HARNESS_VERSION
13
+ from .gpu import (GpuSampler, display_attached_from, find_nvidia_smi, instrument_cmd,
14
+ nvidia_smi_full_report, query_static)
15
+ from .platform_util import is_windows, is_wsl, os_description, total_ram_bytes
16
+ from .spill import SharedMemMonitor
17
+
18
+ HARNESS_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19
+
20
+ # GPU catalogue slug -> substring the driver's name must contain. A config for one card
21
+ # must not produce rows on another.
22
+ GPU_NAME_MATCH = {
23
+ "rtx-5060-ti": "RTX 5060 Ti",
24
+ }
25
+
26
+ SPILL_THRESHOLD_MIB = 256
27
+ NEAR_FULL_MIB = 256
28
+
29
+
30
+ def utf8_stdio() -> None:
31
+ """On Windows, a piped stdout (Claude Code's shell, run_night.py) uses the ANSI code page;
32
+ one non-ASCII character in an exception message would then kill the run loop."""
33
+ for stream in (sys.stdout, sys.stderr):
34
+ try:
35
+ stream.reconfigure(encoding="utf-8", errors="replace")
36
+ except (AttributeError, ValueError):
37
+ pass
38
+
39
+
40
+ def say(msg: str = "") -> None:
41
+ print(msg, flush=True)
42
+
43
+
44
+ def utc_stamp() -> str:
45
+ return datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
46
+
47
+
48
+ def config_digest(cfg: dict) -> str:
49
+ return hashlib.sha256(json.dumps(cfg, sort_keys=True).encode("utf-8")).hexdigest()
50
+
51
+
52
+ def load_config(path: str) -> dict:
53
+ with open(path, encoding="utf-8") as f:
54
+ cfg = json.load(f)
55
+ for k in ("model_slug", "gpu_slug", "vertical", "runtime", "runs"):
56
+ if k not in cfg:
57
+ raise SystemExit(f"config {path}: missing '{k}'")
58
+ seen = set()
59
+ for r in cfg["runs"]:
60
+ n = r.get("run")
61
+ if not isinstance(n, int) or n < 1 or n in seen:
62
+ raise SystemExit(f"config {path}: every run needs a unique integer 'run' >= 1 (bad: {n!r})")
63
+ seen.add(n)
64
+ return cfg
65
+
66
+
67
+ def licence_gate_open(cfg: dict, harness_dir: str = HARNESS_DIR) -> tuple[bool, str]:
68
+ gate = cfg.get("licence_gate")
69
+ if not gate:
70
+ return True, "no licence gate"
71
+ ack = os.path.join(harness_dir, gate["ack_file"])
72
+ if os.path.isfile(ack):
73
+ return True, f"acknowledged by {ack}"
74
+ return False, (f"LICENCE GATE CLOSED for {cfg['model_slug']}: {gate['summary']} The site owner must create "
75
+ f"{ack} themselves. An unattended session must never create it.")
76
+
77
+
78
+ def check_gpu_identity(cfg: dict, name: str) -> Optional[str]:
79
+ want = GPU_NAME_MATCH.get(cfg["gpu_slug"])
80
+ if want and want.lower() not in name.lower():
81
+ return f"config is for {cfg['gpu_slug']} but the driver reports {name!r}"
82
+ return None
83
+
84
+
85
+ def resolve_display(static: dict, flag: Optional[str]) -> tuple[Optional[bool], str]:
86
+ detected, how = display_attached_from(static)
87
+ forced = None if flag in (None, "auto") else flag == "yes"
88
+ if forced is None:
89
+ return detected, how
90
+ if detected is not None and detected != forced:
91
+ return forced, f"--display-attached {flag} (nvidia-smi said {detected}: {how}; operator overrides)"
92
+ return forced, f"--display-attached {flag}" + (f" (agrees with {how})" if detected is not None else "")
93
+
94
+
95
+ FAKE_INSTRUMENT_ENV = "MHARNESS_NVIDIA_SMI_CMD"
96
+ FAKE_NOTE = "SELF-TEST FAKE INSTRUMENT, NOT A MEASUREMENT"
97
+
98
+
99
+ class Instruments:
100
+ def __init__(self, session, nvsmi_path: Optional[str], sample_ms: int, spill_enabled: bool,
101
+ display_flag: Optional[str], gpu_index: int = 0):
102
+ self.session = session
103
+ self.fake = bool(os.environ.get(FAKE_INSTRUMENT_ENV))
104
+ if self.fake:
105
+ # The self-test's fake nvidia-smi. Every row and session.json say so, loudly,
106
+ # so a fake trace can never be mistaken for a measurement.
107
+ nvsmi = json.loads(os.environ[FAKE_INSTRUMENT_ENV])
108
+ session.event("FAKE_INSTRUMENT", cmd=nvsmi)
109
+ else:
110
+ nvsmi = find_nvidia_smi(nvsmi_path)
111
+ if nvsmi is None:
112
+ raise SystemExit("nvidia-smi not found. It is the VRAM instrument; nothing can be measured without it.")
113
+ self.nvsmi = nvsmi
114
+ self.sample_ms = sample_ms
115
+ self.static = query_static(nvsmi, gpu_index)
116
+ self.display, self.display_how = resolve_display(self.static, display_flag)
117
+ stamp = utc_stamp()
118
+ with open(os.path.join(session.raw, f"nvidia-smi-q_{stamp}.txt"), "w", encoding="utf-8") as f:
119
+ f.write(nvidia_smi_full_report(nvsmi, gpu_index))
120
+ self.sampler = GpuSampler(nvsmi, os.path.join(session.raw, f"nvidia-smi_{stamp}.csv"), sample_ms, gpu_index,
121
+ on_event=lambda k, d: session.event(k, **d))
122
+ self.spill = SharedMemMonitor(os.path.join(session.raw, f"typeperf_{stamp}.csv"),
123
+ on_event=lambda k, d: session.event(k, **d))
124
+ self.spill_enabled = spill_enabled
125
+
126
+ def start(self) -> None:
127
+ self.sampler.start()
128
+ if not self.sampler.wait_first_sample(30):
129
+ raise SystemExit("nvidia-smi produced no samples within 30 s")
130
+ self.spill.start(self.spill_enabled)
131
+ corr, how = self.sampler.clock_correction()
132
+ self.session.event("instruments_started", sampler_clock=how, spill=self.spill.reason,
133
+ display=self.display, display_how=self.display_how)
134
+
135
+ def stop(self) -> None:
136
+ self.sampler.stop()
137
+ self.spill.stop()
138
+
139
+ @property
140
+ def gpu_name(self) -> str:
141
+ return self.static["name"]
142
+
143
+ @property
144
+ def driver(self) -> str:
145
+ return self.static["driver_version"]
146
+
147
+ @property
148
+ def vram_total_mib(self) -> int:
149
+ return int(self.static["memory.total"])
150
+
151
+ @property
152
+ def compute_capability(self) -> str:
153
+ return self.static["optional"].get("compute_cap") or ""
154
+
155
+ def instrument_description(self) -> str:
156
+ """The command that actually sampled, not the schema's example: it adds -i 0 (GPU index;
157
+ identical output on a one-GPU machine) and, on Linux, stdbuf -oL for line buffering."""
158
+ argv = getattr(self.sampler, "argv_used", None)
159
+ if not argv:
160
+ return instrument_cmd(self.sample_ms)
161
+ argv = list(argv)
162
+ exe = next((i for i, a in enumerate(argv) if "nvidia-smi" in os.path.basename(a)), None)
163
+ if exe is not None:
164
+ argv[exe] = "nvidia-smi"
165
+ if self.fake:
166
+ return "FAKE (self-test): " + " ".join(argv)
167
+ return " ".join(argv)
168
+
169
+
170
+ def window_notes(win: dict, sample_ms: int, vram_total: int, spill: tuple, covered: bool = True) -> list[str]:
171
+ """How well the run was seen. spill = (rise_mib or None, status) from SharedMemMonitor."""
172
+ notes = [FAKE_NOTE] if os.environ.get(FAKE_INSTRUMENT_ENV) else []
173
+ if win.get("n", 0) == 0:
174
+ notes.append("no VRAM samples inside the run window: peak not measured")
175
+ return notes
176
+ edge = 3 * sample_ms / 1000
177
+ if win.get("first_after_start_s") is not None and win["first_after_start_s"] > edge:
178
+ notes.append(f"VRAM trace starts {win['first_after_start_s']:.1f}s into the run window: an early peak may be missed")
179
+ if not covered or (win.get("last_before_end_s") is not None and win["last_before_end_s"] > edge):
180
+ notes.append(f"VRAM trace ends {win.get('last_before_end_s') or 0:.1f}s before the run window closed "
181
+ f"(sampler lagging or dead): a late peak may be missed")
182
+ if win.get("max_gap_s") and win["max_gap_s"] > edge:
183
+ notes.append(f"trace gap of {win['max_gap_s']:.1f}s inside the window: a short peak may be missed")
184
+ rise, status = spill
185
+ peak = win.get("peak_mib")
186
+ full = peak is not None and peak >= vram_total - NEAR_FULL_MIB
187
+ if status == "ok" and rise is not None and rise >= SPILL_THRESHOLD_MIB:
188
+ if full:
189
+ notes.append(f"shared GPU memory rose {rise} MiB while dedicated memory was full: sysmem fallback "
190
+ f"likely, so completing is not proof of fitting in VRAM")
191
+ else:
192
+ notes.append(f"shared GPU memory rose {rise} MiB but dedicated memory was never sampled full (pinned "
193
+ f"host buffers also count as shared): not attributed to fallback")
194
+ elif full and status == "ok":
195
+ notes.append(f"peak within {NEAR_FULL_MIB} MiB of total; shared GPU memory did not rise")
196
+ elif full:
197
+ notes.append(f"peak within {NEAR_FULL_MIB} MiB of total and spill is unknown for this run ({status}): on "
198
+ f"Windows the driver may have spilled to system RAM silently")
199
+ return notes
200
+
201
+
202
+ def stamp_fake(row: dict, ins: "Instruments") -> dict:
203
+ """Last step before a row is written: a fake instrument is named on the row itself."""
204
+ if ins.fake and FAKE_NOTE not in (row.get("notes") or ""):
205
+ row["notes"] = FAKE_NOTE + ("; " + row["notes"] if row.get("notes") else "")
206
+ return row
207
+
208
+
209
+ def environment_record(extra: dict) -> dict:
210
+ return {
211
+ "harness_version": HARNESS_VERSION,
212
+ "harness_python": sys.version,
213
+ "harness_os": os_description(),
214
+ "harness_is_wsl": is_wsl(),
215
+ "harness_is_windows": is_windows(),
216
+ "harness_ram_bytes": total_ram_bytes(),
217
+ "recorded_at": datetime.now(timezone.utc).isoformat(),
218
+ **extra,
219
+ }
220
+
221
+
222
+ def sleep_until(pred, timeout: float, step: float = 1.0) -> bool:
223
+ deadline = time.time() + timeout
224
+ while time.time() < deadline:
225
+ if pred():
226
+ return True
227
+ time.sleep(step)
228
+ return False
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/schema.py ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """The runs.csv / session.json contract (SCHEMA.md, schema v1).
2
+
3
+ This module is the ONLY place rows are formatted and written. Everything that
4
+ reaches runs.csv goes through `validate_row` first, so a row that breaks the
5
+ contract (a zero where "not measured" was meant, a float MiB, a failure reason on
6
+ a successful run) raises instead of being written.
7
+
8
+ Units: MiB integers straight from nvidia-smi (Principle 1). Nothing here converts.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import csv
13
+ import io
14
+ import json
15
+ import math
16
+ import os
17
+ import re
18
+ from datetime import datetime, timezone
19
+ from typing import Any, Iterable
20
+
21
+ SCHEMA_VERSION = 1
22
+
23
+ # Column order is part of the contract. Do not reorder.
24
+ RUNS_COLUMNS: list[str] = [
25
+ "session_id",
26
+ "run",
27
+ "measured_at",
28
+ "model_slug",
29
+ "gpu_slug",
30
+ "vertical",
31
+ "task",
32
+ "runtime",
33
+ "runtime_version",
34
+ "artifact",
35
+ "quantization",
36
+ "width",
37
+ "height",
38
+ "frames",
39
+ "steps",
40
+ "context_tokens",
41
+ "prompt_tokens",
42
+ "gen_tokens",
43
+ "output_seconds",
44
+ "config_json",
45
+ "cold_start",
46
+ "ok",
47
+ "failure",
48
+ "wall_s",
49
+ "prefill_tokens_per_s",
50
+ "gen_tokens_per_s",
51
+ "idle_device_mib",
52
+ "peak_device_mib",
53
+ "peak_process_mib",
54
+ "vram_total_mib",
55
+ "display_attached",
56
+ "gpu_name",
57
+ "driver",
58
+ "sample_ms",
59
+ "notes",
60
+ ]
61
+
62
+ INT_COLUMNS = {
63
+ "run", "width", "height", "frames", "steps", "context_tokens", "prompt_tokens",
64
+ "gen_tokens", "idle_device_mib", "peak_device_mib", "peak_process_mib",
65
+ "vram_total_mib", "sample_ms",
66
+ }
67
+ FLOAT_COLUMNS = {"output_seconds", "wall_s", "prefill_tokens_per_s", "gen_tokens_per_s"}
68
+ BOOL_COLUMNS = {"cold_start", "ok", "display_attached"}
69
+ JSON_COLUMNS = {"config_json"}
70
+ ISO_COLUMNS = {"measured_at"}
71
+ STR_COLUMNS = set(RUNS_COLUMNS) - INT_COLUMNS - FLOAT_COLUMNS - BOOL_COLUMNS - JSON_COLUMNS - ISO_COLUMNS
72
+
73
+ MIB_COLUMNS = {"idle_device_mib", "peak_device_mib", "peak_process_mib", "vram_total_mib"}
74
+
75
+ # Always filled, on every row, successful or not.
76
+ REQUIRED_COLUMNS = {
77
+ "session_id", "run", "measured_at", "model_slug", "gpu_slug", "vertical", "task",
78
+ "runtime", "runtime_version", "artifact", "config_json", "cold_start", "ok",
79
+ "vram_total_mib", "display_attached", "gpu_name", "driver", "sample_ms",
80
+ }
81
+
82
+ FAILURES = ("oom", "crash", "timeout", "invalid-output")
83
+ TASKS = ("t2i", "i2i", "t2v", "i2v", "llm", "t2m", "tts")
84
+ IMAGE_TASKS = ("t2i", "i2i")
85
+ VIDEO_TASKS = ("t2v", "i2v")
86
+ LLM_ONLY = ("context_tokens", "prompt_tokens", "gen_tokens", "prefill_tokens_per_s", "gen_tokens_per_s")
87
+
88
+ _ISO_RE = re.compile(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?Z$")
89
+ _SESSION_RE = re.compile(r"^\d{4}-\d{2}-\d{2}_[a-z0-9][a-z0-9.-]*_[a-z0-9][a-z0-9.-]*(_\d+)?$")
90
+
91
+
92
+ class SchemaError(ValueError):
93
+ """A row or session record that would break the contract."""
94
+
95
+
96
+ def utc_iso(ts: float) -> str:
97
+ """Epoch seconds -> ISO 8601 UTC with millisecond precision and a Z suffix."""
98
+ ms = int(math.floor(ts * 1000))
99
+ dt = datetime.fromtimestamp(ms // 1000, tz=timezone.utc)
100
+ return dt.strftime("%Y-%m-%dT%H:%M:%S") + f".{ms % 1000:03d}Z"
101
+
102
+
103
+ def _fmt_float(v: float) -> str:
104
+ # Enough precision to re-derive, no binary noise. wall_s comes from ms timestamps.
105
+ s = f"{v:.4f}".rstrip("0").rstrip(".")
106
+ return s if s else "0"
107
+
108
+
109
+ def format_cell(column: str, value: Any) -> str:
110
+ """Format one cell. None -> "" (not applicable / not measured). Never invents a zero."""
111
+ if value is None:
112
+ return ""
113
+ if column in BOOL_COLUMNS:
114
+ if not isinstance(value, bool):
115
+ raise SchemaError(f"{column}: expected bool, got {type(value).__name__} {value!r}")
116
+ return "true" if value else "false"
117
+ if column in INT_COLUMNS:
118
+ if isinstance(value, bool) or not isinstance(value, int):
119
+ # A float here means somebody converted. MiB are integers from nvidia-smi.
120
+ raise SchemaError(f"{column}: expected int, got {type(value).__name__} {value!r}")
121
+ return str(value)
122
+ if column in FLOAT_COLUMNS:
123
+ if isinstance(value, bool) or not isinstance(value, (int, float)):
124
+ raise SchemaError(f"{column}: expected float, got {type(value).__name__} {value!r}")
125
+ if not math.isfinite(float(value)):
126
+ raise SchemaError(f"{column}: non-finite value {value!r}")
127
+ return _fmt_float(float(value))
128
+ if column in JSON_COLUMNS:
129
+ if not isinstance(value, dict):
130
+ raise SchemaError(f"{column}: expected a dict to serialise, got {type(value).__name__}")
131
+ return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False)
132
+ if column in ISO_COLUMNS:
133
+ if not isinstance(value, str) or not _ISO_RE.match(value):
134
+ raise SchemaError(f"{column}: expected ISO 8601 UTC like 2026-09-11T22:04:05.123Z, got {value!r}")
135
+ return value
136
+ if not isinstance(value, str):
137
+ raise SchemaError(f"{column}: expected str, got {type(value).__name__} {value!r}")
138
+ if column == "notes":
139
+ return " ".join(value.split()) # one line
140
+ if "\n" in value or "\r" in value:
141
+ raise SchemaError(f"{column}: newline in a single-line field")
142
+ return value
143
+
144
+
145
+ def validate_row(row: dict[str, Any]) -> None:
146
+ """Raise SchemaError if the row violates the contract. Checks semantics, not just types."""
147
+ unknown = set(row) - set(RUNS_COLUMNS)
148
+ if unknown:
149
+ raise SchemaError(f"unknown columns: {sorted(unknown)}")
150
+ problems: list[str] = []
151
+ for col in RUNS_COLUMNS:
152
+ try:
153
+ format_cell(col, row.get(col))
154
+ except SchemaError as e:
155
+ problems.append(str(e))
156
+ for col in REQUIRED_COLUMNS:
157
+ v = row.get(col)
158
+ if v is None or v == "":
159
+ problems.append(f"{col}: required on every row")
160
+ if problems:
161
+ raise SchemaError("; ".join(problems))
162
+
163
+ if not _SESSION_RE.match(row["session_id"]):
164
+ problems.append(f"session_id {row['session_id']!r} is not <YYYY-MM-DD>_<model>_<gpu>[_n]")
165
+ if row["run"] < 1:
166
+ problems.append("run: starts at 1")
167
+ if row["task"] not in TASKS:
168
+ problems.append(f"task {row['task']!r} not in {TASKS}")
169
+
170
+ ok = row["ok"]
171
+ failure = row.get("failure")
172
+ if ok and failure not in (None, ""):
173
+ problems.append("failure must be empty when ok=true")
174
+ if not ok and failure not in FAILURES:
175
+ problems.append(f"ok=false needs failure in {FAILURES}, got {failure!r}")
176
+
177
+ # Empty-not-zero: a zero in a measurement column is almost always a missing value
178
+ # wearing a number's clothes. Anything that can legitimately be zero is not in here.
179
+ positive = ["run", "width", "height", "frames", "steps", "context_tokens", "prompt_tokens",
180
+ "gen_tokens", "idle_device_mib", "peak_device_mib", "peak_process_mib",
181
+ "vram_total_mib", "sample_ms", "wall_s", "output_seconds",
182
+ "prefill_tokens_per_s", "gen_tokens_per_s"]
183
+ for col in positive:
184
+ v = row.get(col)
185
+ if v is not None and v <= 0:
186
+ problems.append(f"{col}={v!r}: zero/negative is not a measurement — leave the cell empty")
187
+
188
+ task = row["task"]
189
+ if task != "llm":
190
+ for col in LLM_ONLY:
191
+ if row.get(col) is not None:
192
+ problems.append(f"{col} is LLM-only but task={task}")
193
+ if task == "llm":
194
+ for col in ("width", "height", "frames", "output_seconds"):
195
+ if row.get(col) is not None:
196
+ problems.append(f"{col} is not applicable to an LLM row")
197
+ if task in IMAGE_TASKS:
198
+ for col in ("frames", "output_seconds"):
199
+ if row.get(col) is not None:
200
+ problems.append(f"{col} is not applicable to an image row (task={task})")
201
+ if ok and task in VIDEO_TASKS:
202
+ for col in ("width", "height", "frames", "output_seconds"):
203
+ if row.get(col) is None:
204
+ problems.append(f"{col}: a successful video row must carry what the file says")
205
+ if ok and task in IMAGE_TASKS:
206
+ for col in ("width", "height"):
207
+ if row.get(col) is None:
208
+ problems.append(f"{col}: a successful image row must carry what the file says")
209
+
210
+ peak, idle, total = row.get("peak_device_mib"), row.get("idle_device_mib"), row.get("vram_total_mib")
211
+ if peak is not None and total is not None and peak > total:
212
+ problems.append(f"peak_device_mib {peak} > vram_total_mib {total}: instrument or unit error")
213
+ if idle is not None and total is not None and idle > total:
214
+ problems.append(f"idle_device_mib {idle} > vram_total_mib {total}")
215
+
216
+ if problems:
217
+ raise SchemaError("; ".join(problems))
218
+
219
+
220
+ def row_to_csv_line(row: dict[str, Any]) -> str:
221
+ validate_row(row)
222
+ buf = io.StringIO()
223
+ w = csv.writer(buf, lineterminator="\n")
224
+ w.writerow([format_cell(c, row.get(c)) for c in RUNS_COLUMNS])
225
+ return buf.getvalue()
226
+
227
+
228
+ class RunsCsv:
229
+ """A session's runs.csv. Appends one validated row at a time and fsyncs it,
230
+ so a crash at 4 a.m. loses at most the run that was in flight."""
231
+
232
+ def __init__(self, path: str):
233
+ self.path = path
234
+
235
+ def ensure_header(self) -> None:
236
+ if os.path.exists(self.path) and os.path.getsize(self.path) > 0:
237
+ with open(self.path, newline="", encoding="utf-8") as f:
238
+ header = next(csv.reader(f), None)
239
+ if header != RUNS_COLUMNS:
240
+ raise SchemaError(
241
+ f"{self.path} exists with a different header; refusing to append.\n"
242
+ f" found: {header}\n expected: {RUNS_COLUMNS}")
243
+ return
244
+ os.makedirs(os.path.dirname(self.path) or ".", exist_ok=True)
245
+ with open(self.path, "w", newline="", encoding="utf-8") as f:
246
+ csv.writer(f, lineterminator="\n").writerow(RUNS_COLUMNS)
247
+ f.flush()
248
+ os.fsync(f.fileno())
249
+
250
+ def append(self, row: dict[str, Any]) -> None:
251
+ line = row_to_csv_line(row) # validates
252
+ self.ensure_header()
253
+ with open(self.path, "a", newline="", encoding="utf-8") as f:
254
+ f.write(line)
255
+ f.flush()
256
+ os.fsync(f.fileno())
257
+
258
+ def rows(self) -> list[dict[str, str]]:
259
+ if not os.path.exists(self.path):
260
+ return []
261
+ with open(self.path, newline="", encoding="utf-8") as f:
262
+ return list(csv.DictReader(f))
263
+
264
+ def recorded_runs(self) -> set[int]:
265
+ out: set[int] = set()
266
+ for r in self.rows():
267
+ try:
268
+ out.add(int(r["run"]))
269
+ except (KeyError, ValueError):
270
+ continue
271
+ return out
272
+
273
+
274
+ def check_csv_file(path: str) -> list[str]:
275
+ """Re-read a written runs.csv and check it against the contract as text.
276
+ Used by the self-test and by `comfy_measure.py verify`."""
277
+ problems: list[str] = []
278
+ with open(path, newline="", encoding="utf-8") as f:
279
+ reader = csv.reader(f)
280
+ header = next(reader, None)
281
+ if header != RUNS_COLUMNS:
282
+ return [f"header mismatch: {header}"]
283
+ for lineno, cells in enumerate(reader, start=2):
284
+ if len(cells) != len(RUNS_COLUMNS):
285
+ problems.append(f"line {lineno}: {len(cells)} cells, expected {len(RUNS_COLUMNS)}")
286
+ continue
287
+ rec = dict(zip(RUNS_COLUMNS, cells))
288
+ for col in MIB_COLUMNS | (INT_COLUMNS - MIB_COLUMNS):
289
+ v = rec[col]
290
+ if v != "" and not re.fullmatch(r"-?\d+", v):
291
+ problems.append(f"line {lineno}: {col}={v!r} is not an integer")
292
+ for col in BOOL_COLUMNS:
293
+ if rec[col] not in ("true", "false", ""):
294
+ problems.append(f"line {lineno}: {col}={rec[col]!r} is not true/false")
295
+ for col in INT_COLUMNS | FLOAT_COLUMNS:
296
+ v = rec[col]
297
+ if v == "":
298
+ continue
299
+ try:
300
+ if float(v) == 0:
301
+ problems.append(f"line {lineno}: {col}=0 (empty-not-zero)")
302
+ except ValueError:
303
+ problems.append(f"line {lineno}: {col}={v!r} is not numeric")
304
+ if rec["config_json"]:
305
+ try:
306
+ if not isinstance(json.loads(rec["config_json"]), dict):
307
+ problems.append(f"line {lineno}: config_json is not an object")
308
+ except json.JSONDecodeError as e:
309
+ problems.append(f"line {lineno}: config_json does not parse: {e}")
310
+ if rec["ok"] == "true" and rec["failure"]:
311
+ problems.append(f"line {lineno}: ok=true with failure={rec['failure']!r}")
312
+ if rec["ok"] == "false" and rec["failure"] not in FAILURES:
313
+ problems.append(f"line {lineno}: ok=false with failure={rec['failure']!r}")
314
+ if "\n" in rec["notes"]:
315
+ problems.append(f"line {lineno}: notes spans lines")
316
+ return problems
317
+
318
+
319
+ def session_id_for(date_utc: str, model_slug: str, gpu_slug: str, existing: Iterable[str]) -> str:
320
+ """<YYYY-MM-DD>_<model>_<gpu>, with _2, _3 ... for a second session the same day."""
321
+ base = f"{date_utc}_{model_slug}_{gpu_slug}"
322
+ taken = set(existing)
323
+ if base not in taken:
324
+ return base
325
+ n = 2
326
+ while f"{base}_{n}" in taken:
327
+ n += 1
328
+ return f"{base}_{n}"
329
+
330
+
331
+ def new_session_json(*, session_id: str, gpu: dict, host: dict, display_attached: bool,
332
+ runtime: dict, sample_ms: int, instrument_cmd: str,
333
+ caveats: list[str]) -> dict:
334
+ """session.json exactly as SCHEMA.md lays it out. Top-level keys are the schema's;
335
+ bookkeeping lives in raw/state.json, not here."""
336
+ for k in ("slug", "name", "vram_total_mib", "driver", "compute_capability"):
337
+ if k not in gpu:
338
+ raise SchemaError(f"session.json gpu.{k} missing")
339
+ if not isinstance(gpu["vram_total_mib"], int):
340
+ raise SchemaError("gpu.vram_total_mib must be an int (MiB)")
341
+ return {
342
+ "schema_version": SCHEMA_VERSION,
343
+ "session_id": session_id,
344
+ "operator": "site operator, own hardware",
345
+ "gpu": {k: gpu[k] for k in ("slug", "name", "vram_total_mib", "driver", "compute_capability")},
346
+ "host": host,
347
+ "display_attached": display_attached,
348
+ "runtime": runtime,
349
+ "instrument": {"vram": instrument_cmd, "scope": "whole-card", "sample_ms": sample_ms},
350
+ "harness": "raw/harness/",
351
+ "caveats": [" ".join(c.split()) for c in caveats],
352
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/session.py ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Session directory, resume, attempts journal, event log.
2
+
3
+ Layout (SCHEMA.md):
4
+ <out_root>/sessions/<session_id>/
5
+ session.json runs.csv README.md
6
+ raw/ state.json events.jsonl attempts.jsonl nvidia-smi_*.csv runs/ outputs/ harness/ ...
7
+
8
+ Resume: a harness restarted after a crash finds the unfinished session for the same
9
+ (model, gpu, config digest) and skips runs already in runs.csv. A run that was started
10
+ but never recorded is retried once; if it is interrupted again the harness records it
11
+ as a failure with an honest note rather than looping on it all night.
12
+ """
13
+ from __future__ import annotations
14
+
15
+ import json
16
+ import os
17
+ import shutil
18
+ import time
19
+ from datetime import datetime, timezone
20
+ from typing import Any, Optional
21
+
22
+ from .schema import RunsCsv, session_id_for
23
+
24
+
25
+ def _now() -> float:
26
+ return time.time()
27
+
28
+
29
+ def _dump(path: str, obj: Any) -> None:
30
+ tmp = path + ".tmp"
31
+ with open(tmp, "w", encoding="utf-8") as f:
32
+ json.dump(obj, f, indent=2, ensure_ascii=False, default=str)
33
+ f.flush()
34
+ os.fsync(f.fileno())
35
+ os.replace(tmp, path)
36
+
37
+
38
+ class Session:
39
+ def __init__(self, out_root: str, session_id: str):
40
+ self.out_root = out_root
41
+ self.session_id = session_id
42
+ self.dir = os.path.join(out_root, "sessions", session_id)
43
+ self.raw = os.path.join(self.dir, "raw")
44
+ self.runs_csv = RunsCsv(os.path.join(self.dir, "runs.csv"))
45
+ self.state_path = os.path.join(self.raw, "state.json")
46
+ self.events_path = os.path.join(self.raw, "events.jsonl")
47
+ self.attempts_path = os.path.join(self.raw, "attempts.jsonl")
48
+ for d in (self.raw, os.path.join(self.raw, "runs"), os.path.join(self.raw, "outputs")):
49
+ os.makedirs(d, exist_ok=True)
50
+
51
+ # ----- open / resume --------------------------------------------------------------
52
+ RESUME_MAX_AGE_S = 36 * 3600 # a session is one sitting; an old unfinished one is not resumed
53
+
54
+ @classmethod
55
+ def open(cls, out_root: str, model_slug: str, gpu_slug: str, config_digest: str,
56
+ resume: bool = True, explicit_id: Optional[str] = None) -> tuple["Session", bool]:
57
+ sessions_dir = os.path.join(out_root, "sessions")
58
+ os.makedirs(sessions_dir, exist_ok=True)
59
+ if explicit_id:
60
+ s = cls(out_root, explicit_id)
61
+ st = s.state()
62
+ if st and st.get("config_digest") not in (None, config_digest):
63
+ raise RuntimeError(f"session {explicit_id} was run with a different config "
64
+ f"({st.get('config_digest')[:12]}), refusing to mix them")
65
+ return s, bool(st)
66
+ if resume:
67
+ cands = []
68
+ for name in sorted(os.listdir(sessions_dir)):
69
+ sp = os.path.join(sessions_dir, name, "raw", "state.json")
70
+ try:
71
+ with open(sp, encoding="utf-8") as f:
72
+ st = json.load(f)
73
+ except (OSError, json.JSONDecodeError):
74
+ continue
75
+ fresh = _now() - float(st.get("updated_ts") or 0) < cls.RESUME_MAX_AGE_S
76
+ if (st.get("model_slug"), st.get("gpu_slug"), st.get("config_digest")) == \
77
+ (model_slug, gpu_slug, config_digest) and st.get("status") != "finished" and fresh:
78
+ cands.append((st.get("created_at", ""), name))
79
+ if cands:
80
+ cands.sort()
81
+ return cls(out_root, cands[-1][1]), True
82
+ date = datetime.now(timezone.utc).strftime("%Y-%m-%d")
83
+ sid = session_id_for(date, model_slug, gpu_slug, os.listdir(sessions_dir))
84
+ s = cls(out_root, sid)
85
+ s.save_state(model_slug=model_slug, gpu_slug=gpu_slug, config_digest=config_digest,
86
+ status="in_progress", created_at=datetime.now(timezone.utc).isoformat())
87
+ return s, False
88
+
89
+ # ----- state ---------------------------------------------------------------------
90
+ def state(self) -> dict:
91
+ try:
92
+ with open(self.state_path, encoding="utf-8") as f:
93
+ return json.load(f)
94
+ except (OSError, json.JSONDecodeError):
95
+ return {}
96
+
97
+ def save_state(self, **kw: Any) -> None:
98
+ st = self.state()
99
+ st.update(kw)
100
+ st["updated_ts"] = _now()
101
+ _dump(self.state_path, st)
102
+
103
+ # ----- logs ----------------------------------------------------------------------
104
+ def event(self, kind: str, **data: Any) -> None:
105
+ rec = {"ts": _now(), "kind": kind, **data}
106
+ with open(self.events_path, "a", encoding="utf-8") as f:
107
+ f.write(json.dumps(rec, ensure_ascii=False, default=str) + "\n")
108
+ f.flush()
109
+ os.fsync(f.fileno())
110
+
111
+ def attempt(self, run: int, what: str, **data: Any) -> None:
112
+ rec = {"ts": _now(), "run": run, "what": what, **data}
113
+ with open(self.attempts_path, "a", encoding="utf-8") as f:
114
+ f.write(json.dumps(rec, ensure_ascii=False, default=str) + "\n")
115
+ f.flush()
116
+ os.fsync(f.fileno())
117
+
118
+ @staticmethod
119
+ def read_jsonl(path: str) -> list[dict]:
120
+ """Every decodable line. A power cut during an append leaves a torn or NUL-filled last
121
+ line; skipping it is what keeps resume working after exactly the crash it exists for."""
122
+ out = []
123
+ try:
124
+ with open(path, encoding="utf-8", errors="replace") as f:
125
+ for line in f:
126
+ line = line.strip().strip("\x00")
127
+ if not line:
128
+ continue
129
+ try:
130
+ rec = json.loads(line)
131
+ except json.JSONDecodeError:
132
+ continue
133
+ if isinstance(rec, dict):
134
+ out.append(rec)
135
+ except OSError:
136
+ pass
137
+ return out
138
+
139
+ def attempts(self) -> list[dict]:
140
+ return self.read_jsonl(self.attempts_path)
141
+
142
+ def events(self) -> list[dict]:
143
+ return self.read_jsonl(self.events_path)
144
+
145
+ def add_caveats(self, caveats: list[str]) -> list[str]:
146
+ """Merge this invocation's caveats into those of earlier invocations of the same
147
+ session (resume must not erase what an earlier part of the night found)."""
148
+ st = self.state()
149
+ merged = list(st.get("caveats") or [])
150
+ for c in caveats:
151
+ if c not in merged:
152
+ merged.append(c)
153
+ self.save_state(caveats=merged)
154
+ return merged
155
+
156
+ def interrupted_attempts(self, run: int) -> int:
157
+ """Starts with no matching end, for this run."""
158
+ n = 0
159
+ open_ = False
160
+ for a in self.attempts():
161
+ if a.get("run") != run:
162
+ continue
163
+ if a.get("what") == "start":
164
+ if open_:
165
+ n += 1
166
+ open_ = True
167
+ elif a.get("what") == "end":
168
+ open_ = False
169
+ return n + (1 if open_ else 0)
170
+
171
+ def our_prompt_ids(self) -> set[str]:
172
+ return {a["prompt_id"] for a in self.attempts() if a.get("prompt_id")}
173
+
174
+ def write_json(self, relpath: str, obj: Any) -> str:
175
+ p = os.path.join(self.dir, relpath)
176
+ os.makedirs(os.path.dirname(p), exist_ok=True)
177
+ _dump(p, obj)
178
+ return p
179
+
180
+ def copy_harness(self, harness_dir: str) -> None:
181
+ dest = os.path.join(self.raw, "harness")
182
+ if os.path.exists(dest):
183
+ # A resumed session already has a copy; keep both if the harness changed.
184
+ dest = os.path.join(self.raw, f"harness_{int(_now())}")
185
+ shutil.copytree(harness_dir, dest, ignore=shutil.ignore_patterns(
186
+ "__pycache__", "*.pyc", ".pytest_cache", "sessions", "models", ".smeltcore-staging", "*.gguf",
187
+ "*.safetensors",
188
+ # the operator's licence acknowledgement: an empty file attesting a per-machine act, not an
189
+ # input to any number; a copy in every session had to be stripped by hand before publishing
190
+ "ACK_LICENCE_*"))
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/spill.py ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Best-effort detector for Windows "sysmem fallback".
2
+
3
+ On Windows (WDDM) the NVIDIA driver, by default since 536.40, satisfies a CUDA
4
+ allocation that does not fit in VRAM from *shared system memory* instead of failing
5
+ it. The run then completes, slowly, and nvidia-smi's memory.used (dedicated memory)
6
+ simply sits near the card's total. A completed run is therefore NOT proof that a
7
+ configuration fits 16 GB on this OS unless we also know nothing spilled.
8
+
9
+ The only instrument for that on Windows is the performance counter
10
+ `\\GPU Adapter Memory(*)\\Shared Usage` (bytes). We stream it with typeperf.exe.
11
+ This is best effort by design:
12
+ * counter names are localised on non-English Windows, and typeperf then answers
13
+ "No valid counters" — we record that and carry on without it;
14
+ * typeperf's own timestamp format follows the locale, so we stamp lines on arrival
15
+ and widen each window by a tail to absorb pipe delay.
16
+ Whatever happens here never fails a run; it only adds a note and a caveat.
17
+ """
18
+ from __future__ import annotations
19
+
20
+ import csv
21
+ import os
22
+ import shutil
23
+ import subprocess
24
+ import threading
25
+ import time
26
+ from typing import Callable, Optional
27
+
28
+ COUNTERS = [r"\GPU Adapter Memory(*)\Shared Usage", r"\GPU Adapter Memory(*)\Dedicated Usage"]
29
+
30
+
31
+ def find_typeperf() -> Optional[str]:
32
+ for name in ("typeperf", "typeperf.exe"):
33
+ p = shutil.which(name)
34
+ if p:
35
+ return p
36
+ for c in (r"C:\Windows\System32\typeperf.exe", "/mnt/c/Windows/System32/typeperf.exe"):
37
+ if os.path.isfile(c):
38
+ return c
39
+ return None
40
+
41
+
42
+ class SharedMemMonitor:
43
+ def __init__(self, raw_path: str, on_event: Optional[Callable[[str, dict], None]] = None,
44
+ interval_s: int = 1):
45
+ self.raw_path = raw_path
46
+ self.on_event = on_event or (lambda k, d: None)
47
+ self.interval_s = interval_s
48
+ self.available = False
49
+ self.reason = "not started"
50
+ self._rows: list[tuple[float, float, float]] = [] # (arrival, shared_bytes, dedicated_bytes)
51
+ self._lock = threading.Lock()
52
+ self._proc: Optional[subprocess.Popen] = None
53
+ self._thread: Optional[threading.Thread] = None
54
+ self._header: Optional[list[str]] = None
55
+ self._stopping = False
56
+ self.dead_at: Optional[float] = None # typeperf exited on its own
57
+
58
+ def start(self, enabled: bool = True) -> None:
59
+ if not enabled:
60
+ self.reason = "disabled by flag"
61
+ return
62
+ tp = find_typeperf()
63
+ if not tp:
64
+ self.reason = "typeperf.exe not found (not Windows, or no WSL interop)"
65
+ return
66
+ os.makedirs(os.path.dirname(self.raw_path) or ".", exist_ok=True)
67
+ try:
68
+ self._proc = subprocess.Popen([tp, *COUNTERS, "-si", str(self.interval_s)],
69
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
70
+ text=True, bufsize=1, errors="replace")
71
+ except OSError as e:
72
+ self.reason = f"could not start typeperf: {e}"
73
+ return
74
+ self._thread = threading.Thread(target=self._reader, name="typeperf-reader", daemon=True)
75
+ self._thread.start()
76
+ # Give it a few seconds to either produce data or refuse the counters.
77
+ deadline = time.time() + 8
78
+ while time.time() < deadline:
79
+ with self._lock:
80
+ if self._rows:
81
+ self.available = True
82
+ self.reason = "streaming"
83
+ return
84
+ if self._proc.poll() is not None:
85
+ break
86
+ time.sleep(0.2)
87
+ if not self.available:
88
+ self.reason = self.reason if self.reason != "not started" else \
89
+ "typeperf produced no samples (localised counter names, or counters absent)"
90
+ self.stop()
91
+
92
+ def _reader(self) -> None:
93
+ assert self._proc and self._proc.stdout
94
+ with open(self.raw_path, "a", encoding="utf-8", newline="") as raw:
95
+ for line in self._proc.stdout:
96
+ arrival = time.time()
97
+ raw.write(line if line.endswith("\n") else line + "\n")
98
+ raw.flush()
99
+ s = line.strip()
100
+ if not s:
101
+ continue
102
+ if "No valid counters" in s or ("Error" in s and not s.startswith('"')):
103
+ self.reason = f"typeperf: {s[:200]}"
104
+ continue
105
+ try:
106
+ cells = next(csv.reader([s]))
107
+ except (csv.Error, StopIteration):
108
+ continue
109
+ if cells and cells[0].startswith("(PDH-CSV"):
110
+ self._header = cells
111
+ continue
112
+ if not self._header or len(cells) != len(self._header):
113
+ continue
114
+ shared = dedicated = 0.0
115
+ ok = False
116
+ for name, val in zip(self._header[1:], cells[1:]):
117
+ try:
118
+ v = float(val)
119
+ except ValueError:
120
+ continue
121
+ ok = True
122
+ if name.endswith("Shared Usage"):
123
+ shared += v
124
+ elif name.endswith("Dedicated Usage"):
125
+ dedicated += v
126
+ if ok:
127
+ with self._lock:
128
+ self._rows.append((arrival, shared, dedicated))
129
+ if not self._stopping:
130
+ self.dead_at = time.time()
131
+ self.on_event("spill_monitor_died", {"at": self.dead_at})
132
+
133
+ def stop(self) -> None:
134
+ self._stopping = True
135
+ p = self._proc
136
+ if p and p.poll() is None:
137
+ p.terminate()
138
+ try:
139
+ p.wait(timeout=5)
140
+ except subprocess.TimeoutExpired:
141
+ p.kill()
142
+
143
+ def shared_delta(self, t0: float, t1: float, wait_s: float = 5.0) -> tuple[Optional[int], str]:
144
+ """(rise of shared GPU memory in MiB, status). Rise = max over [t0, first row after t1]
145
+ minus the last row before t0, summed over adapters; bytes -> MiB here, at the point of
146
+ use. status is 'ok', or says why there is no number: a missing number must never read
147
+ as 'no spill'."""
148
+ if not self.available:
149
+ return None, f"not monitored ({self.reason})"
150
+ deadline = time.time() + wait_s
151
+ while time.time() < deadline:
152
+ with self._lock:
153
+ if self._rows and self._rows[-1][0] >= t1:
154
+ break
155
+ if self.dead_at is not None:
156
+ break
157
+ time.sleep(0.25)
158
+ with self._lock:
159
+ rows = list(self._rows)
160
+ before = [r for r in rows if r[0] <= t0]
161
+ after = [r for r in rows if r[0] >= t1]
162
+ if not before:
163
+ return None, "no shared-memory counter row before the run"
164
+ if not after:
165
+ why = f"typeperf stopped at {self.dead_at:.0f}" if self.dead_at else "counter lagging"
166
+ return None, f"no shared-memory counter row after the run ({why})"
167
+ end = after[0][0]
168
+ inside = [r for r in rows if t0 <= r[0] <= end]
169
+ return int((max(r[1] for r in inside) - before[-1][1]) // (1024 * 1024)), "ok"
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/ui2api.py ADDED
@@ -0,0 +1,492 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Conservative UI-format -> API-format converter.
2
+
3
+ What "Export (API)" does in the browser is `graphToPrompt` (ComfyUI_frontend
4
+ src/utils/executionUtil.ts) over LIVE litegraph nodes whose widgets were built in
5
+ JavaScript from /object_info plus whatever extensions are installed. A Python port can
6
+ only be faithful for the part of that behaviour it has actually verified. So this
7
+ converter handles a named subset and REFUSES everything else, with a message saying
8
+ what it met. It never guesses a widget mapping.
9
+
10
+ Ported and verified against frontend 1.55.3 (3d7c5d4, 2026-09-11):
11
+ * execution ids `outer:inner` for subgraph contents (ExecutableNodeDTO.id)
12
+ * link resolution through subgraph inputs/outputs, bypassed (mode 4) and muted
13
+ (mode 2) nodes, and Reroute (ExecutableNodeDTO.resolveInput / resolveOutput)
14
+ * widget layout: inputs in input_order (required, then optional); INT/FLOAT/STRING/
15
+ BOOLEAN/COMBO widgets; the extra control_after_generate widget (INT when the spec
16
+ says so or the input is named seed/noise_seed; FLOAT/COMBO when the spec says so),
17
+ which is saved in the workflow but never sent in the prompt; the IMAGEUPLOAD button
18
+ appended after a media combo; COMFY_DYNAMICCOMBO_V3 with sub-widgets named
19
+ `<parent>.<child>` inserted after the parent; RESOLUTION_PREVIEW (serialize:false)
20
+ * compressWidgetInputSlots: saved link target_slot indexes the compressed input
21
+ list, so links are resolved by link id and names, never by slot index
22
+ * the final pass that drops inputs linked to nodes that were not emitted
23
+
24
+ Strictness rules (each one is a refusal, not a warning):
25
+ * a node type that is neither installed, a subgraph, nor a known frontend-only node
26
+ * more saved widget values than the computed layout has widgets
27
+ * a value where a control_after_generate word must be and is not
28
+ * a saved named value that disagrees with the positional one
29
+ * a bypassed node whose pass-through input is ambiguous
30
+ * widget types the frontend renders with custom code we have not ported
31
+ Missing TRAILING values take the input's default and are reported, which is what the
32
+ frontend itself does when a node gained an input after the workflow was saved.
33
+ """
34
+ from __future__ import annotations
35
+
36
+ import json
37
+ from dataclasses import dataclass, field
38
+ from typing import Any, Optional
39
+
40
+ from .workflow import _spec_opts, _spec_type, combo_options, validate_api_prompt
41
+
42
+ MODE_ALWAYS, MODE_NEVER, MODE_BYPASS = 0, 2, 4
43
+ SUBGRAPH_INPUT_NODE, SUBGRAPH_OUTPUT_NODE = -10, -20
44
+
45
+ FRONTEND_ONLY_DROP = {"Note", "MarkdownNote", "Label (rgthree)", "Note Plus (mtb)"}
46
+ SIMPLE_WIDGETS = {"INT", "FLOAT", "STRING", "BOOLEAN", "COMBO"}
47
+ ZERO_VALUE_WIDGETS = {"RESOLUTION_PREVIEW"} # useResolutionPreviewWidget.ts: serialize=false
48
+ UNPORTED_WIDGETS = {"MARKDOWN", "IMAGEUPLOAD", "COLOR", "IMAGECOMPARE", "BOUNDING_BOX", "CHART",
49
+ "GALLERIA", "PAINTER", "COMPOSITOR", "TEXTAREA", "CURVE", "RANGE", "VIDEO_EDIT",
50
+ "BOUNDING_BOXES", "COLORS"}
51
+ SOCKET_ONLY_DYNAMIC = {"COMFY_AUTOGROW_V3", "COMFY_MATCHTYPE_V3"}
52
+ CONTROL_WORDS = {"fixed", "increment", "decrement", "randomize", "increment-wrap", "decrement-wrap"}
53
+ _MISSING = object()
54
+
55
+
56
+ class ConversionRefused(RuntimeError):
57
+ pass
58
+
59
+
60
+ @dataclass
61
+ class Link:
62
+ id: Any
63
+ origin_id: Any
64
+ origin_slot: int
65
+ target_id: Any
66
+ target_slot: int
67
+ type: Any
68
+
69
+
70
+ @dataclass
71
+ class Graph:
72
+ key: str # "root" or the subgraph uuid
73
+ nodes: dict # id -> serialized node
74
+ links: dict # link id -> Link
75
+ sg_inputs: list = field(default_factory=list)
76
+ sg_outputs: list = field(default_factory=list)
77
+
78
+
79
+ @dataclass
80
+ class DTO:
81
+ exec_id: str
82
+ node: dict
83
+ graph: Graph
84
+ path: tuple
85
+ wrapper: Optional["DTO"]
86
+
87
+
88
+ @dataclass
89
+ class Resolved:
90
+ origin: Optional[tuple] = None # (exec_id, slot)
91
+ value: Any = _MISSING # widget value when the link resolves to a promoted widget
92
+
93
+
94
+ def _parse_links(raw: Any) -> dict:
95
+ out = {}
96
+ for l in raw or []:
97
+ if isinstance(l, list):
98
+ if len(l) < 5:
99
+ raise ConversionRefused(f"malformed link {l!r}")
100
+ lk = Link(l[0], l[1], int(l[2]), l[3], int(l[4]), l[5] if len(l) > 5 else None)
101
+ elif isinstance(l, dict):
102
+ lk = Link(l["id"], l["origin_id"], int(l["origin_slot"]), l["target_id"], int(l["target_slot"]), l.get("type"))
103
+ else:
104
+ raise ConversionRefused(f"malformed link {l!r}")
105
+ out[lk.id] = lk
106
+ return out
107
+
108
+
109
+ def _types_compatible(a: Any, b: Any) -> bool:
110
+ if a in (None, "", "*") or b in (None, "", "*"):
111
+ return True
112
+ sa = {x.strip().upper() for x in str(a).split(",")}
113
+ sb = {x.strip().upper() for x in str(b).split(",")}
114
+ return bool(sa & sb) or "*" in sa or "*" in sb
115
+
116
+
117
+ class Converter:
118
+ def __init__(self, ui: dict, object_info: dict):
119
+ self.ui = ui
120
+ self.oi = object_info
121
+ self.report: dict = {"emitted": [], "dropped_frontend_only": [], "bypassed": [], "muted": [],
122
+ "defaulted_widgets": [], "named_crosschecks": 0, "warnings": []}
123
+ self.subgraphs: dict[str, dict] = {}
124
+ for sg in ((ui.get("definitions") or {}).get("subgraphs") or []):
125
+ self.subgraphs[sg["id"]] = sg
126
+ self.graphs: dict[str, Graph] = {"root": Graph("root", {n["id"]: n for n in ui.get("nodes", [])},
127
+ _parse_links(ui.get("links")))}
128
+ for sid, sg in self.subgraphs.items():
129
+ self.graphs[sid] = Graph(sid, {n["id"]: n for n in sg.get("nodes", [])}, _parse_links(sg.get("links")),
130
+ list(sg.get("inputs") or []), list(sg.get("outputs") or []))
131
+ self.dtos: dict[str, DTO] = {}
132
+ self._widget_cache: dict[str, dict] = {}
133
+ self._promoted_cache: dict[str, dict] = {}
134
+
135
+ # ----- classification --------------------------------------------------------------
136
+ def is_subgraph(self, node: dict) -> bool:
137
+ return node.get("type") in self.subgraphs
138
+
139
+ def is_virtual(self, node: dict) -> bool:
140
+ t = node.get("type")
141
+ return t in FRONTEND_ONLY_DROP or t in ("Reroute", "PrimitiveNode") or self.is_subgraph(node)
142
+
143
+ # ----- flattening ------------------------------------------------------------------
144
+ def build(self, graph: Graph, path: tuple, wrapper: Optional[DTO]) -> None:
145
+ if len(path) > 16:
146
+ raise ConversionRefused("subgraph nesting deeper than 16 levels")
147
+ for nid, node in graph.nodes.items():
148
+ exec_id = ":".join([*path, str(nid)])
149
+ dto = DTO(exec_id, node, graph, path, wrapper)
150
+ self.dtos[exec_id] = dto
151
+ if self.is_subgraph(node) and node.get("mode", 0) not in (MODE_NEVER, MODE_BYPASS):
152
+ self.build(self.graphs[node["type"]], (*path, str(nid)), dto)
153
+
154
+ # ----- link resolution (port of ExecutableNodeDTO) --------------------------------
155
+ def resolve_input(self, dto: DTO, inp: dict, visited: set) -> Optional[Resolved]:
156
+ link_id = inp.get("link")
157
+ if link_id is None:
158
+ return None
159
+ key = (dto.exec_id, "I", inp.get("name"))
160
+ if key in visited:
161
+ raise ConversionRefused(f"circular link resolution at {dto.exec_id}.{inp.get('name')}")
162
+ visited.add(key)
163
+ link = dto.graph.links.get(link_id)
164
+ if link is None:
165
+ raise ConversionRefused(f"node {dto.exec_id} input {inp.get('name')!r} references missing link {link_id}")
166
+ if dto.wrapper is not None and link.origin_id == SUBGRAPH_INPUT_NODE:
167
+ sgi = dto.graph.sg_inputs
168
+ if not (0 <= link.origin_slot < len(sgi)):
169
+ raise ConversionRefused(f"subgraph input slot {link.origin_slot} out of range in {dto.graph.key}")
170
+ name = sgi[link.origin_slot]["name"]
171
+ w = dto.wrapper
172
+ winp = next((i for i in (w.node.get("inputs") or []) if i.get("name") == name), None)
173
+ if winp is not None and winp.get("link") is not None:
174
+ return self.resolve_input(w, winp, visited)
175
+ promoted = self.promoted_values(w)
176
+ if name in promoted:
177
+ return Resolved(value=promoted[name])
178
+ return None
179
+ origin = dto.graph.nodes.get(link.origin_id)
180
+ if origin is None:
181
+ raise ConversionRefused(f"link {link_id} into {dto.exec_id} comes from missing node {link.origin_id}")
182
+ odto = self.dtos[":".join([*dto.path, str(link.origin_id)])]
183
+ return self.resolve_output(odto, link.origin_slot, inp.get("type"), visited)
184
+
185
+ def resolve_output(self, dto: DTO, slot: int, want_type: Any, visited: set) -> Optional[Resolved]:
186
+ key = (dto.exec_id, "O", slot)
187
+ if key in visited:
188
+ raise ConversionRefused(f"circular link resolution at output {slot} of {dto.exec_id}")
189
+ visited.add(key)
190
+ node = dto.node
191
+ mode = node.get("mode", 0)
192
+ if mode == MODE_NEVER:
193
+ return None
194
+ if mode == MODE_BYPASS:
195
+ idx = self._bypass_input(dto, slot, want_type)
196
+ if idx is None:
197
+ return None
198
+ return self.resolve_input(dto, node["inputs"][idx], visited)
199
+ if self.is_subgraph(node):
200
+ g = self.graphs[node["type"]]
201
+ if not (0 <= slot < len(g.sg_outputs)):
202
+ raise ConversionRefused(f"subgraph {node['type']} has no output {slot}")
203
+ ids = g.sg_outputs[slot].get("linkIds") or []
204
+ inner = [g.links[i] for i in ids if i in g.links and g.links[i].target_id == SUBGRAPH_OUTPUT_NODE]
205
+ if not inner:
206
+ return None
207
+ if len(inner) > 1:
208
+ raise ConversionRefused(f"subgraph output {slot} of {dto.exec_id} has {len(inner)} inner links")
209
+ lk = inner[0]
210
+ idto = self.dtos[f"{dto.exec_id}:{lk.origin_id}"]
211
+ return self.resolve_output(idto, lk.origin_slot, want_type, visited)
212
+ t = node.get("type")
213
+ if t == "Reroute":
214
+ ins = node.get("inputs") or []
215
+ return self.resolve_input(dto, ins[0], visited) if ins else None
216
+ if t == "PrimitiveNode":
217
+ # applyToGraph has already written its value into the target widget, and its
218
+ # output link resolves to nothing: the target's own widget value stands.
219
+ return None
220
+ if t in FRONTEND_ONLY_DROP:
221
+ return None
222
+ return Resolved(origin=(dto.exec_id, slot))
223
+
224
+ def _bypass_input(self, dto: DTO, slot: int, want_type: Any) -> Optional[int]:
225
+ # The frontend (ExecutableNodeDTO._getBypassSlotIndex) tries the same live slot first,
226
+ # then an exact type, then the first compatible input, linked or not. A saved workflow
227
+ # does not preserve live slot indices, so we accept only the unambiguous case: exactly
228
+ # one compatible input overall. If that input is unlinked, the output resolves to nothing.
229
+ ins = dto.node.get("inputs") or []
230
+ outs = dto.node.get("outputs") or []
231
+ out_type = outs[slot].get("type") if slot < len(outs) else None
232
+ cands = [i for i, x in enumerate(ins)
233
+ if _types_compatible(x.get("type"), out_type) and _types_compatible(x.get("type"), want_type)]
234
+ if not cands:
235
+ return None
236
+ if len(cands) == 1 and ins[cands[0]].get("link") is None:
237
+ return None
238
+ if len(cands) > 1:
239
+ raise ConversionRefused(
240
+ f"bypassed node {dto.exec_id} ({dto.node.get('type')}) has {len(cands)} inputs that could pass "
241
+ f"output {slot} through; the frontend picks by live slot index, which a saved workflow does "
242
+ f"not preserve. Export this workflow via the UI instead.")
243
+ return cands[0]
244
+
245
+ # ----- widgets ---------------------------------------------------------------------
246
+ def promoted_values(self, wdto: DTO) -> dict:
247
+ if wdto.exec_id in self._promoted_cache:
248
+ return self._promoted_cache[wdto.exec_id]
249
+ node = wdto.node
250
+ g = self.graphs[node["type"]]
251
+ widget_inputs = []
252
+ for sgi in g.sg_inputs:
253
+ has_widget = False
254
+ for lid in sgi.get("linkIds") or []:
255
+ lk = g.links.get(lid)
256
+ if lk is None:
257
+ continue
258
+ tn = g.nodes.get(lk.target_id)
259
+ if tn is None:
260
+ continue
261
+ tin = next((i for i in (tn.get("inputs") or []) if i.get("link") == lid), None)
262
+ if tin is not None and tin.get("widget"):
263
+ has_widget = True
264
+ if has_widget:
265
+ widget_inputs.append(sgi["name"])
266
+ pos = node.get("widgets_values")
267
+ named = node.get("widgets_values_named") or {}
268
+ vals: dict = {}
269
+ if isinstance(pos, list) and len(pos) == len(widget_inputs):
270
+ vals = dict(zip(widget_inputs, pos))
271
+ for k, v in named.items():
272
+ if k in vals and not _same(vals[k], v):
273
+ raise ConversionRefused(f"subgraph node {wdto.exec_id}: promoted widget {k} is {vals[k]!r} "
274
+ f"positionally but {v!r} by name")
275
+ self.report["named_crosschecks"] += 1 if k in vals else 0
276
+ elif named and all(k in named for k in widget_inputs):
277
+ vals = {k: named[k] for k in widget_inputs}
278
+ else:
279
+ raise ConversionRefused(
280
+ f"subgraph node {wdto.exec_id}: {len(pos) if isinstance(pos, list) else 'no'} saved widget values "
281
+ f"for {len(widget_inputs)} promoted widgets {widget_inputs}, and no complete named map")
282
+ self._promoted_cache[wdto.exec_id] = vals
283
+ return vals
284
+
285
+ def widget_values(self, dto: DTO) -> dict:
286
+ """API-visible widget values of a regular node, from its saved widgets_values."""
287
+ if dto.exec_id in self._widget_cache:
288
+ return self._widget_cache[dto.exec_id]
289
+ node = dto.node
290
+ ct = node["type"]
291
+ info = self.oi[ct]
292
+ saved = node.get("widgets_values")
293
+ named = node.get("widgets_values_named") or {}
294
+ api: dict = {}
295
+ defaulted: list[str] = []
296
+ workflow_only: dict = {}
297
+
298
+ if isinstance(saved, dict):
299
+ # Some extensions save widgets by name (e.g. VideoHelperSuite). Names are exact.
300
+ named = {**saved, **named}
301
+ saved = None
302
+ values = list(saved) if isinstance(saved, list) else []
303
+ cursor = {"i": 0}
304
+ by_name_mode = saved is None and bool(named)
305
+
306
+ def take(name: str, spec: Any) -> Any:
307
+ if by_name_mode:
308
+ if name in named:
309
+ return named[name]
310
+ defaulted.append(name)
311
+ return _default_for(spec)
312
+ i = cursor["i"]
313
+ cursor["i"] += 1
314
+ if i < len(values):
315
+ return values[i]
316
+ d = _default_for(spec)
317
+ if name in named and not _same(named[name], d):
318
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): widget {name} has no positional value; its "
319
+ f"named value {named[name]!r} differs from the default {d!r}")
320
+ defaulted.append(name)
321
+ return d
322
+
323
+ def take_aux(label: str, check=None) -> None:
324
+ if by_name_mode:
325
+ return
326
+ i = cursor["i"]
327
+ cursor["i"] += 1
328
+ if i >= len(values):
329
+ return
330
+ if check is not None and not check(values[i]):
331
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): expected a {label} value at position {i}, "
332
+ f"found {values[i]!r}; the widget layout is not what this converter "
333
+ f"computed. Export via the UI instead.")
334
+ workflow_only[f"#{i}:{label}"] = values[i]
335
+
336
+ def walk_dynamic(name: str, spec: Any) -> None:
337
+ v = take(name, spec)
338
+ options = _spec_opts(spec).get("options") or []
339
+ chosen = next((o for o in options if o.get("key") == v), None)
340
+ if chosen is None:
341
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): {name}={v!r} is not an option "
342
+ f"{[o.get('key') for o in options]}")
343
+ api[name] = v
344
+ for section in ("required", "optional"):
345
+ for sub, sspec in ((chosen.get("inputs") or {}).get(section) or {}).items():
346
+ one(f"{name}.{sub}", sspec)
347
+
348
+ def one(name: str, spec: Any) -> None:
349
+ t = _spec_type(spec)
350
+ ts = t if isinstance(t, str) else None # a list means an inline combo
351
+ opts = _spec_opts(spec)
352
+ if opts.get("forceInput"):
353
+ return
354
+ if ts in ZERO_VALUE_WIDGETS:
355
+ return
356
+ if ts == "COMFY_DYNAMICCOMBO_V3":
357
+ walk_dynamic(name, spec)
358
+ return
359
+ if ts in SOCKET_ONLY_DYNAMIC:
360
+ return
361
+ if isinstance(t, list) or ts in SIMPLE_WIDGETS:
362
+ api[name] = take(name, spec)
363
+ v = api[name]
364
+ if opts.get("dynamicPrompts") and isinstance(v, str) and ("{" in v or "//" in v or "/*" in v):
365
+ # The frontend rewrites these before queueing ({a|b} is a random choice,
366
+ # comments are stripped); the API would send them raw. Not reproducible.
367
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): {name} uses dynamic-prompt syntax "
368
+ f"({{...}} or comments) that the browser resolves before queueing")
369
+ is_combo = isinstance(t, list) or ts == "COMBO"
370
+ cag = opts.get("control_after_generate", _MISSING)
371
+ if t == "INT":
372
+ control = bool(cag) if cag is not _MISSING else name in ("seed", "noise_seed")
373
+ else:
374
+ control = cag is not _MISSING and bool(cag)
375
+ if control:
376
+ take_aux("control_after_generate", lambda x: isinstance(x, str) and x in CONTROL_WORDS)
377
+ if is_combo and (opts.get("video_upload") or opts.get("audio_upload") or
378
+ opts.get("animated_image_upload")):
379
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): media-upload combo {name} is not ported")
380
+ return
381
+ if ts in UNPORTED_WIDGETS:
382
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): input {name} is a {t} widget, which this "
383
+ f"converter does not port")
384
+ # anything else is a socket (MODEL, CLIP, IMAGE, LATENT, custom types ...)
385
+
386
+ inputs = info.get("input") or {}
387
+ order = info.get("input_order") or {s: list((inputs.get(s) or {}).keys()) for s in ("required", "optional")}
388
+ media_upload_after = None
389
+ for section in ("required", "optional"):
390
+ for name in order.get(section) or []:
391
+ spec = (inputs.get(section) or {}).get(name)
392
+ if spec is None:
393
+ continue
394
+ one(name, spec)
395
+ if section == "required" and _spec_opts(spec).get("image_upload"):
396
+ media_upload_after = name
397
+ if section == "required" and media_upload_after is not None:
398
+ # uploadImage.ts appends required.upload (an IMAGEUPLOAD button, saved, never sent)
399
+ take_aux("upload", lambda x: isinstance(x, str))
400
+
401
+ if not by_name_mode and cursor["i"] < len(values):
402
+ raise ConversionRefused(
403
+ f"node {dto.exec_id} ({ct}): {len(values)} saved widget values but the computed layout consumes "
404
+ f"{cursor['i']}; the installed node's inputs differ from the saved workflow, or an extension adds "
405
+ f"widgets. Export via the UI instead.")
406
+ for k, v in named.items():
407
+ if k in api and not by_name_mode:
408
+ self.report["named_crosschecks"] += 1
409
+ if not _same(api[k], v):
410
+ raise ConversionRefused(f"node {dto.exec_id} ({ct}): widget {k} is {api[k]!r} positionally "
411
+ f"but {v!r} by name")
412
+ if defaulted:
413
+ self.report["defaulted_widgets"].append({"node": dto.exec_id, "class_type": ct, "widgets": defaulted})
414
+ self._widget_cache[dto.exec_id] = api
415
+ return api
416
+
417
+ # ----- driver ------------------------------------------------------------------------
418
+ def convert(self) -> dict:
419
+ self.build(self.graphs["root"], (), None)
420
+ out: dict = {}
421
+ for exec_id, dto in self.dtos.items():
422
+ node = dto.node
423
+ t = node.get("type")
424
+ mode = node.get("mode", 0)
425
+ if mode == MODE_NEVER:
426
+ self.report["muted"].append(exec_id)
427
+ continue
428
+ if mode == MODE_BYPASS:
429
+ self.report["bypassed"].append(exec_id)
430
+ continue
431
+ if self.is_virtual(node):
432
+ if not self.is_subgraph(node):
433
+ self.report["dropped_frontend_only"].append(f"{exec_id} ({t})")
434
+ continue
435
+ if mode != MODE_ALWAYS:
436
+ raise ConversionRefused(f"node {exec_id} ({t}) has mode {mode}, which is not ported")
437
+ if t not in self.oi:
438
+ raise ConversionRefused(f"node {exec_id} has type {t!r}, which is not installed in this ComfyUI "
439
+ f"and is not a subgraph or frontend-only node")
440
+ inputs = dict(self.widget_values(dto))
441
+ for inp in node.get("inputs") or []:
442
+ if inp.get("link") is None:
443
+ continue
444
+ r = self.resolve_input(dto, inp, set())
445
+ if r is None:
446
+ continue
447
+ if r.value is not _MISSING:
448
+ v = r.value
449
+ inputs[inp["name"]] = {"__value__": v} if isinstance(v, list) else v
450
+ else:
451
+ inputs[inp["name"]] = [r.origin[0], r.origin[1]]
452
+ out[exec_id] = {"inputs": inputs, "class_type": t, "_meta": {"title": node.get("title") or t}}
453
+ self.report["emitted"].append(exec_id)
454
+ for nid, n in out.items():
455
+ for k, v in list(n["inputs"].items()):
456
+ if isinstance(v, list) and len(v) == 2 and v[0] not in out:
457
+ del n["inputs"][k]
458
+ self.report["warnings"].append(f"{nid}.{k}: removed link to non-emitted node {v[0]}")
459
+ return out
460
+
461
+
462
+ def _default_for(spec: Any) -> Any:
463
+ opts = _spec_opts(spec)
464
+ if "default" in opts:
465
+ return opts["default"]
466
+ combo = combo_options(spec)
467
+ if combo:
468
+ return combo[0]
469
+ if _spec_type(spec) == "COMFY_DYNAMICCOMBO_V3":
470
+ o = opts.get("options") or []
471
+ return o[0].get("key") if o else None
472
+ t = _spec_type(spec)
473
+ return {"INT": 0, "FLOAT": 0.0, "BOOLEAN": False, "STRING": ""}.get(t) if isinstance(t, str) else None
474
+
475
+
476
+ def _same(a: Any, b: Any) -> bool:
477
+ if isinstance(a, bool) or isinstance(b, bool):
478
+ return a is b or a == b and type(a) is type(b)
479
+ if isinstance(a, (int, float)) and isinstance(b, (int, float)):
480
+ return float(a) == float(b)
481
+ return json.dumps(a, sort_keys=True) == json.dumps(b, sort_keys=True)
482
+
483
+
484
+ def convert_ui_to_api(ui: dict, object_info: dict) -> tuple[dict, dict]:
485
+ """Returns (api_prompt, report). Raises ConversionRefused when it cannot be faithful.
486
+ The report includes structural validation of the result against object_info."""
487
+ conv = Converter(ui, object_info)
488
+ api = conv.convert()
489
+ v = validate_api_prompt(api, object_info)
490
+ conv.report["validation_errors"] = v.errors
491
+ conv.report["validation_warnings"] = v.warnings
492
+ return api, conv.report
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/weights.py ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Which weight files a run needs, which are present, and how to get the rest.
2
+
3
+ Presence is decided by ComfyUI itself: a file is present if it is among the values
4
+ /object_info offers for the loader input that names it — exactly the list
5
+ validate_prompt checks against. Size (and optionally SHA-256) is verified on disk when
6
+ this process can reach ComfyUI's model folders (natively on Windows, or /mnt/<drive>
7
+ from WSL2).
8
+
9
+ Downloads are a dry run unless --execute is given. Real downloads go into a staging
10
+ directory on the destination drive and are then moved into place ONLY if no file of
11
+ that name exists. This module never deletes, moves or overwrites a file it did not
12
+ just download.
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import hashlib
17
+ import json
18
+ import os
19
+ import shutil
20
+ import time
21
+ import urllib.parse
22
+ import urllib.request
23
+ from dataclasses import dataclass, field
24
+ from typing import Any, Callable, Optional
25
+
26
+ from .platform_util import to_local_path
27
+ from .workflow import LOADER_INPUTS, combo_options, model_references, node_input_specs
28
+
29
+ GIB = 1024 ** 3
30
+ STAGING_DIRNAME = ".smeltcore-staging"
31
+
32
+
33
+ @dataclass
34
+ class WeightSpec:
35
+ filename: str # as the workflow names it (and ComfyUI lists it)
36
+ repo: str # Hugging Face repo id
37
+ path: str # path inside the repo
38
+ folder: str # ComfyUI folder type: diffusion_models, text_encoders, vae, loras ...
39
+ revision: str = "main"
40
+ size: Optional[int] = None # bytes, expected
41
+ sha256: Optional[str] = None
42
+ quantization: Optional[str] = None
43
+ dest_basename: Optional[str] = None # prefer the folder root with this basename (e.g. "unet")
44
+ source: str = "" # where the config author got repo/path from
45
+ gated_note: str = ""
46
+
47
+ @property
48
+ def artifact(self) -> str:
49
+ # "repo:path_in_repo", the format the existing dataset table already uses
50
+ # (e.g. realrebelai/LTX-2.5_GGUFs:LTX-2.5-Distilled-Q3_K_M.gguf). Revision and SHA-256
51
+ # travel in config_json.
52
+ return f"{self.repo}:{self.path}"
53
+
54
+
55
+ def weight_specs(config: dict) -> dict[str, WeightSpec]:
56
+ out = {}
57
+ for fname, w in (config.get("weights") or {}).items():
58
+ out[fname] = WeightSpec(filename=fname, repo=w["repo"], path=w["path"], folder=w["folder"],
59
+ revision=w.get("revision", "main"), size=w.get("size"), sha256=w.get("sha256"),
60
+ quantization=w.get("quantization"), dest_basename=w.get("dest_basename"),
61
+ source=w.get("source", ""), gated_note=w.get("gated_note", ""))
62
+ return out
63
+
64
+
65
+ @dataclass
66
+ class Presence:
67
+ spec: WeightSpec
68
+ listed: bool # ComfyUI offers it for the loader input
69
+ local_path: Optional[str] = None # where this process found it
70
+ local_size: Optional[int] = None
71
+ status: str = "missing" # present-verified | present-size-mismatch | present-unverified | missing
72
+ detail: str = ""
73
+ sha256_ok: Optional[bool] = None
74
+
75
+
76
+ def listed_filenames(object_info: dict) -> dict[str, set]:
77
+ """folder type -> filenames ComfyUI currently offers, read from loader combos."""
78
+ out: dict[str, set] = {}
79
+ for ct, inputs in LOADER_INPUTS.items():
80
+ info = object_info.get(ct)
81
+ if not info:
82
+ continue
83
+ specs = node_input_specs(info)
84
+ for inp, folder in inputs.items():
85
+ if inp in specs:
86
+ opts = combo_options(specs[inp][1]) or []
87
+ out.setdefault(folder, set()).update(str(o) for o in opts)
88
+ return out
89
+
90
+
91
+ def find_on_disk(spec: WeightSpec, folder_paths: dict, path_maps=None) -> Optional[str]:
92
+ for root in folder_paths.get(spec.folder) or []:
93
+ p = os.path.join(to_local_path(root, path_maps), *spec.filename.replace("\\", "/").split("/"))
94
+ if os.path.isfile(p):
95
+ return p
96
+ return None
97
+
98
+
99
+ def sha256_file(path: str, progress: Optional[Callable[[int], None]] = None) -> str:
100
+ h = hashlib.sha256()
101
+ done = 0
102
+ with open(path, "rb") as f:
103
+ while True:
104
+ b = f.read(16 * 1024 * 1024)
105
+ if not b:
106
+ break
107
+ h.update(b)
108
+ done += len(b)
109
+ if progress:
110
+ progress(done)
111
+ return h.hexdigest()
112
+
113
+
114
+ def check_presence(specs: dict[str, WeightSpec], object_info: dict, folder_paths: Optional[dict],
115
+ path_maps=None, verify_sha256: bool = False) -> dict[str, Presence]:
116
+ listed = listed_filenames(object_info)
117
+ out = {}
118
+ for fname, spec in specs.items():
119
+ pr = Presence(spec=spec, listed=fname in listed.get(spec.folder, set()))
120
+ local = find_on_disk(spec, folder_paths or {}, path_maps) if folder_paths else None
121
+ if local:
122
+ pr.local_path = local
123
+ pr.local_size = os.path.getsize(local)
124
+ if pr.listed or local:
125
+ if local is None:
126
+ pr.status = "present-unverified"
127
+ pr.detail = "ComfyUI lists it, but this process cannot see ComfyUI's model folders to check its size"
128
+ elif spec.size is not None and pr.local_size != spec.size:
129
+ pr.status = "present-size-mismatch"
130
+ pr.detail = (f"{pr.local_size} bytes on disk vs {spec.size} expected from {spec.repo}@{spec.revision}: "
131
+ f"not the artifact the config names (or truncated). Left untouched.")
132
+ else:
133
+ pr.status = "present-verified" if spec.size is not None else "present-unverified"
134
+ pr.detail = "size matches" if spec.size is not None else "no expected size in config"
135
+ if verify_sha256 and spec.sha256 and local:
136
+ pr.sha256_ok = sha256_file(local) == spec.sha256
137
+ if not pr.sha256_ok:
138
+ pr.status = "present-size-mismatch"
139
+ pr.detail = "size matches but SHA-256 does not: a different file with the same size"
140
+ if not pr.listed:
141
+ pr.detail += "; NOT listed by ComfyUI for its loader (wrong folder? ComfyUI needs a refresh?)"
142
+ out[fname] = pr
143
+ return out
144
+
145
+
146
+ def required_files(prompts: dict[str, dict], specs: dict[str, WeightSpec]) -> tuple[set[str], list[str]]:
147
+ """Files the given prompts reference, and problems (a referenced file the config
148
+ has no source for, or a file whose folder disagrees with the config)."""
149
+ need: set[str] = set()
150
+ problems = []
151
+ for label, prompt in prompts.items():
152
+ for ref in model_references(prompt):
153
+ fn = ref["filename"]
154
+ if fn not in specs:
155
+ problems.append(f"workflow {label}: node {ref['node']} ({ref['class_type']}) references {fn!r}, "
156
+ f"which the config's 'weights' does not source")
157
+ continue
158
+ if ref["folder"] and ref["folder"] != specs[fn].folder:
159
+ problems.append(f"workflow {label}: {fn} is loaded from folder {ref['folder']!r} but the config "
160
+ f"puts it in {specs[fn].folder!r}")
161
+ need.add(fn)
162
+ return need, problems
163
+
164
+
165
+ # ----- Hugging Face metadata (stdlib, so the dry run needs no extra package) ---------------
166
+ def hf_paths_info(repo: str, paths: list[str], revision: str = "main", token: Optional[str] = None) -> dict:
167
+ url = f"https://huggingface.co/api/models/{repo}/paths-info/{urllib.parse.quote(revision, safe='')}"
168
+ data = urllib.parse.urlencode([("paths", p) for p in paths] + [("expand", "true")]).encode()
169
+ req = urllib.request.Request(url, data=data, method="POST")
170
+ if token:
171
+ req.add_header("Authorization", f"Bearer {token}")
172
+ with urllib.request.urlopen(req, timeout=60) as r:
173
+ items = json.load(r)
174
+ return {i["path"]: {"size": i.get("size"), "sha256": (i.get("lfs") or {}).get("oid")} for i in items}
175
+
176
+
177
+ def hf_token() -> Optional[str]:
178
+ t = os.environ.get("HF_TOKEN") or os.environ.get("HUGGING_FACE_HUB_TOKEN")
179
+ if t:
180
+ return t
181
+ for p in (os.path.expanduser("~/.cache/huggingface/token"), os.path.expanduser("~/.huggingface/token")):
182
+ try:
183
+ with open(p, encoding="utf-8") as f:
184
+ return f.read().strip() or None
185
+ except OSError:
186
+ continue
187
+ return None
188
+
189
+
190
+ @dataclass
191
+ class DownloadItem:
192
+ spec: WeightSpec
193
+ dest_dir: str
194
+ staging_dir: str
195
+ size: Optional[int]
196
+ sha256: Optional[str]
197
+ notes: list = field(default_factory=list)
198
+
199
+
200
+ def choose_dest_dir(spec: WeightSpec, folder_paths: dict, path_maps=None) -> Optional[str]:
201
+ roots = [to_local_path(r, path_maps) for r in (folder_paths.get(spec.folder) or [])]
202
+ if not roots:
203
+ return None
204
+ pref = spec.dest_basename or spec.folder
205
+ for r in roots:
206
+ if os.path.basename(r.rstrip("/\\")).lower() == pref.lower():
207
+ return r
208
+ return roots[0]
209
+
210
+
211
+ def plan_downloads(missing: list[WeightSpec], folder_paths: dict, path_maps=None,
212
+ check_remote: bool = True) -> tuple[list[DownloadItem], list[str]]:
213
+ items, problems = [], []
214
+ tok = hf_token()
215
+ for spec in missing:
216
+ dest = choose_dest_dir(spec, folder_paths, path_maps)
217
+ if dest is None:
218
+ problems.append(f"{spec.filename}: ComfyUI reports no folder for type {spec.folder!r}")
219
+ continue
220
+ models_root = os.path.dirname(dest.rstrip("/\\"))
221
+ staging = os.path.join(models_root, STAGING_DIRNAME, f"{spec.repo.replace('/', '__')}@{spec.revision[:12]}")
222
+ size, sha = spec.size, spec.sha256
223
+ it = DownloadItem(spec, dest, staging, size, sha)
224
+ if check_remote:
225
+ try:
226
+ meta = hf_paths_info(spec.repo, [spec.path], spec.revision, tok).get(spec.path)
227
+ except Exception as e:
228
+ meta = None
229
+ problems.append(f"{spec.filename}: cannot read {spec.repo}@{spec.revision} metadata: {e} "
230
+ f"(gated repo? offline?)")
231
+ if meta is None:
232
+ problems.append(f"{spec.filename}: {spec.path} not found in {spec.repo}@{spec.revision}")
233
+ else:
234
+ if size is not None and meta["size"] != size:
235
+ problems.append(f"{spec.filename}: the repo now has {meta['size']} bytes, the config expects "
236
+ f"{size}. The file changed upstream; the config pins a revision for a reason.")
237
+ if sha and meta.get("sha256") and meta["sha256"] != sha:
238
+ problems.append(f"{spec.filename}: upstream SHA-256 differs from the config's")
239
+ it.size = size if size is not None else meta["size"]
240
+ it.sha256 = sha or meta.get("sha256")
241
+ if os.path.exists(os.path.join(dest, spec.filename)):
242
+ problems.append(f"{spec.filename}: already exists at {os.path.join(dest, spec.filename)}; "
243
+ f"will not download over it")
244
+ continue
245
+ items.append(it)
246
+ return items, problems
247
+
248
+
249
+ def disk_check(items: list[DownloadItem], margin_bytes: int = 10 * GIB) -> list[str]:
250
+ by_dev: dict[Any, list] = {}
251
+ problems = []
252
+ for it in items:
253
+ probe = it.dest_dir
254
+ while probe and not os.path.exists(probe):
255
+ probe = os.path.dirname(probe)
256
+ try:
257
+ dev = os.stat(probe).st_dev
258
+ by_dev.setdefault(dev, [probe, 0])[1] += it.size or 0
259
+ except OSError as e:
260
+ problems.append(f"cannot stat {it.dest_dir}: {e}")
261
+ for dev, (probe, need) in by_dev.items():
262
+ free = shutil.disk_usage(probe).free
263
+ if free < need + margin_bytes:
264
+ problems.append(f"{probe}: {free / GIB:.1f} GiB free, need {need / GIB:.1f} GiB + "
265
+ f"{margin_bytes / GIB:.0f} GiB margin")
266
+ return problems
267
+
268
+
269
+ def execute_download(it: DownloadItem, verify_sha256: bool = True, log=print) -> str:
270
+ """Download one file into staging, verify it, move it into place without overwriting.
271
+ Returns the final path. Raises on any mismatch, leaving the staging copy for a human."""
272
+ try:
273
+ from huggingface_hub import hf_hub_download
274
+ except ImportError:
275
+ raise RuntimeError("huggingface_hub is not installed: python -m pip install -U huggingface_hub") from None
276
+ final = os.path.join(it.dest_dir, it.spec.filename)
277
+ if os.path.exists(final):
278
+ raise RuntimeError(f"{final} exists; refusing to overwrite")
279
+ os.makedirs(it.staging_dir, exist_ok=True)
280
+ last_err = None
281
+ for attempt in range(1, 4):
282
+ try:
283
+ log(f" downloading {it.spec.repo}/{it.spec.path}@{it.spec.revision} -> staging (attempt {attempt})")
284
+ got = hf_hub_download(repo_id=it.spec.repo, filename=it.spec.path, revision=it.spec.revision,
285
+ local_dir=it.staging_dir)
286
+ break
287
+ except Exception as e: # network hiccup: hf_hub_download resumes .incomplete files
288
+ last_err = e
289
+ log(f" attempt {attempt} failed: {e}")
290
+ time.sleep(10 * attempt)
291
+ else:
292
+ raise RuntimeError(f"download failed after 3 attempts: {last_err}")
293
+ size = os.path.getsize(got)
294
+ if it.size is not None and size != it.size:
295
+ raise RuntimeError(f"{got}: {size} bytes, expected {it.size}; left in staging")
296
+ if verify_sha256 and it.sha256:
297
+ log(f" verifying SHA-256 of {size / GIB:.2f} GiB ...")
298
+ digest = sha256_file(got)
299
+ if digest != it.sha256:
300
+ raise RuntimeError(f"{got}: SHA-256 {digest} != expected {it.sha256}; left in staging")
301
+ os.makedirs(it.dest_dir, exist_ok=True)
302
+ if os.path.exists(final):
303
+ raise RuntimeError(f"{final} appeared while downloading; refusing to overwrite. Staging copy: {got}")
304
+ try:
305
+ os.link(got, final) # fails if final exists: no overwrite possible
306
+ os.unlink(got) # our own staging copy, not a user file
307
+ except OSError:
308
+ if os.path.exists(final):
309
+ raise RuntimeError(f"{final} exists; refusing to overwrite. Staging copy: {got}") from None
310
+ os.rename(got, final) # same drive: atomic; Windows rename also refuses to overwrite
311
+ log(f" placed {final}")
312
+ return final
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/mharness/workflow.py ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """API-format workflows: load, validate against /object_info, override, verify.
2
+
3
+ The failure this module exists to prevent: an override that silently does nothing.
4
+ A config that sets `width=1344` on a node id that does not exist, or on an input that
5
+ is fed by a link, would otherwise run the unmodified workflow and record a row that
6
+ looks like a 1344-wide run. So every override must land on an existing node and an
7
+ existing input, may not replace a link unless the config says so explicitly, is
8
+ type-checked (and step-checked) against the live node schema, must sit on a node that
9
+ actually feeds the output in that run (`overrides_that_change_nothing`), and is re-read
10
+ from the prompt ComfyUI stored (`/history/{id}` -> prompt) after submission, which catches
11
+ ComfyUI-side rewrites (POST /prompt applies node replacements before validating).
12
+ """
13
+ from __future__ import annotations
14
+
15
+ import copy
16
+ import hashlib
17
+ import json
18
+ from dataclasses import dataclass, field
19
+ from typing import Any, Optional
20
+
21
+
22
+ class WorkflowError(RuntimeError):
23
+ pass
24
+
25
+
26
+ MODEL_EXTENSIONS = (".safetensors", ".gguf", ".ckpt", ".pt", ".pth", ".bin", ".sft")
27
+
28
+ # Which input of which loader names a file in which ComfyUI folder type. Read from
29
+ # nodes.py (core) and city96/ComfyUI-GGUF nodes.py.
30
+ LOADER_INPUTS: dict[str, dict[str, str]] = {
31
+ "UNETLoader": {"unet_name": "diffusion_models"},
32
+ "UnetLoaderGGUF": {"unet_name": "diffusion_models"},
33
+ "UnetLoaderGGUFAdvanced": {"unet_name": "diffusion_models"},
34
+ "CLIPLoader": {"clip_name": "text_encoders"},
35
+ "CLIPLoaderGGUF": {"clip_name": "text_encoders"},
36
+ "DualCLIPLoader": {"clip_name1": "text_encoders", "clip_name2": "text_encoders"},
37
+ "VAELoader": {"vae_name": "vae"},
38
+ "LoraLoaderModelOnly": {"lora_name": "loras"},
39
+ "LoraLoader": {"lora_name": "loras"},
40
+ "CheckpointLoaderSimple": {"ckpt_name": "checkpoints"},
41
+ }
42
+
43
+
44
+ def load_json(path: str) -> Any:
45
+ with open(path, encoding="utf-8") as f:
46
+ return json.load(f)
47
+
48
+
49
+ def is_link(v: Any) -> bool:
50
+ return isinstance(v, list) and len(v) == 2 and isinstance(v[0], (str, int)) and isinstance(v[1], int) \
51
+ and not isinstance(v[1], bool)
52
+
53
+
54
+ def is_ui_format(obj: Any) -> bool:
55
+ return isinstance(obj, dict) and isinstance(obj.get("nodes"), list) and "links" in obj
56
+
57
+
58
+ def is_api_format(obj: Any) -> bool:
59
+ if not isinstance(obj, dict) or not obj or is_ui_format(obj):
60
+ return False
61
+ return all(isinstance(v, dict) and "class_type" in v and isinstance(v.get("inputs"), dict)
62
+ for v in obj.values())
63
+
64
+
65
+ def load_api_workflow(path: str) -> dict:
66
+ obj = load_json(path)
67
+ if is_ui_format(obj):
68
+ raise WorkflowError(
69
+ f"{path} is a UI-format workflow (it has 'nodes' and 'links'). POST /prompt needs API "
70
+ f"format. Convert it with `comfy_measure.py convert` or have a human use Export (API).")
71
+ if not is_api_format(obj):
72
+ raise WorkflowError(f"{path} is not an API-format workflow (expected {{node_id: {{class_type, inputs}}}}).")
73
+ # Keys must be strings; ComfyUI's own format uses strings ("3", "140:131").
74
+ return {str(k): v for k, v in obj.items()}
75
+
76
+
77
+ def prompt_digest(prompt: dict) -> str:
78
+ canon = json.dumps({k: {"class_type": v["class_type"], "inputs": v["inputs"]} for k, v in prompt.items()},
79
+ sort_keys=True, separators=(",", ":"))
80
+ return hashlib.sha256(canon.encode("utf-8")).hexdigest()
81
+
82
+
83
+ def strip_meta(prompt: dict) -> dict:
84
+ return {k: {"class_type": v["class_type"], "inputs": v["inputs"]} for k, v in prompt.items()}
85
+
86
+
87
+ # ----- node-schema helpers ----------------------------------------------------------------
88
+ def _spec_type(spec: Any) -> Any:
89
+ return spec[0] if isinstance(spec, (list, tuple)) and spec else spec
90
+
91
+
92
+ def _spec_opts(spec: Any) -> dict:
93
+ if isinstance(spec, (list, tuple)) and len(spec) > 1 and isinstance(spec[1], dict):
94
+ return spec[1]
95
+ return {}
96
+
97
+
98
+ def combo_options(spec: Any) -> Optional[list]:
99
+ t = _spec_type(spec)
100
+ if isinstance(t, list):
101
+ return t
102
+ if t == "COMBO":
103
+ return list(_spec_opts(spec).get("options") or [])
104
+ return None
105
+
106
+
107
+ def node_input_specs(info: dict) -> dict[str, tuple[str, Any]]:
108
+ """name -> ("required"|"optional", spec) for the node's visible inputs."""
109
+ out: dict[str, tuple[str, Any]] = {}
110
+ inputs = info.get("input") or {}
111
+ for section in ("required", "optional"):
112
+ for name, spec in (inputs.get(section) or {}).items():
113
+ out[name] = (section, spec)
114
+ return out
115
+
116
+
117
+ def check_literal(name: str, spec: Any, value: Any) -> Optional[str]:
118
+ """None if `value` is acceptable for `spec`; otherwise a reason."""
119
+ t = _spec_type(spec)
120
+ opts = _spec_opts(spec)
121
+ combo = combo_options(spec)
122
+ if combo is not None:
123
+ if value not in combo:
124
+ shown = combo if len(combo) <= 12 else combo[:12] + ["..."]
125
+ return f"{name}={value!r} is not one of the available values {shown}"
126
+ return None
127
+ if t == "INT":
128
+ if isinstance(value, bool) or not isinstance(value, (int, float)) or \
129
+ (isinstance(value, float) and not value.is_integer()):
130
+ return f"{name}={value!r} is not an INT"
131
+ elif t == "FLOAT":
132
+ if isinstance(value, bool) or not isinstance(value, (int, float)):
133
+ return f"{name}={value!r} is not a FLOAT"
134
+ elif t == "BOOLEAN":
135
+ if not isinstance(value, bool):
136
+ return f"{name}={value!r} is not a BOOLEAN"
137
+ elif t == "STRING":
138
+ if not isinstance(value, str):
139
+ return f"{name}={value!r} is not a STRING"
140
+ else:
141
+ return None # socket types and dynamic types are checked elsewhere
142
+ if t in ("INT", "FLOAT"):
143
+ mn, mx = opts.get("min"), opts.get("max")
144
+ if mn is not None and value < mn:
145
+ return f"{name}={value} is below the node's min {mn}"
146
+ if mx is not None and value > mx:
147
+ return f"{name}={value} is above the node's max {mx}"
148
+ return None
149
+
150
+
151
+ def _check_dynamic_combo(node_id: str, inputs: dict, name: str, spec: Any, errors: list[str]) -> set[str]:
152
+ """Validate a COMFY_DYNAMICCOMBO_V3 input and its selected option's sub-inputs.
153
+ API format names sub-inputs '<parent>.<child>' (comfy_api/latest/_io.py finalize_prefix,
154
+ and the frontend's dynamicWidgets.ts: name = `${widget.name}.${key}`). Returns the
155
+ input keys it accounted for."""
156
+ seen = {name}
157
+ if name not in inputs:
158
+ return seen
159
+ val = inputs[name]
160
+ if is_link(val):
161
+ return seen
162
+ options = _spec_opts(spec).get("options") or []
163
+ keys = [o.get("key") for o in options]
164
+ if val not in keys:
165
+ errors.append(f"node {node_id}: {name}={val!r} not in {keys}")
166
+ return seen
167
+ chosen = next(o for o in options if o.get("key") == val)
168
+ for section in ("required", "optional"):
169
+ for sub, sspec in ((chosen.get("inputs") or {}).get(section) or {}).items():
170
+ full = f"{name}.{sub}"
171
+ seen.add(full)
172
+ if _spec_type(sspec) == "COMFY_DYNAMICCOMBO_V3":
173
+ seen |= _check_dynamic_combo(node_id, inputs, full, sspec, errors)
174
+ if section == "required" and full not in inputs:
175
+ errors.append(f"node {node_id}: required dynamic input {full} missing")
176
+ continue
177
+ if full not in inputs:
178
+ if section == "required":
179
+ errors.append(f"node {node_id}: required input {full} missing")
180
+ continue
181
+ if not is_link(inputs[full]):
182
+ r = check_literal(full, sspec, inputs[full])
183
+ if r:
184
+ errors.append(f"node {node_id}: {r}")
185
+ return seen
186
+
187
+
188
+ @dataclass
189
+ class Validation:
190
+ errors: list[str] = field(default_factory=list)
191
+ warnings: list[str] = field(default_factory=list)
192
+ # (node_id, input_name, value, error message) for literals not in a combo's list:
193
+ # when the input names a model file, that means "file not present", not "bad graph".
194
+ combo_misses: list[tuple] = field(default_factory=list)
195
+ not_installed: list[tuple] = field(default_factory=list) # (node_id, class_type, message)
196
+
197
+ @property
198
+ def ok(self) -> bool:
199
+ return not self.errors
200
+
201
+
202
+ def validate_api_prompt(prompt: dict, object_info: dict) -> Validation:
203
+ """Structural validation against the live node schemas. ComfyUI's own
204
+ validate_prompt at POST /prompt remains the final authority; this exists so that
205
+ problems surface before the night starts, with names a human can act on."""
206
+ v = Validation()
207
+ outputs = 0
208
+ for nid, node in prompt.items():
209
+ ct = node.get("class_type")
210
+ info = object_info.get(ct)
211
+ if info is None:
212
+ msg = f"node {nid}: class_type {ct!r} is not installed in this ComfyUI (missing custom node?)"
213
+ v.errors.append(msg)
214
+ v.not_installed.append((nid, ct, msg))
215
+ continue
216
+ if info.get("output_node"):
217
+ outputs += 1
218
+ specs = node_input_specs(info)
219
+ inputs = node.get("inputs") or {}
220
+ accounted: set[str] = set()
221
+ for name, (section, spec) in specs.items():
222
+ t = _spec_type(spec)
223
+ opts = _spec_opts(spec)
224
+ if t == "COMFY_DYNAMICCOMBO_V3":
225
+ accounted |= _check_dynamic_combo(nid, inputs, name, spec, v.errors)
226
+ if section == "required" and name not in inputs:
227
+ v.errors.append(f"node {nid} ({ct}): required input {name} missing")
228
+ continue
229
+ if t == "COMFY_AUTOGROW_V3":
230
+ subs = [k for k in inputs if k.startswith(name + ".")]
231
+ accounted |= set(subs)
232
+ mn = ((opts.get("template") or {}).get("min")) or 0
233
+ if section == "required" and len(subs) < mn:
234
+ v.errors.append(f"node {nid} ({ct}): autogrow {name} needs >= {mn} inputs, has {len(subs)}")
235
+ continue
236
+ if isinstance(t, str) and t.startswith("COMFY_") and t.endswith("_V3") and t != "COMFY_MATCHTYPE_V3":
237
+ v.warnings.append(f"node {nid} ({ct}): input {name} has dynamic type {t}; not checked here")
238
+ accounted |= {k for k in inputs if k == name or k.startswith(name + ".")}
239
+ continue
240
+ accounted.add(name)
241
+ if name not in inputs:
242
+ if section == "required" and not opts.get("lazy"):
243
+ v.errors.append(f"node {nid} ({ct}): required input {name} missing")
244
+ continue
245
+ val = inputs[name]
246
+ if is_link(val):
247
+ src = str(val[0])
248
+ if src not in prompt:
249
+ v.errors.append(f"node {nid} ({ct}): input {name} links to node {src}, which is not in the prompt")
250
+ continue
251
+ sct = prompt[src].get("class_type")
252
+ sinfo = object_info.get(sct)
253
+ if sinfo is not None:
254
+ outs = sinfo.get("output") or []
255
+ if not (0 <= val[1] < len(outs)):
256
+ v.errors.append(f"node {nid} ({ct}): input {name} uses output {val[1]} of {src} ({sct}), which has {len(outs)} outputs")
257
+ continue
258
+ if isinstance(val, dict) and "__value__" in val:
259
+ continue # frontend-wrapped array literal; backend unwraps it
260
+ r = check_literal(name, spec, val)
261
+ if r:
262
+ msg = f"node {nid} ({ct}): {r}"
263
+ v.errors.append(msg)
264
+ if combo_options(spec) is not None:
265
+ v.combo_misses.append((nid, name, val, msg))
266
+ for k in inputs:
267
+ if k not in accounted and k not in specs:
268
+ v.warnings.append(f"node {nid} ({ct}): input {k!r} is not in the node's schema (ignored by ComfyUI?)")
269
+ if outputs == 0:
270
+ v.errors.append("the prompt has no output node; ComfyUI would refuse it")
271
+ return v
272
+
273
+
274
+ # ----- overrides --------------------------------------------------------------------------
275
+ @dataclass
276
+ class Override:
277
+ node: str
278
+ input: str
279
+ value: Any
280
+ replace_link: bool = False
281
+ knob: Optional[str] = None
282
+
283
+
284
+ def apply_overrides(prompt: dict, overrides: list[Override], object_info: Optional[dict] = None,
285
+ label: str = "workflow") -> tuple[dict, list[dict]]:
286
+ """Return a modified copy and a record of every change. Raises WorkflowError on any
287
+ override that would not land exactly where the config says."""
288
+ out = copy.deepcopy(prompt)
289
+ applied: list[dict] = []
290
+ for ov in overrides:
291
+ nid = str(ov.node)
292
+ what = f"override {ov.knob + ' -> ' if ov.knob else ''}node {nid}.{ov.input}={ov.value!r}"
293
+ if nid not in out:
294
+ raise WorkflowError(f"{what}: node {nid} does not exist in {label}. The config and the workflow "
295
+ f"disagree; refusing to run the unmodified workflow.")
296
+ node = out[nid]
297
+ ct = node["class_type"]
298
+ inputs = node["inputs"]
299
+ spec = None
300
+ if object_info is not None and ct in object_info:
301
+ specs = node_input_specs(object_info[ct])
302
+ if ov.input in specs:
303
+ spec = specs[ov.input][1]
304
+ elif ov.input not in inputs:
305
+ raise WorkflowError(f"{what}: {ct} has no input {ov.input!r} (inputs: {sorted(specs)})")
306
+ elif ov.input not in inputs:
307
+ raise WorkflowError(f"{what}: node {nid} ({ct}) has no input {ov.input!r} in {label} "
308
+ f"(present: {sorted(inputs)})")
309
+ old = inputs.get(ov.input)
310
+ if is_link(old) and not ov.replace_link:
311
+ raise WorkflowError(f"{what}: that input is fed by a link from node {old[0]} in {label}. Setting a "
312
+ f"literal would cut the link. Target the source node instead, or set "
313
+ f"\"replace_link\": true if cutting it is the intent.")
314
+ if spec is not None:
315
+ r = check_literal(ov.input, spec, ov.value)
316
+ if r:
317
+ raise WorkflowError(f"{what}: {r}")
318
+ opts = _spec_opts(spec)
319
+ step = opts.get("step")
320
+ if _spec_type(spec) == "INT" and isinstance(step, int) and step > 1:
321
+ origin = opts.get("min", 0) if opts.get("min", 0) > 0 else 0
322
+ if (int(ov.value) - origin) % step:
323
+ raise WorkflowError(f"{what}: {ct}.{ov.input} moves in steps of {step} from {origin}; "
324
+ f"{ov.value} is off-grid, so the node would not produce what the config says")
325
+ inputs[ov.input] = ov.value
326
+ applied.append({"knob": ov.knob, "node": nid, "class_type": ct, "input": ov.input,
327
+ "old": old, "new": ov.value, "replaced_link": is_link(old)})
328
+ return out, applied
329
+
330
+
331
+ def verify_overrides_in(stored_prompt: dict, overrides: list[Override]) -> list[str]:
332
+ """Check the prompt ComfyUI stored in /history carries every override. Anything
333
+ returned is a silent no-op caught after the fact."""
334
+ problems = []
335
+ for ov in overrides:
336
+ node = stored_prompt.get(str(ov.node))
337
+ if node is None:
338
+ problems.append(f"node {ov.node} absent from the stored prompt")
339
+ continue
340
+ got = (node.get("inputs") or {}).get(ov.input, "<missing>")
341
+ if got != ov.value:
342
+ problems.append(f"node {ov.node}.{ov.input}: stored {got!r}, intended {ov.value!r}")
343
+ return problems
344
+
345
+
346
+ def model_references(prompt: dict) -> list[dict]:
347
+ """Every literal in the prompt that names a model file, with the folder type when
348
+ the loader is known. Includes nodes on lazily-unused branches: ComfyUI validates
349
+ those too, so their files must exist even when they will not be loaded."""
350
+ refs = []
351
+ for nid, node in prompt.items():
352
+ ct = node["class_type"]
353
+ known = LOADER_INPUTS.get(ct, {})
354
+ for k, v in (node.get("inputs") or {}).items():
355
+ if not isinstance(v, str):
356
+ continue
357
+ if k in known:
358
+ refs.append({"node": nid, "class_type": ct, "input": k, "filename": v, "folder": known[k]})
359
+ elif v.lower().endswith(MODEL_EXTENSIONS):
360
+ refs.append({"node": nid, "class_type": ct, "input": k, "filename": v, "folder": None})
361
+ return refs
362
+
363
+
364
+ def output_nodes(prompt: dict, object_info: dict) -> list[str]:
365
+ return [nid for nid, n in prompt.items() if (object_info.get(n["class_type"]) or {}).get("output_node")]
366
+
367
+
368
+ # ----- does a node matter? -----------------------------------------------------------------
369
+ SWITCH_CLASSES = {"ComfySwitchNode"} # comfy_extras/nodes_logic.py: lazy on_false/on_true, only one evaluated
370
+ BOOL_PRIMITIVES = {"PrimitiveBoolean"}
371
+
372
+
373
+ def _literal_bool(prompt: dict, v: Any) -> Optional[bool]:
374
+ if isinstance(v, bool):
375
+ return v
376
+ if is_link(v):
377
+ src = prompt.get(str(v[0]))
378
+ if src and src.get("class_type") in BOOL_PRIMITIVES and isinstance(src["inputs"].get("value"), bool):
379
+ return src["inputs"]["value"]
380
+ return None
381
+
382
+
383
+ def feeding_nodes(prompt: dict, output_node_ids: list[str]) -> set[str]:
384
+ """Every node whose output can reach one of output_node_ids. For a ComfySwitchNode whose
385
+ selector resolves to a literal, only the selected side is followed (the other is never
386
+ evaluated); if the selector cannot be resolved, both sides are followed."""
387
+ seen: set[str] = set()
388
+ stack = [str(o) for o in output_node_ids]
389
+ while stack:
390
+ nid = stack.pop()
391
+ if nid in seen or nid not in prompt:
392
+ continue
393
+ seen.add(nid)
394
+ node = prompt[nid]
395
+ inputs = node.get("inputs") or {}
396
+ skip = None
397
+ if node.get("class_type") in SWITCH_CLASSES:
398
+ sel = _literal_bool(prompt, inputs.get("switch"))
399
+ skip = "on_false" if sel is True else "on_true" if sel is False else None
400
+ for k, v in inputs.items():
401
+ if k != skip and is_link(v):
402
+ stack.append(str(v[0]))
403
+ return seen
404
+
405
+
406
+ def overrides_that_change_nothing(prompt: dict, applied: list[dict], output_node_ids: list[str]) -> list[dict]:
407
+ """Applied overrides whose node does not feed the output in THIS prompt: silent no-ops."""
408
+ feeding = feeding_nodes(prompt, output_node_ids)
409
+ return [a for a in applied if a["node"] not in feeding]
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/run_night.py ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Run the whole first batch, one config after another, each in its own process.
3
+
4
+ python run_night.py --display-attached yes [--llama-bin-dir DIR] [--comfy-url URL]
5
+
6
+ Order: krea-2 -> wan-2-2 -> minimax-h3 -> qwen3-8-27b (fast first; the licence-gated one
7
+ later; llama.cpp last so ComfyUI can be asked to unload first). A config that fails, is
8
+ blocked or stops early does not stop the others. Each config's full console output goes to
9
+ ../night_logs/<config>.log and a factual summary is appended to ../NIGHT_LOG.md.
10
+
11
+ It never downloads, never creates the MiniMax licence acknowledgement, never uploads.
12
+ Re-running it resumes every unfinished session (runs already recorded are skipped).
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import argparse
17
+ import os
18
+ import re
19
+ import subprocess
20
+ import sys
21
+ import time
22
+ from datetime import datetime, timezone
23
+
24
+ HERE = os.path.dirname(os.path.abspath(__file__))
25
+ ROOT = os.path.dirname(HERE)
26
+ BATCH = [
27
+ ("comfy", "configs/krea-2_rtx-5060-ti.json"),
28
+ ("comfy", "configs/wan-2-2_rtx-5060-ti.json"),
29
+ ("comfy", "configs/minimax-h3_rtx-5060-ti.json"),
30
+ ("llama", "configs/qwen3-8-27b_rtx-5060-ti.json"),
31
+ ]
32
+ RC_MEANING = {0: "finished", 1: "FATAL preflight, nothing ran", 2: "nothing runnable (all runs blocked)",
33
+ 3: "stopped early"}
34
+
35
+
36
+ def main() -> int:
37
+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
38
+ ap.add_argument("--display-attached", choices=["yes", "no", "auto"], required=True)
39
+ ap.add_argument("--comfy-url", default=os.environ.get("COMFYUI_URL", "http://127.0.0.1:8000"))
40
+ ap.add_argument("--llama-bin-dir")
41
+ ap.add_argument("--models-dir")
42
+ ap.add_argument("--only", help="comma-separated substrings of config names to run (default: all four)")
43
+ args = ap.parse_args()
44
+ for stream in (sys.stdout, sys.stderr):
45
+ try:
46
+ stream.reconfigure(encoding="utf-8", errors="replace")
47
+ except (AttributeError, ValueError):
48
+ pass
49
+
50
+ logs = os.path.join(ROOT, "night_logs")
51
+ os.makedirs(logs, exist_ok=True)
52
+ summary = [f"\n## Batch started {datetime.now(timezone.utc).isoformat(timespec='seconds')}\n",
53
+ f"- runner: `{' '.join(sys.argv)}`", f"- python: `{sys.executable}`"]
54
+ for kind, cfg in BATCH:
55
+ if args.only and not any(s.strip() and s.strip() in cfg for s in args.only.split(",")):
56
+ continue
57
+ if kind == "comfy":
58
+ cmd = [sys.executable, os.path.join(HERE, "comfy_measure.py"), "--comfy-url", args.comfy_url, "run",
59
+ "--config", os.path.join(HERE, cfg), "--display-attached", args.display_attached]
60
+ else:
61
+ cmd = [sys.executable, os.path.join(HERE, "llama_measure.py")]
62
+ if args.llama_bin_dir:
63
+ cmd += ["--llama-bin-dir", args.llama_bin_dir]
64
+ if args.models_dir:
65
+ cmd += ["--models-dir", args.models_dir]
66
+ cmd += ["run", "--config", os.path.join(HERE, cfg), "--display-attached", args.display_attached,
67
+ "--comfy-url", args.comfy_url]
68
+ name = os.path.splitext(os.path.basename(cfg))[0]
69
+ log_path = os.path.join(logs, f"{name}.log")
70
+ t0 = time.time()
71
+ print(f"== {name}: {' '.join(cmd)}", flush=True)
72
+ with open(log_path, "a", encoding="utf-8") as log:
73
+ log.write(f"\n\n===== {datetime.now(timezone.utc).isoformat()} {' '.join(cmd)}\n")
74
+ log.flush()
75
+ env = dict(os.environ, PYTHONIOENCODING="utf-8")
76
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True,
77
+ encoding="utf-8", errors="replace", cwd=HERE, env=env)
78
+ captured = []
79
+ for line in proc.stdout:
80
+ sys.stdout.write(line)
81
+ log.write(line)
82
+ log.flush()
83
+ captured.append(line)
84
+ rc = proc.wait()
85
+ text = "".join(captured)
86
+ mins = (time.time() - t0) / 60
87
+ summary.append(f"\n### {name}\n\n- exit code {rc}: {RC_MEANING.get(rc, 'crashed (traceback in the log)')}, "
88
+ f"{mins:.1f} min; full output `night_logs/{name}.log`")
89
+ m = re.search(r"== session (\S+) \((new|resumed)\)", text)
90
+ if m:
91
+ summary.append(f"- session `{m.group(1)}` ({m.group(2)})")
92
+ for line in text.splitlines():
93
+ s = line.strip()
94
+ if s.startswith(("FATAL", "BLOCKED", "WARNING", "-> ok=", "REJECTED", "not attempted", "== session")) \
95
+ or "LICENCE GATE CLOSED" in s or "schema check" in s:
96
+ summary.append(f" - `{s[:400]}`")
97
+ summary.append(f"\nBatch ended {datetime.now(timezone.utc).isoformat(timespec='seconds')}. "
98
+ f"Nothing was uploaded or published.\n")
99
+ with open(os.path.join(ROOT, "NIGHT_LOG.md"), "a", encoding="utf-8") as f:
100
+ f.write("\n".join(summary) + "\n")
101
+ print(f"== summary appended to {os.path.join(ROOT, 'NIGHT_LOG.md')}")
102
+ return 0
103
+
104
+
105
+ if __name__ == "__main__":
106
+ sys.exit(main())
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_llama_bench.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Fake llama-bench for the self-test. Emits the `-o json` shape of llama-bench.cpp
3
+ (one object per test: pp has n_prompt>0,n_gen=0; tg has n_gen>0,n_prompt=0) and raises
4
+ the fake VRAM state while it "runs". A model path containing 'oom' fails the way
5
+ llama.cpp's CUDA backend does."""
6
+ import json
7
+ import os
8
+ import sys
9
+ import time
10
+
11
+ STATE = os.environ.get("FAKE_NVSMI_STATE", "")
12
+ if "--version" in sys.argv:
13
+ print("version: 10442 (abc1234)\nbuilt with fake for self-test")
14
+ sys.exit(0)
15
+
16
+
17
+ def set_used(mib):
18
+ if STATE:
19
+ tmp = STATE + ".llama.tmp"
20
+ with open(tmp, "w") as f:
21
+ json.dump({"used_mib": mib}, f)
22
+ os.replace(tmp, STATE)
23
+
24
+
25
+ def arg(flag, default=None):
26
+ a = sys.argv[1:]
27
+ return a[a.index(flag) + 1] if flag in a else default
28
+
29
+
30
+ model = arg("-m", "")
31
+ p, n, d = int(arg("-p", "512")), int(arg("-n", "128")), int(arg("-d", "0"))
32
+ if "oom" in os.path.basename(model):
33
+ set_used(16200)
34
+ time.sleep(0.6)
35
+ print("ggml_backend_cuda_buffer_type_alloc_buffer: allocating 21000.00 MiB on device 0: cudaMalloc failed: "
36
+ "out of memory", file=sys.stderr)
37
+ print("main: error: failed to create context with model", file=sys.stderr)
38
+ set_used(820)
39
+ sys.exit(1)
40
+ set_used(8000 + d // 16)
41
+ time.sleep(1.0)
42
+ common = {"build_commit": "abc1234", "build_number": 10442, "cpu_info": "fake", "gpu_info": "NVIDIA GeForce RTX 5060 Ti",
43
+ "backends": "CUDA", "model_filename": model, "model_type": "qwen35 27B Q3_K - Medium",
44
+ "model_size": 13146393504, "model_n_params": 27000000000, "n_batch": 2048, "n_ubatch": 512,
45
+ "n_threads": 8, "type_k": "q8_0", "type_v": "q8_0", "n_gpu_layers": 99, "flash_attn": 1, "n_depth": d}
46
+ out = [dict(common, n_prompt=p, n_gen=0, avg_ns=835000000, stddev_ns=1000000, avg_ts=612.5, stddev_ts=3.1,
47
+ samples_ns=[835000000] * 3, samples_ts=[612.5] * 3),
48
+ dict(common, n_prompt=0, n_gen=n, avg_ns=5980000000, stddev_ns=2000000, avg_ts=21.4, stddev_ts=0.2,
49
+ samples_ns=[5980000000] * 3, samples_ts=[21.4] * 3)]
50
+ print(json.dumps(out, indent=2))
51
+ set_used(820)
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_llama_server.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Fake llama-server for the self-test: /health answers 503 while "loading", then 200;
3
+ POST /v1/chat/completions checks an image was sent and returns llama-server's `timings`
4
+ object; SIGINT prints the common_memory_breakdown_print table line and exits. A model path
5
+ containing 'oom' dies during load the way the CUDA backend does."""
6
+ import json
7
+ import os
8
+ import signal
9
+ import sys
10
+ import threading
11
+ import time
12
+ from http.server import BaseHTTPRequestHandler, HTTPServer
13
+
14
+ STATE = os.environ.get("FAKE_NVSMI_STATE", "")
15
+ if "--version" in sys.argv:
16
+ # The format real builds print since common/build-info.cpp.in changed it (b10951 has it); the
17
+ # fake bench keeps the older "version: N (commit)" so both parsers stay exercised.
18
+ print("version: 0.4.0 (build 10442, commit abc1234)\nbuilt with fake for self-test")
19
+ sys.exit(0)
20
+
21
+
22
+ def set_used(mib):
23
+ if STATE:
24
+ tmp = STATE + ".srv.tmp"
25
+ with open(tmp, "w") as f:
26
+ json.dump({"used_mib": mib}, f)
27
+ os.replace(tmp, STATE)
28
+
29
+
30
+ def arg(flag, default=None):
31
+ a = sys.argv[1:]
32
+ return a[a.index(flag) + 1] if flag in a else default
33
+
34
+
35
+ model = arg("--model", "")
36
+ port = int(arg("--port", "8089"))
37
+ print(f"main: loading model {model}", flush=True)
38
+ if "oom" in os.path.basename(model):
39
+ set_used(16250)
40
+ time.sleep(0.5)
41
+ print("ggml_backend_cuda_buffer_type_alloc_buffer: allocating 16000.00 MiB on device 0: cudaMalloc failed: "
42
+ "out of memory", flush=True)
43
+ set_used(820)
44
+ sys.exit(1)
45
+ t_ready = time.time() + 1.0
46
+ set_used(13900)
47
+
48
+
49
+ class H(BaseHTTPRequestHandler):
50
+ def log_message(self, *a):
51
+ pass
52
+
53
+ def _json(self, code, obj):
54
+ b = json.dumps(obj).encode()
55
+ self.send_response(code)
56
+ self.send_header("Content-Type", "application/json")
57
+ self.send_header("Content-Length", str(len(b)))
58
+ self.end_headers()
59
+ self.wfile.write(b)
60
+
61
+ def do_GET(self):
62
+ if self.path == "/health":
63
+ return self._json(200, {"status": "ok"}) if time.time() > t_ready else \
64
+ self._json(503, {"error": {"message": "Loading model"}})
65
+ self._json(404, {})
66
+
67
+ def do_POST(self):
68
+ body = json.loads(self.rfile.read(int(self.headers.get("Content-Length") or 0)) or b"{}")
69
+ parts = body["messages"][0]["content"]
70
+ if not any(p.get("type") == "image_url" and p["image_url"]["url"].startswith("data:image/png;base64,")
71
+ for p in parts):
72
+ return self._json(400, {"error": {"message": "image input is not supported"}})
73
+ set_used(14700) # vision encoder graph on top
74
+ time.sleep(0.5)
75
+ set_used(13900)
76
+ self._json(200, {"choices": [{"message": {"role": "assistant", "content": "A test gradient with a grid."}}],
77
+ "usage": {"prompt_tokens": 1100, "completion_tokens": 64},
78
+ "timings": {"cache_n": 0, "prompt_n": 1100, "prompt_ms": 2000.0, "prompt_per_token_ms": 1.82,
79
+ "prompt_per_second": 550.0, "predicted_n": 64, "predicted_ms": 3000.0,
80
+ "predicted_per_token_ms": 46.9, "predicted_per_second": 21.333}})
81
+
82
+
83
+ srv = HTTPServer(("127.0.0.1", port), H)
84
+
85
+
86
+ def bye(*_):
87
+ print("common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |", flush=True)
88
+ print("common_memory_breakdown_print: | - CUDA0 (NVIDIA GeForce RTX 5060 Ti) | 16311 = 1190 + (13380 = 12538 + 452 + 390) + 1741 |", flush=True)
89
+ set_used(820)
90
+ threading.Thread(target=srv.shutdown, daemon=True).start()
91
+
92
+
93
+ signal.signal(signal.SIGINT, bye)
94
+ signal.signal(signal.SIGTERM, bye)
95
+ srv.serve_forever()
96
+ srv.server_close()
97
+ set_used(820)
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fake_nvidia_smi.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Fake nvidia-smi for the self-test. Never used outside tests.
3
+
4
+ Answers the one-shot --query-gpu calls the harness makes at startup, `-q`, and the
5
+ streaming `-lms N` form, printing lines in nvidia-smi's own format:
6
+ 2026/09/11 22:04:05.123, <used MiB>, 16311, <util>
7
+ `memory.used` comes from a JSON state file ({"used_mib": N}) that the mock ComfyUI
8
+ (or the fake llama-bench) rewrites as its "jobs" run, so the sampler sees a real
9
+ rise and fall to take a peak from.
10
+ """
11
+ import json
12
+ import os
13
+ import sys
14
+ import time
15
+ from datetime import datetime
16
+
17
+ STATE = os.environ.get("FAKE_NVSMI_STATE", "")
18
+ TOTAL = 16311
19
+ STATIC = {
20
+ "name": "NVIDIA GeForce RTX 5060 Ti", "memory.total": str(TOTAL), "driver_version": "591.86",
21
+ "compute_cap": "12.0", "pci.bus_id": "00000000:01:00.0", "uuid": "GPU-fake", "vbios_version": "fake",
22
+ "pcie.link.gen.current": "1", "pcie.link.gen.max": "5", "pcie.link.width.current": "8",
23
+ "pcie.link.width.max": "8", "display_active": "Enabled", "display_mode": "Enabled",
24
+ "power.limit": "180.00", "clocks.max.graphics": "3090", "clocks.max.memory": "14001",
25
+ "driver_model.current": "WDDM",
26
+ }
27
+
28
+
29
+ def used() -> int:
30
+ try:
31
+ with open(STATE, encoding="utf-8") as f:
32
+ return int(json.load(f)["used_mib"])
33
+ except Exception:
34
+ return 700
35
+
36
+
37
+ def main(argv):
38
+ if "-q" in argv:
39
+ print("==============NVSMI LOG==============\nProduct Name : NVIDIA GeForce RTX 5060 Ti (FAKE, self-test)")
40
+ return 0
41
+ q = next((a.split("=", 1)[1] for a in argv if a.startswith("--query-gpu=")), None)
42
+ if q is None:
43
+ print("fake nvidia-smi: unsupported invocation", file=sys.stderr)
44
+ return 2
45
+ fields = q.split(",")
46
+ if "-lms" in argv:
47
+ interval = int(argv[argv.index("-lms") + 1]) / 1000.0
48
+ try:
49
+ while True:
50
+ now = datetime.now()
51
+ ts = now.strftime("%Y/%m/%d %H:%M:%S.") + f"{now.microsecond // 1000:03d}"
52
+ u = used()
53
+ print(f"{ts}, {u}, {TOTAL}, {min(100, u // 160)}", flush=True)
54
+ time.sleep(interval)
55
+ except (BrokenPipeError, KeyboardInterrupt, OSError):
56
+ return 0
57
+ out = []
58
+ for f in fields:
59
+ if f not in STATIC:
60
+ print(f'Field "{f}" is not a valid field to query.')
61
+ return 2
62
+ out.append(STATIC[f])
63
+ print(", ".join(out))
64
+ return 0
65
+
66
+
67
+ if __name__ == "__main__":
68
+ sys.exit(main(sys.argv[1:]))
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/fixtures/object_info_comfyui-0.35.0_subset.json ADDED
@@ -0,0 +1,2433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_origin": "GET /object_info from ComfyUI 0.35.0 (commit 1d48d9cf7bcecb6022a87b3cb13e0fb435bf9b8a) + city96/ComfyUI-GGUF 6ea2651, CPU instance, 2026-09-11; placeholder model files listed in the loader combos",
3
+ "classes": {
4
+ "BasicGuider": {
5
+ "input": {
6
+ "required": {
7
+ "model": [
8
+ "MODEL",
9
+ {}
10
+ ],
11
+ "conditioning": [
12
+ "CONDITIONING",
13
+ {}
14
+ ]
15
+ }
16
+ },
17
+ "input_order": {
18
+ "required": [
19
+ "model",
20
+ "conditioning"
21
+ ]
22
+ },
23
+ "is_input_list": false,
24
+ "output": [
25
+ "GUIDER"
26
+ ],
27
+ "output_is_list": [
28
+ false
29
+ ],
30
+ "output_name": [
31
+ "GUIDER"
32
+ ],
33
+ "output_tooltips": [
34
+ null
35
+ ],
36
+ "output_matchtypes": null,
37
+ "name": "BasicGuider",
38
+ "display_name": "Basic Guider",
39
+ "description": "",
40
+ "python_module": "comfy_extras.nodes_custom_sampler",
41
+ "category": "model/sampling/guiders",
42
+ "output_node": false,
43
+ "deprecated": false,
44
+ "experimental": false,
45
+ "dev_only": false,
46
+ "api_node": false,
47
+ "price_badge": null,
48
+ "search_aliases": null,
49
+ "essentials_category": null,
50
+ "has_intermediate_output": false
51
+ },
52
+ "BasicScheduler": {
53
+ "input": {
54
+ "required": {
55
+ "model": [
56
+ "MODEL",
57
+ {}
58
+ ],
59
+ "scheduler": [
60
+ "COMBO",
61
+ {
62
+ "multiselect": false,
63
+ "options": [
64
+ "simple",
65
+ "sgm_uniform",
66
+ "karras",
67
+ "exponential",
68
+ "ddim_uniform",
69
+ "beta",
70
+ "normal",
71
+ "linear_quadratic",
72
+ "kl_optimal"
73
+ ]
74
+ }
75
+ ],
76
+ "steps": [
77
+ "INT",
78
+ {
79
+ "default": 20,
80
+ "min": 1,
81
+ "max": 10000
82
+ }
83
+ ],
84
+ "denoise": [
85
+ "FLOAT",
86
+ {
87
+ "default": 1.0,
88
+ "min": 0.0,
89
+ "max": 1.0,
90
+ "step": 0.01
91
+ }
92
+ ]
93
+ }
94
+ },
95
+ "input_order": {
96
+ "required": [
97
+ "model",
98
+ "scheduler",
99
+ "steps",
100
+ "denoise"
101
+ ]
102
+ },
103
+ "is_input_list": false,
104
+ "output": [
105
+ "SIGMAS"
106
+ ],
107
+ "output_is_list": [
108
+ false
109
+ ],
110
+ "output_name": [
111
+ "SIGMAS"
112
+ ],
113
+ "output_tooltips": [
114
+ null
115
+ ],
116
+ "output_matchtypes": null,
117
+ "name": "BasicScheduler",
118
+ "display_name": null,
119
+ "description": "",
120
+ "python_module": "comfy_extras.nodes_custom_sampler",
121
+ "category": "model/sampling/schedulers",
122
+ "output_node": false,
123
+ "deprecated": false,
124
+ "experimental": false,
125
+ "dev_only": false,
126
+ "api_node": false,
127
+ "price_badge": null,
128
+ "search_aliases": null,
129
+ "essentials_category": null,
130
+ "has_intermediate_output": false
131
+ },
132
+ "CLIPLoader": {
133
+ "input": {
134
+ "required": {
135
+ "clip_name": [
136
+ [
137
+ "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
138
+ "qwen3vl_4b_fp8_scaled.safetensors",
139
+ "umt5_xxl_fp8_e4m3fn_scaled.safetensors"
140
+ ]
141
+ ],
142
+ "type": [
143
+ [
144
+ "stable_diffusion",
145
+ "stable_cascade",
146
+ "sd3",
147
+ "stable_audio",
148
+ "mochi",
149
+ "ltxv",
150
+ "pixart",
151
+ "cosmos",
152
+ "lumina2",
153
+ "wan",
154
+ "hidream",
155
+ "chroma",
156
+ "ace",
157
+ "omnigen2",
158
+ "qwen_image",
159
+ "hunyuan_image",
160
+ "flux2",
161
+ "ovis",
162
+ "longcat_image",
163
+ "cogvideox",
164
+ "lens",
165
+ "pixeldit",
166
+ "ideogram4",
167
+ "boogu",
168
+ "krea2",
169
+ "joyimage",
170
+ "mage",
171
+ "minimax"
172
+ ]
173
+ ]
174
+ },
175
+ "optional": {
176
+ "device": [
177
+ [
178
+ "default",
179
+ "cpu"
180
+ ],
181
+ {
182
+ "advanced": true
183
+ }
184
+ ]
185
+ }
186
+ },
187
+ "input_order": {
188
+ "required": [
189
+ "clip_name",
190
+ "type"
191
+ ],
192
+ "optional": [
193
+ "device"
194
+ ]
195
+ },
196
+ "is_input_list": false,
197
+ "output": [
198
+ "CLIP"
199
+ ],
200
+ "output_is_list": [
201
+ false
202
+ ],
203
+ "output_name": [
204
+ "CLIP"
205
+ ],
206
+ "name": "CLIPLoader",
207
+ "display_name": "Load CLIP",
208
+ "description": "Recipes:\nsd: clip-l\nstable cascade: clip-g\nsd3: t5 xxl / clip-g / clip-l\nstable audio: t5 base\nmochi: t5 xxl\ncogvideox: t5 xxl (226-token padding)\ncosmos: old t5 xxl\nlumina2: gemma 2 2B\nwan: umt5 xxl\nhidream: llama-3.1 (Recommend) or t5\nomnigen2: qwen vl 2.5 3B\njoyimage: qwen3-vl 8B\nlens: gpt-oss-20b\npixeldit: gemma 2 2B elm\nminimax: MiniMax H3 Qwen3-VL or Music3 Qwen/RVQ",
209
+ "python_module": "nodes",
210
+ "category": "model/loaders",
211
+ "output_node": false,
212
+ "has_intermediate_output": false,
213
+ "search_aliases": []
214
+ },
215
+ "CLIPTextEncode": {
216
+ "input": {
217
+ "required": {
218
+ "text": [
219
+ "STRING",
220
+ {
221
+ "multiline": true,
222
+ "dynamicPrompts": true,
223
+ "tooltip": "The text to be encoded."
224
+ }
225
+ ],
226
+ "clip": [
227
+ "CLIP",
228
+ {
229
+ "tooltip": "The CLIP model used for encoding the text."
230
+ }
231
+ ]
232
+ }
233
+ },
234
+ "input_order": {
235
+ "required": [
236
+ "text",
237
+ "clip"
238
+ ]
239
+ },
240
+ "is_input_list": false,
241
+ "output": [
242
+ "CONDITIONING"
243
+ ],
244
+ "output_is_list": [
245
+ false
246
+ ],
247
+ "output_name": [
248
+ "CONDITIONING"
249
+ ],
250
+ "name": "CLIPTextEncode",
251
+ "display_name": "CLIP Text Encode (Prompt)",
252
+ "description": "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images.",
253
+ "python_module": "nodes",
254
+ "category": "model/conditioning",
255
+ "output_node": false,
256
+ "has_intermediate_output": false,
257
+ "output_tooltips": [
258
+ "A conditioning containing the embedded text used to guide the diffusion model."
259
+ ],
260
+ "search_aliases": [
261
+ "text",
262
+ "prompt",
263
+ "text prompt",
264
+ "positive prompt",
265
+ "negative prompt",
266
+ "encode text",
267
+ "text encoder",
268
+ "encode prompt"
269
+ ]
270
+ },
271
+ "ComfyMathExpression": {
272
+ "input": {
273
+ "required": {
274
+ "expression": [
275
+ "STRING",
276
+ {
277
+ "default": "a + b",
278
+ "multiline": true
279
+ }
280
+ ],
281
+ "values": [
282
+ "COMFY_AUTOGROW_V3",
283
+ {
284
+ "template": {
285
+ "input": {
286
+ "required": {
287
+ "value": [
288
+ "FLOAT,INT,BOOLEAN",
289
+ {}
290
+ ]
291
+ }
292
+ },
293
+ "names": [
294
+ "a",
295
+ "b",
296
+ "c",
297
+ "d",
298
+ "e",
299
+ "f",
300
+ "g",
301
+ "h",
302
+ "i",
303
+ "j",
304
+ "k",
305
+ "l",
306
+ "m",
307
+ "n",
308
+ "o",
309
+ "p",
310
+ "q",
311
+ "r",
312
+ "s",
313
+ "t",
314
+ "u",
315
+ "v",
316
+ "w",
317
+ "x",
318
+ "y",
319
+ "z"
320
+ ],
321
+ "min": 1
322
+ }
323
+ }
324
+ ]
325
+ }
326
+ },
327
+ "input_order": {
328
+ "required": [
329
+ "expression",
330
+ "values"
331
+ ]
332
+ },
333
+ "is_input_list": false,
334
+ "output": [
335
+ "FLOAT",
336
+ "INT",
337
+ "BOOLEAN"
338
+ ],
339
+ "output_is_list": [
340
+ false,
341
+ false,
342
+ false
343
+ ],
344
+ "output_name": [
345
+ "FLOAT",
346
+ "INT",
347
+ "BOOL"
348
+ ],
349
+ "output_tooltips": [
350
+ null,
351
+ null,
352
+ null
353
+ ],
354
+ "output_matchtypes": null,
355
+ "name": "ComfyMathExpression",
356
+ "display_name": "Math Expression",
357
+ "description": "",
358
+ "python_module": "comfy_extras.nodes_math",
359
+ "category": "utilities",
360
+ "output_node": false,
361
+ "deprecated": false,
362
+ "experimental": false,
363
+ "dev_only": false,
364
+ "api_node": false,
365
+ "price_badge": null,
366
+ "search_aliases": [
367
+ "math",
368
+ "expression",
369
+ "formula",
370
+ "calculate",
371
+ "calculator",
372
+ "eval"
373
+ ],
374
+ "essentials_category": null,
375
+ "has_intermediate_output": false
376
+ },
377
+ "ComfySwitchNode": {
378
+ "input": {
379
+ "required": {
380
+ "switch": [
381
+ "BOOLEAN",
382
+ {}
383
+ ]
384
+ },
385
+ "optional": {
386
+ "on_false": [
387
+ "COMFY_MATCHTYPE_V3",
388
+ {
389
+ "lazy": true,
390
+ "template": {
391
+ "template_id": "switch",
392
+ "allowed_types": "*"
393
+ }
394
+ }
395
+ ],
396
+ "on_true": [
397
+ "COMFY_MATCHTYPE_V3",
398
+ {
399
+ "lazy": true,
400
+ "template": {
401
+ "template_id": "switch",
402
+ "allowed_types": "*"
403
+ }
404
+ }
405
+ ]
406
+ }
407
+ },
408
+ "input_order": {
409
+ "required": [
410
+ "switch"
411
+ ],
412
+ "optional": [
413
+ "on_false",
414
+ "on_true"
415
+ ]
416
+ },
417
+ "is_input_list": false,
418
+ "output": [
419
+ "COMFY_MATCHTYPE_V3"
420
+ ],
421
+ "output_is_list": [
422
+ false
423
+ ],
424
+ "output_name": [
425
+ "output"
426
+ ],
427
+ "output_tooltips": [
428
+ null
429
+ ],
430
+ "output_matchtypes": [
431
+ "switch"
432
+ ],
433
+ "name": "ComfySwitchNode",
434
+ "display_name": "If/Else Switch",
435
+ "description": "",
436
+ "python_module": "comfy_extras.nodes_logic",
437
+ "category": "utilities/logic",
438
+ "output_node": false,
439
+ "deprecated": false,
440
+ "experimental": true,
441
+ "dev_only": false,
442
+ "api_node": false,
443
+ "price_badge": null,
444
+ "search_aliases": [
445
+ "if",
446
+ "then",
447
+ "switch",
448
+ "conditional",
449
+ "branch"
450
+ ],
451
+ "essentials_category": null,
452
+ "has_intermediate_output": false
453
+ },
454
+ "ConditioningZeroOut": {
455
+ "input": {
456
+ "required": {
457
+ "conditioning": [
458
+ "CONDITIONING"
459
+ ]
460
+ }
461
+ },
462
+ "input_order": {
463
+ "required": [
464
+ "conditioning"
465
+ ]
466
+ },
467
+ "is_input_list": false,
468
+ "output": [
469
+ "CONDITIONING"
470
+ ],
471
+ "output_is_list": [
472
+ false
473
+ ],
474
+ "output_name": [
475
+ "CONDITIONING"
476
+ ],
477
+ "name": "ConditioningZeroOut",
478
+ "display_name": "Conditioning Zero Out",
479
+ "description": "",
480
+ "python_module": "nodes",
481
+ "category": "model/conditioning/transform",
482
+ "output_node": false,
483
+ "has_intermediate_output": false,
484
+ "search_aliases": [
485
+ "null conditioning",
486
+ "clear conditioning"
487
+ ]
488
+ },
489
+ "CreateVideo": {
490
+ "input": {
491
+ "required": {
492
+ "images": [
493
+ "IMAGE",
494
+ {
495
+ "tooltip": "The images to create a video from."
496
+ }
497
+ ],
498
+ "fps": [
499
+ "FLOAT",
500
+ {
501
+ "default": 30.0,
502
+ "min": 1.0,
503
+ "max": 120.0,
504
+ "step": 1.0
505
+ }
506
+ ]
507
+ },
508
+ "optional": {
509
+ "audio": [
510
+ "AUDIO",
511
+ {
512
+ "tooltip": "The audio to add to the video."
513
+ }
514
+ ],
515
+ "bit_depth": [
516
+ "COMBO",
517
+ {
518
+ "tooltip": "Auto uses 8-bit for sRGB and 10-bit for HDR. Explicit 8-bit and 10-bit choices are independent of colorspace.",
519
+ "default": "auto",
520
+ "multiselect": false,
521
+ "options": [
522
+ "auto",
523
+ 8,
524
+ 10
525
+ ]
526
+ }
527
+ ],
528
+ "color_space": [
529
+ "COMBO",
530
+ {
531
+ "tooltip": "Colorspace of the input images. HDR selects BT.2020/HLG and HDR PQ selects BT.2020/PQ.",
532
+ "default": "sRGB",
533
+ "multiselect": false,
534
+ "options": [
535
+ "sRGB",
536
+ "HDR",
537
+ "HDR PQ"
538
+ ]
539
+ }
540
+ ]
541
+ }
542
+ },
543
+ "input_order": {
544
+ "required": [
545
+ "images",
546
+ "fps"
547
+ ],
548
+ "optional": [
549
+ "audio",
550
+ "bit_depth",
551
+ "color_space"
552
+ ]
553
+ },
554
+ "is_input_list": false,
555
+ "output": [
556
+ "VIDEO"
557
+ ],
558
+ "output_is_list": [
559
+ false
560
+ ],
561
+ "output_name": [
562
+ "VIDEO"
563
+ ],
564
+ "output_tooltips": [
565
+ null
566
+ ],
567
+ "output_matchtypes": null,
568
+ "name": "CreateVideo",
569
+ "display_name": "Create Video",
570
+ "description": "Create a video from images.",
571
+ "python_module": "comfy_extras.nodes_video",
572
+ "category": "video",
573
+ "output_node": false,
574
+ "deprecated": false,
575
+ "experimental": false,
576
+ "dev_only": false,
577
+ "api_node": false,
578
+ "price_badge": null,
579
+ "search_aliases": [
580
+ "images to video"
581
+ ],
582
+ "essentials_category": "Video Tools",
583
+ "has_intermediate_output": false
584
+ },
585
+ "EmptyLatentImage": {
586
+ "input": {
587
+ "required": {
588
+ "width": [
589
+ "INT",
590
+ {
591
+ "default": 512,
592
+ "min": 16,
593
+ "max": 16384,
594
+ "step": 8,
595
+ "tooltip": "The width of the latent images in pixels."
596
+ }
597
+ ],
598
+ "height": [
599
+ "INT",
600
+ {
601
+ "default": 512,
602
+ "min": 16,
603
+ "max": 16384,
604
+ "step": 8,
605
+ "tooltip": "The height of the latent images in pixels."
606
+ }
607
+ ],
608
+ "batch_size": [
609
+ "INT",
610
+ {
611
+ "default": 1,
612
+ "min": 1,
613
+ "max": 4096,
614
+ "tooltip": "The number of latent images in the batch."
615
+ }
616
+ ]
617
+ }
618
+ },
619
+ "input_order": {
620
+ "required": [
621
+ "width",
622
+ "height",
623
+ "batch_size"
624
+ ]
625
+ },
626
+ "is_input_list": false,
627
+ "output": [
628
+ "LATENT"
629
+ ],
630
+ "output_is_list": [
631
+ false
632
+ ],
633
+ "output_name": [
634
+ "LATENT"
635
+ ],
636
+ "name": "EmptyLatentImage",
637
+ "display_name": "Empty Latent Image",
638
+ "description": "Create a new batch of empty latent images to be denoised via sampling.",
639
+ "python_module": "nodes",
640
+ "category": "model/latent",
641
+ "output_node": false,
642
+ "has_intermediate_output": false,
643
+ "output_tooltips": [
644
+ "The empty latent image batch."
645
+ ],
646
+ "search_aliases": [
647
+ "empty",
648
+ "empty latent",
649
+ "new latent",
650
+ "create latent",
651
+ "blank latent",
652
+ "blank"
653
+ ]
654
+ },
655
+ "KSampler": {
656
+ "input": {
657
+ "required": {
658
+ "model": [
659
+ "MODEL",
660
+ {
661
+ "tooltip": "The model used for denoising the input latent."
662
+ }
663
+ ],
664
+ "seed": [
665
+ "INT",
666
+ {
667
+ "default": 0,
668
+ "min": 0,
669
+ "max": 18446744073709551615,
670
+ "control_after_generate": true,
671
+ "tooltip": "The random seed used for creating the noise."
672
+ }
673
+ ],
674
+ "steps": [
675
+ "INT",
676
+ {
677
+ "default": 20,
678
+ "min": 1,
679
+ "max": 10000,
680
+ "tooltip": "The number of steps used in the denoising process."
681
+ }
682
+ ],
683
+ "cfg": [
684
+ "FLOAT",
685
+ {
686
+ "default": 8.0,
687
+ "min": 0.0,
688
+ "max": 100.0,
689
+ "step": 0.1,
690
+ "round": 0.01,
691
+ "tooltip": "The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality."
692
+ }
693
+ ],
694
+ "sampler_name": [
695
+ [
696
+ "euler",
697
+ "euler_cfg_pp",
698
+ "euler_ancestral",
699
+ "euler_ancestral_cfg_pp",
700
+ "heun",
701
+ "heunpp2",
702
+ "exp_heun_2_x0",
703
+ "exp_heun_2_x0_sde",
704
+ "dpm_2",
705
+ "dpm_2_ancestral",
706
+ "lms",
707
+ "dpm_fast",
708
+ "dpm_adaptive",
709
+ "dpmpp_2s_ancestral",
710
+ "dpmpp_2s_ancestral_cfg_pp",
711
+ "dpmpp_sde",
712
+ "dpmpp_sde_gpu",
713
+ "dpmpp_2m",
714
+ "dpmpp_2m_cfg_pp",
715
+ "dpmpp_2m_sde",
716
+ "dpmpp_2m_sde_gpu",
717
+ "dpmpp_2m_sde_heun",
718
+ "dpmpp_2m_sde_heun_gpu",
719
+ "dpmpp_3m_sde",
720
+ "dpmpp_3m_sde_gpu",
721
+ "ddpm",
722
+ "lcm",
723
+ "ipndm",
724
+ "ipndm_v",
725
+ "deis",
726
+ "cfgpp_ud10_ab",
727
+ "res_multistep",
728
+ "res_multistep_cfg_pp",
729
+ "res_multistep_ancestral",
730
+ "res_multistep_ancestral_cfg_pp",
731
+ "gradient_estimation",
732
+ "gradient_estimation_cfg_pp",
733
+ "er_sde",
734
+ "seeds_2",
735
+ "seeds_3",
736
+ "sa_solver",
737
+ "sa_solver_pece",
738
+ "ddim",
739
+ "uni_pc",
740
+ "uni_pc_bh2"
741
+ ],
742
+ {
743
+ "tooltip": "The algorithm used when sampling, this can affect the quality, speed, and style of the generated output."
744
+ }
745
+ ],
746
+ "scheduler": [
747
+ [
748
+ "simple",
749
+ "sgm_uniform",
750
+ "karras",
751
+ "exponential",
752
+ "ddim_uniform",
753
+ "beta",
754
+ "normal",
755
+ "linear_quadratic",
756
+ "kl_optimal"
757
+ ],
758
+ {
759
+ "tooltip": "The scheduler controls how noise is gradually removed to form the image."
760
+ }
761
+ ],
762
+ "positive": [
763
+ "CONDITIONING",
764
+ {
765
+ "tooltip": "The conditioning describing the attributes you want to include in the image."
766
+ }
767
+ ],
768
+ "negative": [
769
+ "CONDITIONING",
770
+ {
771
+ "tooltip": "The conditioning describing the attributes you want to exclude from the image."
772
+ }
773
+ ],
774
+ "latent_image": [
775
+ "LATENT",
776
+ {
777
+ "tooltip": "The latent image to denoise."
778
+ }
779
+ ],
780
+ "denoise": [
781
+ "FLOAT",
782
+ {
783
+ "default": 1.0,
784
+ "min": 0.0,
785
+ "max": 1.0,
786
+ "step": 0.01,
787
+ "tooltip": "The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling."
788
+ }
789
+ ]
790
+ }
791
+ },
792
+ "input_order": {
793
+ "required": [
794
+ "model",
795
+ "seed",
796
+ "steps",
797
+ "cfg",
798
+ "sampler_name",
799
+ "scheduler",
800
+ "positive",
801
+ "negative",
802
+ "latent_image",
803
+ "denoise"
804
+ ]
805
+ },
806
+ "is_input_list": false,
807
+ "output": [
808
+ "LATENT"
809
+ ],
810
+ "output_is_list": [
811
+ false
812
+ ],
813
+ "output_name": [
814
+ "LATENT"
815
+ ],
816
+ "name": "KSampler",
817
+ "display_name": "KSampler",
818
+ "description": "Uses the provided model, positive and negative conditioning to denoise the latent image.",
819
+ "python_module": "nodes",
820
+ "category": "model/sampling",
821
+ "output_node": false,
822
+ "has_intermediate_output": false,
823
+ "output_tooltips": [
824
+ "The denoised latent."
825
+ ],
826
+ "search_aliases": [
827
+ "sampler",
828
+ "sample",
829
+ "generate",
830
+ "denoise",
831
+ "diffuse",
832
+ "txt2img",
833
+ "img2img"
834
+ ]
835
+ },
836
+ "KSamplerSelect": {
837
+ "input": {
838
+ "required": {
839
+ "sampler_name": [
840
+ "COMBO",
841
+ {
842
+ "multiselect": false,
843
+ "options": [
844
+ "euler",
845
+ "euler_cfg_pp",
846
+ "euler_ancestral",
847
+ "euler_ancestral_cfg_pp",
848
+ "heun",
849
+ "heunpp2",
850
+ "exp_heun_2_x0",
851
+ "exp_heun_2_x0_sde",
852
+ "dpm_2",
853
+ "dpm_2_ancestral",
854
+ "lms",
855
+ "dpm_fast",
856
+ "dpm_adaptive",
857
+ "dpmpp_2s_ancestral",
858
+ "dpmpp_2s_ancestral_cfg_pp",
859
+ "dpmpp_sde",
860
+ "dpmpp_sde_gpu",
861
+ "dpmpp_2m",
862
+ "dpmpp_2m_cfg_pp",
863
+ "dpmpp_2m_sde",
864
+ "dpmpp_2m_sde_gpu",
865
+ "dpmpp_2m_sde_heun",
866
+ "dpmpp_2m_sde_heun_gpu",
867
+ "dpmpp_3m_sde",
868
+ "dpmpp_3m_sde_gpu",
869
+ "ddpm",
870
+ "lcm",
871
+ "ipndm",
872
+ "ipndm_v",
873
+ "deis",
874
+ "cfgpp_ud10_ab",
875
+ "res_multistep",
876
+ "res_multistep_cfg_pp",
877
+ "res_multistep_ancestral",
878
+ "res_multistep_ancestral_cfg_pp",
879
+ "gradient_estimation",
880
+ "gradient_estimation_cfg_pp",
881
+ "er_sde",
882
+ "seeds_2",
883
+ "seeds_3",
884
+ "sa_solver",
885
+ "sa_solver_pece",
886
+ "ddim",
887
+ "uni_pc",
888
+ "uni_pc_bh2"
889
+ ]
890
+ }
891
+ ]
892
+ }
893
+ },
894
+ "input_order": {
895
+ "required": [
896
+ "sampler_name"
897
+ ]
898
+ },
899
+ "is_input_list": false,
900
+ "output": [
901
+ "SAMPLER"
902
+ ],
903
+ "output_is_list": [
904
+ false
905
+ ],
906
+ "output_name": [
907
+ "SAMPLER"
908
+ ],
909
+ "output_tooltips": [
910
+ null
911
+ ],
912
+ "output_matchtypes": null,
913
+ "name": "KSamplerSelect",
914
+ "display_name": null,
915
+ "description": "",
916
+ "python_module": "comfy_extras.nodes_custom_sampler",
917
+ "category": "model/sampling/samplers",
918
+ "output_node": false,
919
+ "deprecated": false,
920
+ "experimental": false,
921
+ "dev_only": false,
922
+ "api_node": false,
923
+ "price_badge": null,
924
+ "search_aliases": null,
925
+ "essentials_category": null,
926
+ "has_intermediate_output": false
927
+ },
928
+ "LoadImage": {
929
+ "input": {
930
+ "required": {
931
+ "image": [
932
+ [
933
+ "example.png"
934
+ ],
935
+ {
936
+ "image_upload": true
937
+ }
938
+ ]
939
+ }
940
+ },
941
+ "input_order": {
942
+ "required": [
943
+ "image"
944
+ ]
945
+ },
946
+ "is_input_list": false,
947
+ "output": [
948
+ "IMAGE",
949
+ "MASK"
950
+ ],
951
+ "output_is_list": [
952
+ false,
953
+ false
954
+ ],
955
+ "output_name": [
956
+ "IMAGE",
957
+ "MASK"
958
+ ],
959
+ "name": "LoadImage",
960
+ "display_name": "Load Image",
961
+ "description": "",
962
+ "python_module": "nodes",
963
+ "category": "image",
964
+ "output_node": false,
965
+ "has_intermediate_output": false,
966
+ "search_aliases": [
967
+ "load image",
968
+ "open image",
969
+ "import image",
970
+ "image input",
971
+ "upload image",
972
+ "read image",
973
+ "image loader"
974
+ ],
975
+ "essentials_category": "Basics"
976
+ },
977
+ "LoraLoaderModelOnly": {
978
+ "input": {
979
+ "required": {
980
+ "model": [
981
+ "MODEL"
982
+ ],
983
+ "lora_name": [
984
+ []
985
+ ],
986
+ "strength_model": [
987
+ "FLOAT",
988
+ {
989
+ "default": 1.0,
990
+ "min": -100.0,
991
+ "max": 100.0,
992
+ "step": 0.01
993
+ }
994
+ ]
995
+ }
996
+ },
997
+ "input_order": {
998
+ "required": [
999
+ "model",
1000
+ "lora_name",
1001
+ "strength_model"
1002
+ ]
1003
+ },
1004
+ "is_input_list": false,
1005
+ "output": [
1006
+ "MODEL"
1007
+ ],
1008
+ "output_is_list": [
1009
+ false
1010
+ ],
1011
+ "output_name": [
1012
+ "MODEL"
1013
+ ],
1014
+ "name": "LoraLoaderModelOnly",
1015
+ "display_name": "Load LoRA",
1016
+ "description": "This LoRAs loader is used to modify the diffusion model, altering the way in which latents are denoised such as applying styles. Multiple LoRA nodes can be linked together.",
1017
+ "python_module": "nodes",
1018
+ "category": "model/loaders",
1019
+ "output_node": false,
1020
+ "has_intermediate_output": false,
1021
+ "output_tooltips": [
1022
+ "The modified diffusion model.",
1023
+ "The modified CLIP model."
1024
+ ],
1025
+ "search_aliases": [
1026
+ "lora",
1027
+ "load lora",
1028
+ "apply lora",
1029
+ "lora loader",
1030
+ "lora model"
1031
+ ],
1032
+ "essentials_category": "Image Generation"
1033
+ },
1034
+ "MiniMaxH3ImageToVideo": {
1035
+ "input": {
1036
+ "required": {
1037
+ "clip": [
1038
+ "CLIP",
1039
+ {}
1040
+ ],
1041
+ "vae": [
1042
+ "VAE",
1043
+ {}
1044
+ ],
1045
+ "prompt": [
1046
+ "STRING",
1047
+ {
1048
+ "multiline": true,
1049
+ "dynamicPrompts": true
1050
+ }
1051
+ ],
1052
+ "width": [
1053
+ "INT",
1054
+ {
1055
+ "default": 1344,
1056
+ "min": 32,
1057
+ "max": 16384,
1058
+ "step": 32
1059
+ }
1060
+ ],
1061
+ "height": [
1062
+ "INT",
1063
+ {
1064
+ "default": 768,
1065
+ "min": 32,
1066
+ "max": 16384,
1067
+ "step": 32
1068
+ }
1069
+ ],
1070
+ "length": [
1071
+ "INT",
1072
+ {
1073
+ "tooltip": "Frame count at 24 fps, snapped up to the model's 17k+5 grid (124 = ~5s; trained range is ~124-362, longer is untested)",
1074
+ "default": 124,
1075
+ "min": 5,
1076
+ "max": 3600,
1077
+ "step": 17
1078
+ }
1079
+ ]
1080
+ },
1081
+ "optional": {
1082
+ "first_frame": [
1083
+ "IMAGE",
1084
+ {}
1085
+ ],
1086
+ "last_frame": [
1087
+ "IMAGE",
1088
+ {}
1089
+ ]
1090
+ }
1091
+ },
1092
+ "input_order": {
1093
+ "required": [
1094
+ "clip",
1095
+ "vae",
1096
+ "prompt",
1097
+ "width",
1098
+ "height",
1099
+ "length"
1100
+ ],
1101
+ "optional": [
1102
+ "first_frame",
1103
+ "last_frame"
1104
+ ]
1105
+ },
1106
+ "is_input_list": false,
1107
+ "output": [
1108
+ "CONDITIONING",
1109
+ "LATENT"
1110
+ ],
1111
+ "output_is_list": [
1112
+ false,
1113
+ false
1114
+ ],
1115
+ "output_name": [
1116
+ "positive",
1117
+ "LATENT"
1118
+ ],
1119
+ "output_tooltips": [
1120
+ null,
1121
+ null
1122
+ ],
1123
+ "output_matchtypes": null,
1124
+ "name": "MiniMaxH3ImageToVideo",
1125
+ "display_name": "MiniMax H3 Image to Video",
1126
+ "description": "",
1127
+ "python_module": "comfy_extras.nodes_minimax_h3",
1128
+ "category": "model/conditioning/minimax",
1129
+ "output_node": false,
1130
+ "deprecated": false,
1131
+ "experimental": false,
1132
+ "dev_only": false,
1133
+ "api_node": false,
1134
+ "price_badge": null,
1135
+ "search_aliases": null,
1136
+ "essentials_category": null,
1137
+ "has_intermediate_output": false
1138
+ },
1139
+ "ModelSamplingSD3": {
1140
+ "input": {
1141
+ "required": {
1142
+ "model": [
1143
+ "MODEL"
1144
+ ],
1145
+ "shift": [
1146
+ "FLOAT",
1147
+ {
1148
+ "default": 3.0,
1149
+ "min": 0.0,
1150
+ "max": 100.0,
1151
+ "step": 0.01
1152
+ }
1153
+ ]
1154
+ }
1155
+ },
1156
+ "input_order": {
1157
+ "required": [
1158
+ "model",
1159
+ "shift"
1160
+ ]
1161
+ },
1162
+ "is_input_list": false,
1163
+ "output": [
1164
+ "MODEL"
1165
+ ],
1166
+ "output_is_list": [
1167
+ false
1168
+ ],
1169
+ "output_name": [
1170
+ "MODEL"
1171
+ ],
1172
+ "name": "ModelSamplingSD3",
1173
+ "display_name": "ModelSamplingSD3",
1174
+ "description": "",
1175
+ "python_module": "comfy_extras.nodes_model_advanced",
1176
+ "category": "model/patch/stable diffusion",
1177
+ "output_node": false,
1178
+ "has_intermediate_output": false,
1179
+ "search_aliases": []
1180
+ },
1181
+ "PreviewImage": {
1182
+ "input": {
1183
+ "required": {
1184
+ "images": [
1185
+ "IMAGE"
1186
+ ]
1187
+ },
1188
+ "hidden": {
1189
+ "prompt": "PROMPT",
1190
+ "extra_pnginfo": "EXTRA_PNGINFO"
1191
+ }
1192
+ },
1193
+ "input_order": {
1194
+ "required": [
1195
+ "images"
1196
+ ],
1197
+ "hidden": [
1198
+ "prompt",
1199
+ "extra_pnginfo"
1200
+ ]
1201
+ },
1202
+ "is_input_list": false,
1203
+ "output": [
1204
+ "IMAGE"
1205
+ ],
1206
+ "output_is_list": [
1207
+ false
1208
+ ],
1209
+ "output_name": [
1210
+ "images"
1211
+ ],
1212
+ "name": "PreviewImage",
1213
+ "display_name": "Preview Image",
1214
+ "description": "Preview the images without saving them to the ComfyUI output directory.",
1215
+ "python_module": "nodes",
1216
+ "category": "image",
1217
+ "output_node": true,
1218
+ "has_intermediate_output": false,
1219
+ "search_aliases": [
1220
+ "preview",
1221
+ "preview image",
1222
+ "show image",
1223
+ "view image",
1224
+ "display image",
1225
+ "image viewer"
1226
+ ],
1227
+ "essentials_category": "Basics"
1228
+ },
1229
+ "PrimitiveBoolean": {
1230
+ "input": {
1231
+ "required": {
1232
+ "value": [
1233
+ "BOOLEAN",
1234
+ {}
1235
+ ]
1236
+ }
1237
+ },
1238
+ "input_order": {
1239
+ "required": [
1240
+ "value"
1241
+ ]
1242
+ },
1243
+ "is_input_list": false,
1244
+ "output": [
1245
+ "BOOLEAN"
1246
+ ],
1247
+ "output_is_list": [
1248
+ false
1249
+ ],
1250
+ "output_name": [
1251
+ "BOOLEAN"
1252
+ ],
1253
+ "output_tooltips": [
1254
+ null
1255
+ ],
1256
+ "output_matchtypes": null,
1257
+ "name": "PrimitiveBoolean",
1258
+ "display_name": "Boolean",
1259
+ "description": "",
1260
+ "python_module": "comfy_extras.nodes_primitive",
1261
+ "category": "utilities/primitive",
1262
+ "output_node": false,
1263
+ "deprecated": false,
1264
+ "experimental": false,
1265
+ "dev_only": false,
1266
+ "api_node": false,
1267
+ "price_badge": null,
1268
+ "search_aliases": null,
1269
+ "essentials_category": null,
1270
+ "has_intermediate_output": false
1271
+ },
1272
+ "PrimitiveFloat": {
1273
+ "input": {
1274
+ "required": {
1275
+ "value": [
1276
+ "FLOAT",
1277
+ {
1278
+ "min": -9223372036854775807,
1279
+ "max": 9223372036854775807,
1280
+ "step": 0.1
1281
+ }
1282
+ ]
1283
+ }
1284
+ },
1285
+ "input_order": {
1286
+ "required": [
1287
+ "value"
1288
+ ]
1289
+ },
1290
+ "is_input_list": false,
1291
+ "output": [
1292
+ "FLOAT"
1293
+ ],
1294
+ "output_is_list": [
1295
+ false
1296
+ ],
1297
+ "output_name": [
1298
+ "FLOAT"
1299
+ ],
1300
+ "output_tooltips": [
1301
+ null
1302
+ ],
1303
+ "output_matchtypes": null,
1304
+ "name": "PrimitiveFloat",
1305
+ "display_name": "Float",
1306
+ "description": "",
1307
+ "python_module": "comfy_extras.nodes_primitive",
1308
+ "category": "utilities/primitive",
1309
+ "output_node": false,
1310
+ "deprecated": false,
1311
+ "experimental": false,
1312
+ "dev_only": false,
1313
+ "api_node": false,
1314
+ "price_badge": null,
1315
+ "search_aliases": null,
1316
+ "essentials_category": null,
1317
+ "has_intermediate_output": false
1318
+ },
1319
+ "PrimitiveInt": {
1320
+ "input": {
1321
+ "required": {
1322
+ "value": [
1323
+ "INT",
1324
+ {
1325
+ "min": -9223372036854775807,
1326
+ "max": 9223372036854775807,
1327
+ "control_after_generate": "fixed"
1328
+ }
1329
+ ]
1330
+ }
1331
+ },
1332
+ "input_order": {
1333
+ "required": [
1334
+ "value"
1335
+ ]
1336
+ },
1337
+ "is_input_list": false,
1338
+ "output": [
1339
+ "INT"
1340
+ ],
1341
+ "output_is_list": [
1342
+ false
1343
+ ],
1344
+ "output_name": [
1345
+ "INT"
1346
+ ],
1347
+ "output_tooltips": [
1348
+ null
1349
+ ],
1350
+ "output_matchtypes": null,
1351
+ "name": "PrimitiveInt",
1352
+ "display_name": "Int",
1353
+ "description": "",
1354
+ "python_module": "comfy_extras.nodes_primitive",
1355
+ "category": "utilities/primitive",
1356
+ "output_node": false,
1357
+ "deprecated": false,
1358
+ "experimental": false,
1359
+ "dev_only": false,
1360
+ "api_node": false,
1361
+ "price_badge": null,
1362
+ "search_aliases": null,
1363
+ "essentials_category": null,
1364
+ "has_intermediate_output": false
1365
+ },
1366
+ "RandomNoise": {
1367
+ "input": {
1368
+ "required": {
1369
+ "noise_seed": [
1370
+ "INT",
1371
+ {
1372
+ "default": 0,
1373
+ "min": 0,
1374
+ "max": 18446744073709551615,
1375
+ "control_after_generate": true
1376
+ }
1377
+ ]
1378
+ }
1379
+ },
1380
+ "input_order": {
1381
+ "required": [
1382
+ "noise_seed"
1383
+ ]
1384
+ },
1385
+ "is_input_list": false,
1386
+ "output": [
1387
+ "NOISE"
1388
+ ],
1389
+ "output_is_list": [
1390
+ false
1391
+ ],
1392
+ "output_name": [
1393
+ "NOISE"
1394
+ ],
1395
+ "output_tooltips": [
1396
+ null
1397
+ ],
1398
+ "output_matchtypes": null,
1399
+ "name": "RandomNoise",
1400
+ "display_name": null,
1401
+ "description": "",
1402
+ "python_module": "comfy_extras.nodes_custom_sampler",
1403
+ "category": "model/sampling/noise",
1404
+ "output_node": false,
1405
+ "deprecated": false,
1406
+ "experimental": false,
1407
+ "dev_only": false,
1408
+ "api_node": false,
1409
+ "price_badge": null,
1410
+ "search_aliases": null,
1411
+ "essentials_category": null,
1412
+ "has_intermediate_output": false
1413
+ },
1414
+ "ResolutionSelector": {
1415
+ "input": {
1416
+ "required": {
1417
+ "aspect_ratio": [
1418
+ "COMBO",
1419
+ {
1420
+ "tooltip": "The aspect ratio for the output dimensions.",
1421
+ "default": "1:1 (Square)",
1422
+ "multiselect": false,
1423
+ "options": [
1424
+ "1:1 (Square)",
1425
+ "2:3 (Portrait Photo)",
1426
+ "3:2 (Photo)",
1427
+ "3:4 (Portrait Standard)",
1428
+ "4:3 (Standard)",
1429
+ "9:16 (Portrait Widescreen)",
1430
+ "16:9 (Widescreen)",
1431
+ "21:9 (Ultrawide)"
1432
+ ]
1433
+ }
1434
+ ],
1435
+ "megapixels": [
1436
+ "FLOAT",
1437
+ {
1438
+ "tooltip": "Target total megapixels. 1.0 MP \u2248 1024x1024 for square.",
1439
+ "default": 1.0,
1440
+ "min": 0.1,
1441
+ "max": 16.0,
1442
+ "step": 0.1
1443
+ }
1444
+ ],
1445
+ "multiple": [
1446
+ "INT",
1447
+ {
1448
+ "tooltip": "Nearest multiple of the result to set the selected resolution to.",
1449
+ "advanced": true,
1450
+ "default": 8,
1451
+ "min": 8,
1452
+ "max": 128,
1453
+ "step": 4
1454
+ }
1455
+ ]
1456
+ },
1457
+ "optional": {
1458
+ "preview": [
1459
+ "RESOLUTION_PREVIEW",
1460
+ {
1461
+ "tooltip": "Live preview of the calculated output resolution.",
1462
+ "socketless": true,
1463
+ "ratio_widget": "aspect_ratio",
1464
+ "megapixels_widget": "megapixels",
1465
+ "multiple_widget": "multiple"
1466
+ }
1467
+ ]
1468
+ }
1469
+ },
1470
+ "input_order": {
1471
+ "required": [
1472
+ "aspect_ratio",
1473
+ "megapixels",
1474
+ "multiple"
1475
+ ],
1476
+ "optional": [
1477
+ "preview"
1478
+ ]
1479
+ },
1480
+ "is_input_list": false,
1481
+ "output": [
1482
+ "INT",
1483
+ "INT"
1484
+ ],
1485
+ "output_is_list": [
1486
+ false,
1487
+ false
1488
+ ],
1489
+ "output_name": [
1490
+ "width",
1491
+ "height"
1492
+ ],
1493
+ "output_tooltips": [
1494
+ "Calculated width in pixels multiplied by the selected multiple.",
1495
+ "Calculated height in pixels multiplied by the selected multiple."
1496
+ ],
1497
+ "output_matchtypes": null,
1498
+ "name": "ResolutionSelector",
1499
+ "display_name": "Resolution Selector",
1500
+ "description": "Calculate width and height from aspect ratio and megapixel target. Useful for setting up Empty Latent Image dimensions.",
1501
+ "python_module": "comfy_extras.nodes_resolution",
1502
+ "category": "utilities",
1503
+ "output_node": false,
1504
+ "deprecated": false,
1505
+ "experimental": false,
1506
+ "dev_only": false,
1507
+ "api_node": false,
1508
+ "price_badge": null,
1509
+ "search_aliases": null,
1510
+ "essentials_category": null,
1511
+ "has_intermediate_output": false
1512
+ },
1513
+ "SamplerCustomAdvanced": {
1514
+ "input": {
1515
+ "required": {
1516
+ "noise": [
1517
+ "NOISE",
1518
+ {}
1519
+ ],
1520
+ "guider": [
1521
+ "GUIDER",
1522
+ {}
1523
+ ],
1524
+ "sampler": [
1525
+ "SAMPLER",
1526
+ {}
1527
+ ],
1528
+ "sigmas": [
1529
+ "SIGMAS",
1530
+ {}
1531
+ ],
1532
+ "latent_image": [
1533
+ "LATENT",
1534
+ {}
1535
+ ]
1536
+ }
1537
+ },
1538
+ "input_order": {
1539
+ "required": [
1540
+ "noise",
1541
+ "guider",
1542
+ "sampler",
1543
+ "sigmas",
1544
+ "latent_image"
1545
+ ]
1546
+ },
1547
+ "is_input_list": false,
1548
+ "output": [
1549
+ "LATENT",
1550
+ "LATENT"
1551
+ ],
1552
+ "output_is_list": [
1553
+ false,
1554
+ false
1555
+ ],
1556
+ "output_name": [
1557
+ "output",
1558
+ "denoised_output"
1559
+ ],
1560
+ "output_tooltips": [
1561
+ null,
1562
+ null
1563
+ ],
1564
+ "output_matchtypes": null,
1565
+ "name": "SamplerCustomAdvanced",
1566
+ "display_name": null,
1567
+ "description": "",
1568
+ "python_module": "comfy_extras.nodes_custom_sampler",
1569
+ "category": "model/sampling/custom",
1570
+ "output_node": false,
1571
+ "deprecated": false,
1572
+ "experimental": false,
1573
+ "dev_only": false,
1574
+ "api_node": false,
1575
+ "price_badge": null,
1576
+ "search_aliases": null,
1577
+ "essentials_category": null,
1578
+ "has_intermediate_output": false
1579
+ },
1580
+ "SaveVideo": {
1581
+ "input": {
1582
+ "required": {
1583
+ "video": [
1584
+ "VIDEO",
1585
+ {
1586
+ "tooltip": "The video to save."
1587
+ }
1588
+ ],
1589
+ "filename_prefix": [
1590
+ "STRING",
1591
+ {
1592
+ "tooltip": "The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.",
1593
+ "default": "video/ComfyUI",
1594
+ "multiline": false
1595
+ }
1596
+ ],
1597
+ "format": [
1598
+ "COMFY_DYNAMICCOMBO_V3",
1599
+ {
1600
+ "tooltip": "The output container. Auto uses MP4 for Auto/H.264 and WebM for AV1. MP4, MKV, and WebM select a specific container.",
1601
+ "options": [
1602
+ {
1603
+ "key": "auto",
1604
+ "inputs": {
1605
+ "required": {
1606
+ "codec": [
1607
+ "COMFY_DYNAMICCOMBO_V3",
1608
+ {
1609
+ "tooltip": "The output video codec. Auto preserves a compatible source stream. H.264 and AV1 re-encoding support SDR, HDR (HLG), and HDR PQ.",
1610
+ "options": [
1611
+ {
1612
+ "key": "auto",
1613
+ "inputs": {
1614
+ "required": {}
1615
+ }
1616
+ },
1617
+ {
1618
+ "key": "h264",
1619
+ "inputs": {
1620
+ "required": {},
1621
+ "optional": {
1622
+ "encoding": [
1623
+ "COMFY_DYNAMICCOMBO_V3",
1624
+ {
1625
+ "display_name": "encoding mode",
1626
+ "tooltip": "Automatic preserves compatible H.264 streams. Re-encode applies custom encoding options.",
1627
+ "options": [
1628
+ {
1629
+ "key": "auto",
1630
+ "inputs": {
1631
+ "required": {}
1632
+ }
1633
+ },
1634
+ {
1635
+ "key": "re-encode",
1636
+ "inputs": {
1637
+ "required": {
1638
+ "crf": [
1639
+ "FLOAT",
1640
+ {
1641
+ "tooltip": "Lower values produce higher quality and larger files.",
1642
+ "default": 23.0,
1643
+ "min": 0.0,
1644
+ "max": 51.0,
1645
+ "step": 1.0
1646
+ }
1647
+ ]
1648
+ }
1649
+ }
1650
+ }
1651
+ ]
1652
+ }
1653
+ ]
1654
+ }
1655
+ }
1656
+ },
1657
+ {
1658
+ "key": "av1",
1659
+ "inputs": {
1660
+ "required": {},
1661
+ "optional": {
1662
+ "encoding": [
1663
+ "COMFY_DYNAMICCOMBO_V3",
1664
+ {
1665
+ "display_name": "encoding mode",
1666
+ "tooltip": "Automatic preserves compatible AV1 streams. Re-encode applies custom encoding options.",
1667
+ "options": [
1668
+ {
1669
+ "key": "auto",
1670
+ "inputs": {
1671
+ "required": {}
1672
+ }
1673
+ },
1674
+ {
1675
+ "key": "re-encode",
1676
+ "inputs": {
1677
+ "required": {
1678
+ "crf": [
1679
+ "FLOAT",
1680
+ {
1681
+ "tooltip": "Lower values produce higher quality and larger files.",
1682
+ "default": 30.0,
1683
+ "min": 0.0,
1684
+ "max": 63.0,
1685
+ "step": 1.0
1686
+ }
1687
+ ]
1688
+ }
1689
+ }
1690
+ }
1691
+ ]
1692
+ }
1693
+ ]
1694
+ }
1695
+ }
1696
+ }
1697
+ ]
1698
+ }
1699
+ ]
1700
+ }
1701
+ }
1702
+ },
1703
+ {
1704
+ "key": "mp4",
1705
+ "inputs": {
1706
+ "required": {
1707
+ "codec": [
1708
+ "COMFY_DYNAMICCOMBO_V3",
1709
+ {
1710
+ "tooltip": "The output video codec. Auto preserves a compatible source stream. H.264 and AV1 re-encoding support SDR, HDR (HLG), and HDR PQ.",
1711
+ "options": [
1712
+ {
1713
+ "key": "auto",
1714
+ "inputs": {
1715
+ "required": {}
1716
+ }
1717
+ },
1718
+ {
1719
+ "key": "h264",
1720
+ "inputs": {
1721
+ "required": {},
1722
+ "optional": {
1723
+ "encoding": [
1724
+ "COMFY_DYNAMICCOMBO_V3",
1725
+ {
1726
+ "display_name": "encoding mode",
1727
+ "tooltip": "Automatic preserves compatible H.264 streams. Re-encode applies custom encoding options.",
1728
+ "options": [
1729
+ {
1730
+ "key": "auto",
1731
+ "inputs": {
1732
+ "required": {}
1733
+ }
1734
+ },
1735
+ {
1736
+ "key": "re-encode",
1737
+ "inputs": {
1738
+ "required": {
1739
+ "crf": [
1740
+ "FLOAT",
1741
+ {
1742
+ "tooltip": "Lower values produce higher quality and larger files.",
1743
+ "default": 23.0,
1744
+ "min": 0.0,
1745
+ "max": 51.0,
1746
+ "step": 1.0
1747
+ }
1748
+ ]
1749
+ }
1750
+ }
1751
+ }
1752
+ ]
1753
+ }
1754
+ ]
1755
+ }
1756
+ }
1757
+ },
1758
+ {
1759
+ "key": "av1",
1760
+ "inputs": {
1761
+ "required": {},
1762
+ "optional": {
1763
+ "encoding": [
1764
+ "COMFY_DYNAMICCOMBO_V3",
1765
+ {
1766
+ "display_name": "encoding mode",
1767
+ "tooltip": "Automatic preserves compatible AV1 streams. Re-encode applies custom encoding options.",
1768
+ "options": [
1769
+ {
1770
+ "key": "auto",
1771
+ "inputs": {
1772
+ "required": {}
1773
+ }
1774
+ },
1775
+ {
1776
+ "key": "re-encode",
1777
+ "inputs": {
1778
+ "required": {
1779
+ "crf": [
1780
+ "FLOAT",
1781
+ {
1782
+ "tooltip": "Lower values produce higher quality and larger files.",
1783
+ "default": 30.0,
1784
+ "min": 0.0,
1785
+ "max": 63.0,
1786
+ "step": 1.0
1787
+ }
1788
+ ]
1789
+ }
1790
+ }
1791
+ }
1792
+ ]
1793
+ }
1794
+ ]
1795
+ }
1796
+ }
1797
+ }
1798
+ ]
1799
+ }
1800
+ ]
1801
+ }
1802
+ }
1803
+ },
1804
+ {
1805
+ "key": "mkv",
1806
+ "inputs": {
1807
+ "required": {
1808
+ "codec": [
1809
+ "COMFY_DYNAMICCOMBO_V3",
1810
+ {
1811
+ "tooltip": "The output video codec. Auto preserves a compatible source stream. H.264 and AV1 re-encoding support SDR, HDR (HLG), and HDR PQ.",
1812
+ "options": [
1813
+ {
1814
+ "key": "auto",
1815
+ "inputs": {
1816
+ "required": {}
1817
+ }
1818
+ },
1819
+ {
1820
+ "key": "h264",
1821
+ "inputs": {
1822
+ "required": {},
1823
+ "optional": {
1824
+ "encoding": [
1825
+ "COMFY_DYNAMICCOMBO_V3",
1826
+ {
1827
+ "display_name": "encoding mode",
1828
+ "tooltip": "Automatic preserves compatible H.264 streams. Re-encode applies custom encoding options.",
1829
+ "options": [
1830
+ {
1831
+ "key": "auto",
1832
+ "inputs": {
1833
+ "required": {}
1834
+ }
1835
+ },
1836
+ {
1837
+ "key": "re-encode",
1838
+ "inputs": {
1839
+ "required": {
1840
+ "crf": [
1841
+ "FLOAT",
1842
+ {
1843
+ "tooltip": "Lower values produce higher quality and larger files.",
1844
+ "default": 23.0,
1845
+ "min": 0.0,
1846
+ "max": 51.0,
1847
+ "step": 1.0
1848
+ }
1849
+ ]
1850
+ }
1851
+ }
1852
+ }
1853
+ ]
1854
+ }
1855
+ ]
1856
+ }
1857
+ }
1858
+ },
1859
+ {
1860
+ "key": "av1",
1861
+ "inputs": {
1862
+ "required": {},
1863
+ "optional": {
1864
+ "encoding": [
1865
+ "COMFY_DYNAMICCOMBO_V3",
1866
+ {
1867
+ "display_name": "encoding mode",
1868
+ "tooltip": "Automatic preserves compatible AV1 streams. Re-encode applies custom encoding options.",
1869
+ "options": [
1870
+ {
1871
+ "key": "auto",
1872
+ "inputs": {
1873
+ "required": {}
1874
+ }
1875
+ },
1876
+ {
1877
+ "key": "re-encode",
1878
+ "inputs": {
1879
+ "required": {
1880
+ "crf": [
1881
+ "FLOAT",
1882
+ {
1883
+ "tooltip": "Lower values produce higher quality and larger files.",
1884
+ "default": 30.0,
1885
+ "min": 0.0,
1886
+ "max": 63.0,
1887
+ "step": 1.0
1888
+ }
1889
+ ]
1890
+ }
1891
+ }
1892
+ }
1893
+ ]
1894
+ }
1895
+ ]
1896
+ }
1897
+ }
1898
+ }
1899
+ ]
1900
+ }
1901
+ ]
1902
+ }
1903
+ }
1904
+ },
1905
+ {
1906
+ "key": "webm",
1907
+ "inputs": {
1908
+ "required": {
1909
+ "codec": [
1910
+ "COMFY_DYNAMICCOMBO_V3",
1911
+ {
1912
+ "tooltip": "The output video codec. Auto preserves a compatible source stream. H.264 and AV1 re-encoding support SDR, HDR (HLG), and HDR PQ.",
1913
+ "options": [
1914
+ {
1915
+ "key": "auto",
1916
+ "inputs": {
1917
+ "required": {}
1918
+ }
1919
+ },
1920
+ {
1921
+ "key": "av1",
1922
+ "inputs": {
1923
+ "required": {},
1924
+ "optional": {
1925
+ "encoding": [
1926
+ "COMFY_DYNAMICCOMBO_V3",
1927
+ {
1928
+ "display_name": "encoding mode",
1929
+ "tooltip": "Automatic preserves compatible AV1 streams. Re-encode applies custom encoding options.",
1930
+ "options": [
1931
+ {
1932
+ "key": "auto",
1933
+ "inputs": {
1934
+ "required": {}
1935
+ }
1936
+ },
1937
+ {
1938
+ "key": "re-encode",
1939
+ "inputs": {
1940
+ "required": {
1941
+ "crf": [
1942
+ "FLOAT",
1943
+ {
1944
+ "tooltip": "Lower values produce higher quality and larger files.",
1945
+ "default": 30.0,
1946
+ "min": 0.0,
1947
+ "max": 63.0,
1948
+ "step": 1.0
1949
+ }
1950
+ ]
1951
+ }
1952
+ }
1953
+ }
1954
+ ]
1955
+ }
1956
+ ]
1957
+ }
1958
+ }
1959
+ }
1960
+ ]
1961
+ }
1962
+ ]
1963
+ }
1964
+ }
1965
+ }
1966
+ ]
1967
+ }
1968
+ ]
1969
+ },
1970
+ "optional": {
1971
+ "codec": [
1972
+ "COMFY_DYNAMICCOMBO_V3",
1973
+ {
1974
+ "tooltip": "The output video codec. Auto preserves a compatible source stream. H.264 and AV1 re-encoding support SDR, HDR (HLG), and HDR PQ.",
1975
+ "hidden": true,
1976
+ "options": [
1977
+ {
1978
+ "key": "auto",
1979
+ "inputs": {
1980
+ "required": {}
1981
+ }
1982
+ },
1983
+ {
1984
+ "key": "h264",
1985
+ "inputs": {
1986
+ "required": {},
1987
+ "optional": {
1988
+ "encoding": [
1989
+ "COMFY_DYNAMICCOMBO_V3",
1990
+ {
1991
+ "display_name": "encoding mode",
1992
+ "tooltip": "Automatic preserves compatible H.264 streams. Re-encode applies custom encoding options.",
1993
+ "options": [
1994
+ {
1995
+ "key": "auto",
1996
+ "inputs": {
1997
+ "required": {}
1998
+ }
1999
+ },
2000
+ {
2001
+ "key": "re-encode",
2002
+ "inputs": {
2003
+ "required": {
2004
+ "crf": [
2005
+ "FLOAT",
2006
+ {
2007
+ "tooltip": "Lower values produce higher quality and larger files.",
2008
+ "default": 23.0,
2009
+ "min": 0.0,
2010
+ "max": 51.0,
2011
+ "step": 1.0
2012
+ }
2013
+ ]
2014
+ }
2015
+ }
2016
+ }
2017
+ ]
2018
+ }
2019
+ ]
2020
+ }
2021
+ }
2022
+ },
2023
+ {
2024
+ "key": "av1",
2025
+ "inputs": {
2026
+ "required": {},
2027
+ "optional": {
2028
+ "encoding": [
2029
+ "COMFY_DYNAMICCOMBO_V3",
2030
+ {
2031
+ "display_name": "encoding mode",
2032
+ "tooltip": "Automatic preserves compatible AV1 streams. Re-encode applies custom encoding options.",
2033
+ "options": [
2034
+ {
2035
+ "key": "auto",
2036
+ "inputs": {
2037
+ "required": {}
2038
+ }
2039
+ },
2040
+ {
2041
+ "key": "re-encode",
2042
+ "inputs": {
2043
+ "required": {
2044
+ "crf": [
2045
+ "FLOAT",
2046
+ {
2047
+ "tooltip": "Lower values produce higher quality and larger files.",
2048
+ "default": 30.0,
2049
+ "min": 0.0,
2050
+ "max": 63.0,
2051
+ "step": 1.0
2052
+ }
2053
+ ]
2054
+ }
2055
+ }
2056
+ }
2057
+ ]
2058
+ }
2059
+ ]
2060
+ }
2061
+ }
2062
+ }
2063
+ ]
2064
+ }
2065
+ ]
2066
+ },
2067
+ "hidden": {
2068
+ "prompt": [
2069
+ "PROMPT"
2070
+ ],
2071
+ "extra_pnginfo": [
2072
+ "EXTRA_PNGINFO"
2073
+ ]
2074
+ }
2075
+ },
2076
+ "input_order": {
2077
+ "required": [
2078
+ "video",
2079
+ "filename_prefix",
2080
+ "format"
2081
+ ],
2082
+ "optional": [
2083
+ "codec"
2084
+ ],
2085
+ "hidden": [
2086
+ "prompt",
2087
+ "extra_pnginfo"
2088
+ ]
2089
+ },
2090
+ "is_input_list": false,
2091
+ "output": [
2092
+ "VIDEO"
2093
+ ],
2094
+ "output_is_list": [
2095
+ false
2096
+ ],
2097
+ "output_name": [
2098
+ "video"
2099
+ ],
2100
+ "output_tooltips": [
2101
+ "The input video, unchanged."
2102
+ ],
2103
+ "output_matchtypes": null,
2104
+ "name": "SaveVideo",
2105
+ "display_name": "Save Video",
2106
+ "description": "Saves the input videos to your ComfyUI output directory.",
2107
+ "python_module": "comfy_extras.nodes_video",
2108
+ "category": "video",
2109
+ "output_node": true,
2110
+ "deprecated": false,
2111
+ "experimental": false,
2112
+ "dev_only": false,
2113
+ "api_node": false,
2114
+ "price_badge": null,
2115
+ "search_aliases": [
2116
+ "export video"
2117
+ ],
2118
+ "essentials_category": "Basics",
2119
+ "has_intermediate_output": false
2120
+ },
2121
+ "UNETLoader": {
2122
+ "input": {
2123
+ "required": {
2124
+ "unet_name": [
2125
+ [
2126
+ "krea2_turbo_fp8.safetensors",
2127
+ "minimax_h3_fl2va_pruned_int8_convrot.safetensors",
2128
+ "wan2.2_ti2v_5B_fp16.safetensors"
2129
+ ]
2130
+ ],
2131
+ "weight_dtype": [
2132
+ [
2133
+ "default",
2134
+ "fp8_e4m3fn",
2135
+ "fp8_e4m3fn_fast",
2136
+ "fp8_e5m2"
2137
+ ],
2138
+ {
2139
+ "advanced": true
2140
+ }
2141
+ ]
2142
+ }
2143
+ },
2144
+ "input_order": {
2145
+ "required": [
2146
+ "unet_name",
2147
+ "weight_dtype"
2148
+ ]
2149
+ },
2150
+ "is_input_list": false,
2151
+ "output": [
2152
+ "MODEL"
2153
+ ],
2154
+ "output_is_list": [
2155
+ false
2156
+ ],
2157
+ "output_name": [
2158
+ "MODEL"
2159
+ ],
2160
+ "name": "UNETLoader",
2161
+ "display_name": "Load Diffusion Model",
2162
+ "description": "",
2163
+ "python_module": "nodes",
2164
+ "category": "model/loaders",
2165
+ "output_node": false,
2166
+ "has_intermediate_output": false,
2167
+ "search_aliases": []
2168
+ },
2169
+ "UnetLoaderGGUF": {
2170
+ "input": {
2171
+ "required": {
2172
+ "unet_name": [
2173
+ [
2174
+ "Wan2.2-TI2V-5B-Q8_0.gguf"
2175
+ ]
2176
+ ]
2177
+ }
2178
+ },
2179
+ "input_order": {
2180
+ "required": [
2181
+ "unet_name"
2182
+ ]
2183
+ },
2184
+ "is_input_list": false,
2185
+ "output": [
2186
+ "MODEL"
2187
+ ],
2188
+ "output_is_list": [
2189
+ false
2190
+ ],
2191
+ "output_name": [
2192
+ "MODEL"
2193
+ ],
2194
+ "name": "UnetLoaderGGUF",
2195
+ "display_name": "Unet Loader (GGUF)",
2196
+ "description": "",
2197
+ "python_module": "custom_nodes.ComfyUI-GGUF",
2198
+ "category": "bootleg",
2199
+ "output_node": false,
2200
+ "has_intermediate_output": false,
2201
+ "search_aliases": []
2202
+ },
2203
+ "VAEDecode": {
2204
+ "input": {
2205
+ "required": {
2206
+ "samples": [
2207
+ "LATENT",
2208
+ {
2209
+ "tooltip": "The latent to be decoded."
2210
+ }
2211
+ ],
2212
+ "vae": [
2213
+ "VAE",
2214
+ {
2215
+ "tooltip": "The VAE model used for decoding the latent."
2216
+ }
2217
+ ]
2218
+ }
2219
+ },
2220
+ "input_order": {
2221
+ "required": [
2222
+ "samples",
2223
+ "vae"
2224
+ ]
2225
+ },
2226
+ "is_input_list": false,
2227
+ "output": [
2228
+ "IMAGE"
2229
+ ],
2230
+ "output_is_list": [
2231
+ false
2232
+ ],
2233
+ "output_name": [
2234
+ "IMAGE"
2235
+ ],
2236
+ "name": "VAEDecode",
2237
+ "display_name": "VAE Decode",
2238
+ "description": "Decodes latent images back into pixel space images.",
2239
+ "python_module": "nodes",
2240
+ "category": "model/latent",
2241
+ "output_node": false,
2242
+ "has_intermediate_output": false,
2243
+ "output_tooltips": [
2244
+ "The decoded image."
2245
+ ],
2246
+ "search_aliases": [
2247
+ "decode",
2248
+ "decode latent",
2249
+ "latent to image",
2250
+ "render latent"
2251
+ ]
2252
+ },
2253
+ "VAEDecodeAudio": {
2254
+ "input": {
2255
+ "required": {
2256
+ "samples": [
2257
+ "LATENT",
2258
+ {}
2259
+ ],
2260
+ "vae": [
2261
+ "VAE",
2262
+ {}
2263
+ ]
2264
+ }
2265
+ },
2266
+ "input_order": {
2267
+ "required": [
2268
+ "samples",
2269
+ "vae"
2270
+ ]
2271
+ },
2272
+ "is_input_list": false,
2273
+ "output": [
2274
+ "AUDIO"
2275
+ ],
2276
+ "output_is_list": [
2277
+ false
2278
+ ],
2279
+ "output_name": [
2280
+ "AUDIO"
2281
+ ],
2282
+ "output_tooltips": [
2283
+ null
2284
+ ],
2285
+ "output_matchtypes": null,
2286
+ "name": "VAEDecodeAudio",
2287
+ "display_name": "VAE Decode Audio",
2288
+ "description": "",
2289
+ "python_module": "comfy_extras.nodes_audio",
2290
+ "category": "model/latent",
2291
+ "output_node": false,
2292
+ "deprecated": false,
2293
+ "experimental": false,
2294
+ "dev_only": false,
2295
+ "api_node": false,
2296
+ "price_badge": null,
2297
+ "search_aliases": [
2298
+ "latent to audio"
2299
+ ],
2300
+ "essentials_category": null,
2301
+ "has_intermediate_output": false
2302
+ },
2303
+ "VAELoader": {
2304
+ "input": {
2305
+ "required": {
2306
+ "vae_name": [
2307
+ [
2308
+ "minimax_h3_audio_vae_fp32.safetensors",
2309
+ "minimax_h3_video_vae_fp16.safetensors",
2310
+ "qwen_image_vae.safetensors",
2311
+ "wan2.2_vae.safetensors",
2312
+ "pixel_space"
2313
+ ]
2314
+ ]
2315
+ }
2316
+ },
2317
+ "input_order": {
2318
+ "required": [
2319
+ "vae_name"
2320
+ ]
2321
+ },
2322
+ "is_input_list": false,
2323
+ "output": [
2324
+ "VAE"
2325
+ ],
2326
+ "output_is_list": [
2327
+ false
2328
+ ],
2329
+ "output_name": [
2330
+ "VAE"
2331
+ ],
2332
+ "name": "VAELoader",
2333
+ "display_name": "Load VAE",
2334
+ "description": "",
2335
+ "python_module": "nodes",
2336
+ "category": "model/loaders",
2337
+ "output_node": false,
2338
+ "has_intermediate_output": false,
2339
+ "search_aliases": []
2340
+ },
2341
+ "Wan22ImageToVideoLatent": {
2342
+ "input": {
2343
+ "required": {
2344
+ "vae": [
2345
+ "VAE",
2346
+ {}
2347
+ ],
2348
+ "width": [
2349
+ "INT",
2350
+ {
2351
+ "default": 1280,
2352
+ "min": 32,
2353
+ "max": 16384,
2354
+ "step": 32
2355
+ }
2356
+ ],
2357
+ "height": [
2358
+ "INT",
2359
+ {
2360
+ "default": 704,
2361
+ "min": 32,
2362
+ "max": 16384,
2363
+ "step": 32
2364
+ }
2365
+ ],
2366
+ "length": [
2367
+ "INT",
2368
+ {
2369
+ "default": 49,
2370
+ "min": 1,
2371
+ "max": 16384,
2372
+ "step": 4
2373
+ }
2374
+ ],
2375
+ "batch_size": [
2376
+ "INT",
2377
+ {
2378
+ "default": 1,
2379
+ "min": 1,
2380
+ "max": 4096
2381
+ }
2382
+ ]
2383
+ },
2384
+ "optional": {
2385
+ "start_image": [
2386
+ "IMAGE",
2387
+ {}
2388
+ ]
2389
+ }
2390
+ },
2391
+ "input_order": {
2392
+ "required": [
2393
+ "vae",
2394
+ "width",
2395
+ "height",
2396
+ "length",
2397
+ "batch_size"
2398
+ ],
2399
+ "optional": [
2400
+ "start_image"
2401
+ ]
2402
+ },
2403
+ "is_input_list": false,
2404
+ "output": [
2405
+ "LATENT"
2406
+ ],
2407
+ "output_is_list": [
2408
+ false
2409
+ ],
2410
+ "output_name": [
2411
+ "LATENT"
2412
+ ],
2413
+ "output_tooltips": [
2414
+ null
2415
+ ],
2416
+ "output_matchtypes": null,
2417
+ "name": "Wan22ImageToVideoLatent",
2418
+ "display_name": null,
2419
+ "description": "",
2420
+ "python_module": "comfy_extras.nodes_wan",
2421
+ "category": "model/conditioning/wan",
2422
+ "output_node": false,
2423
+ "deprecated": false,
2424
+ "experimental": false,
2425
+ "dev_only": false,
2426
+ "api_node": false,
2427
+ "price_badge": null,
2428
+ "search_aliases": null,
2429
+ "essentials_category": null,
2430
+ "has_intermediate_output": false
2431
+ }
2432
+ }
2433
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/mock_comfy.py ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """A mock ComfyUI for the GPU-free self-test.
2
+
3
+ It reproduces the response SHAPES observed on a real ComfyUI 0.35.0 on 2026-09-11
4
+ (see README "Verified against source"), not ComfyUI's behaviour in general:
5
+ * POST /prompt accepts a client prompt_id; rejects unknown classes / missing files with 400
6
+ * /history/{id} is empty until the job ends; then {"prompt": [n, id, prompt, extra, outs],
7
+ "outputs": {...}, "status": {"status_str", "completed", "messages": [[event, {..., "timestamp": ms}]]}}
8
+ * an identical prompt re-queued WITHOUT /free is served from cache: every node in
9
+ execution_cached and the SAME output file as before (measured on the real server)
10
+ * POST /free only sets a flag; memory drops a moment later
11
+ * OOM is an execution_error whose message carries ComfyUI's own OOM tip text
12
+
13
+ Job behaviour is chosen by MockGenerate.width:
14
+ width >= 4000 -> OOM after ~0.6 s (peak near the card's total)
15
+ width == 3008 -> hangs until interrupted
16
+ width == 2992 -> a non-OOM exception (crash)
17
+ width == 2976 -> the ComfyUI process "dies": the port stops answering for 4 s, then a fresh
18
+ process comes back with empty queue and history (the unreachable path)
19
+ width == 2960 -> the process restarts within 0.5 s, so ComfyUI keeps answering but has
20
+ forgotten the job (the lost-job path)
21
+ width == 2944 -> the process stays alive but every HTTP request stalls for 6 s (paging): the
22
+ job completes normally and must be recorded as a success, not a crash
23
+ otherwise -> success; peak = 3000 + width MiB; duration = 0.3 s + 0.15 s * steps
24
+ The fake nvidia-smi reads `used_mib` from the state file this server writes.
25
+ """
26
+ from __future__ import annotations
27
+
28
+ import hashlib
29
+ import json
30
+ import os
31
+ import struct
32
+ import threading
33
+ import time
34
+ import uuid
35
+ import zlib
36
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
37
+ from urllib.parse import parse_qs, unquote, urlparse
38
+
39
+ TOTAL_MIB = 16311
40
+ MIB = 1024 * 1024
41
+
42
+ OBJECT_INFO = {
43
+ "UNETLoader": {"input": {"required": {"unet_name": [["tiny-model.safetensors"], {}],
44
+ "weight_dtype": [["default", "fp8_e4m3fn"], {}]}},
45
+ "input_order": {"required": ["unet_name", "weight_dtype"]},
46
+ "output": ["MODEL"], "output_name": ["MODEL"], "output_node": False, "name": "UNETLoader"},
47
+ "MockGenerate": {"input": {"required": {"model": ["MODEL", {}],
48
+ "width": ["INT", {"default": 512, "min": 16, "max": 8192, "step": 16}],
49
+ "height": ["INT", {"default": 512, "min": 16, "max": 8192, "step": 16}],
50
+ "steps": ["INT", {"default": 4, "min": 1, "max": 100}],
51
+ "seed": ["INT", {"default": 0, "min": 0, "max": 2 ** 63,
52
+ "control_after_generate": True}]}},
53
+ "input_order": {"required": ["model", "width", "height", "steps", "seed"]},
54
+ "output": ["IMAGE"], "output_name": ["IMAGE"], "output_node": False, "name": "MockGenerate"},
55
+ "PrimitiveInt": {"input": {"required": {"value": ["INT", {"min": -2 ** 63, "max": 2 ** 63,
56
+ "control_after_generate": "fixed"}]}},
57
+ "input_order": {"required": ["value"]},
58
+ "output": ["INT"], "output_name": ["INT"], "output_node": False, "name": "PrimitiveInt"},
59
+ "SaveImage": {"input": {"required": {"images": ["IMAGE", {}], "filename_prefix": ["STRING", {"default": "ComfyUI"}]},
60
+ "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}},
61
+ "input_order": {"required": ["images", "filename_prefix"], "hidden": ["prompt", "extra_pnginfo"]},
62
+ "output": [], "output_name": [], "output_node": True, "name": "SaveImage"},
63
+ }
64
+
65
+
66
+ def png_bytes(w: int, h: int, seed: int = 0) -> bytes:
67
+ row = bytes([0]) + bytes(((x + seed) % 256 for x in range(w * 3)))
68
+ raw = zlib.compress(row * h, 1)
69
+
70
+ def chunk(t, d):
71
+ return struct.pack(">I", len(d)) + t + d + struct.pack(">I", zlib.crc32(t + d) & 0xFFFFFFFF)
72
+ return (b"\x89PNG\r\n\x1a\n" + chunk(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 2, 0, 0, 0)) +
73
+ chunk(b"IDAT", raw) + chunk(b"IEND", b""))
74
+
75
+
76
+ class MockComfy:
77
+ def __init__(self, state_path: str, models_root: str, baseline_mib: int = 820):
78
+ self.state_path = state_path
79
+ self.models_root = models_root
80
+ self.baseline = baseline_mib
81
+ self.lock = threading.RLock()
82
+ self.cv = threading.Condition(self.lock)
83
+ self.queue: list[tuple] = []
84
+ self.running = None
85
+ self.history: dict = {}
86
+ self.jobs_started = 0
87
+ self.counter = 0
88
+ self.files: dict[str, tuple[int, int, int]] = {}
89
+ self.cache_sig = None
90
+ self.cache_outputs = None
91
+ self.loaded = False
92
+ self.free_flag = False
93
+ self.interrupt = None
94
+ self.logs: list[dict] = []
95
+ self.number = 0
96
+ self.stall_until = 0.0
97
+ self._set_used(baseline_mib)
98
+ self.httpd = None
99
+ self.stop = False
100
+ threading.Thread(target=self._worker, daemon=True).start()
101
+
102
+ # ----- VRAM model ---------------------------------------------------------------
103
+ def _set_used(self, mib: int) -> None:
104
+ tmp = self.state_path + ".tmp"
105
+ with open(tmp, "w") as f:
106
+ json.dump({"used_mib": int(mib)}, f)
107
+ os.replace(tmp, self.state_path)
108
+ self.used = int(mib)
109
+
110
+ def log(self, m: str) -> None:
111
+ self.logs.append({"t": time.strftime("%Y-%m-%dT%H:%M:%S"), "m": m + "\n"})
112
+ self.logs = self.logs[-300:]
113
+
114
+ # ----- worker ---------------------------------------------------------------------
115
+ def _worker(self) -> None:
116
+ while not self.stop:
117
+ with self.cv:
118
+ while not self.queue and not self.free_flag and not self.stop:
119
+ self.cv.wait(0.2)
120
+ if self.stop:
121
+ return
122
+ if self.free_flag and not self.queue:
123
+ self.free_flag = False
124
+ free_now = True
125
+ else:
126
+ free_now = False
127
+ item = self.queue.pop(0)
128
+ self.running = item
129
+ if free_now:
130
+ time.sleep(0.3) # /free is processed by the worker a moment later
131
+ with self.lock:
132
+ self.loaded = False
133
+ self.cache_sig = None
134
+ self._set_used(self.baseline)
135
+ continue
136
+ self._execute(item)
137
+ with self.lock:
138
+ self.running = None
139
+
140
+ def _gen_params(self, prompt: dict) -> dict:
141
+ gen = next((n for n in prompt.values() if n["class_type"] == "MockGenerate"), None)
142
+ p = {"width": 512, "height": 512, "steps": 4, "seed": 0}
143
+ if gen:
144
+ for k in p:
145
+ v = gen["inputs"].get(k)
146
+ if isinstance(v, list):
147
+ v = prompt[str(v[0])]["inputs"].get("value")
148
+ if v is not None:
149
+ p[k] = v
150
+ return p
151
+
152
+ def _execute(self, item) -> None:
153
+ number, pid, prompt, extra, outs = item
154
+ self.jobs_started += 1
155
+ msgs = []
156
+ ts = lambda: int(time.time() * 1000) # noqa: E731
157
+ msgs.append(["execution_start", {"prompt_id": pid, "timestamp": ts()}])
158
+ sig = hashlib.sha256(json.dumps(prompt, sort_keys=True).encode()).hexdigest()
159
+ self.log("got prompt")
160
+ if self.cache_sig == sig and self.cache_outputs is not None:
161
+ msgs.append(["execution_cached", {"nodes": list(prompt.keys()), "prompt_id": pid, "timestamp": ts()}])
162
+ time.sleep(0.02)
163
+ msgs.append(["execution_success", {"prompt_id": pid, "timestamp": ts()}])
164
+ self._finish(pid, item, msgs, self.cache_outputs, True)
165
+ return
166
+ msgs.append(["execution_cached", {"nodes": [], "prompt_id": pid, "timestamp": ts()}])
167
+ p = self._gen_params(prompt)
168
+ w, h, steps = int(p["width"]), int(p["height"]), int(p["steps"])
169
+ # load
170
+ self._set_used(self.baseline + 2000)
171
+ self.loaded = True
172
+ time.sleep(0.3)
173
+ if w >= 4000:
174
+ self._set_used(TOTAL_MIB - 150)
175
+ time.sleep(0.3)
176
+ msgs.append(["execution_error", {
177
+ "prompt_id": pid, "node_id": "2", "node_type": "MockGenerate", "executed": ["1"],
178
+ "exception_message": "CUDA out of memory. Tried to allocate 2.00 GiB. GPU 0 has a total capacity of "
179
+ "15.93 GiB\nThis error means you ran out of memory on your GPU.\n\nTIPS: If the "
180
+ "workflow worked before you might have accidentally set the batch_size to a "
181
+ "large number.",
182
+ "exception_type": "torch.OutOfMemoryError", "traceback": [" File mock\n"],
183
+ "current_inputs": {}, "current_outputs": [], "timestamp": ts()}])
184
+ self.log("Got an OOM, unloading all loaded models.")
185
+ self.loaded = False
186
+ self._set_used(self.baseline)
187
+ self._finish(pid, item, msgs, {}, False)
188
+ return
189
+ if w == 2944:
190
+ self.stall_until = time.time() + 6.0
191
+ if w in (2976, 2960):
192
+ self._set_used(self.baseline + 4000)
193
+ time.sleep(0.4)
194
+ self._die_and_restart(4.0 if w == 2976 else 0.5)
195
+ return
196
+ if w == 2992:
197
+ self._set_used(self.baseline + 3000)
198
+ time.sleep(0.2)
199
+ msgs.append(["execution_error", {
200
+ "prompt_id": pid, "node_id": "2", "node_type": "MockGenerate", "executed": ["1"],
201
+ "exception_message": "mat1 and mat2 shapes cannot be multiplied (1x2 and 3x4)\n",
202
+ "exception_type": "RuntimeError", "traceback": [], "current_inputs": {}, "current_outputs": [],
203
+ "timestamp": ts()}])
204
+ self._set_used(self.baseline + 2000)
205
+ self._finish(pid, item, msgs, {}, False)
206
+ return
207
+ peak = 3000 + w
208
+ self._set_used(peak)
209
+ deadline = time.time() + (10 ** 9 if w == 3008 else 0.3 + 0.15 * steps)
210
+ while time.time() < deadline:
211
+ with self.lock:
212
+ if self.interrupt == pid:
213
+ self.interrupt = None
214
+ msgs.append(["execution_interrupted", {"prompt_id": pid, "node_id": "2",
215
+ "node_type": "MockGenerate", "executed": ["1"],
216
+ "timestamp": ts()}])
217
+ self._set_used(peak - 1000)
218
+ self._finish(pid, item, msgs, {}, False)
219
+ return
220
+ time.sleep(0.05)
221
+ self.counter += 1
222
+ prefix = next((n["inputs"].get("filename_prefix", "ComfyUI") for n in prompt.values()
223
+ if n["class_type"] == "SaveImage"), "ComfyUI")
224
+ fname = f"{prefix}_{self.counter:05d}_.png"
225
+ self.files[fname] = (w, h, int(p["seed"]) % 256)
226
+ save_id = next(k for k, n in prompt.items() if n["class_type"] == "SaveImage")
227
+ outputs = {save_id: {"images": [{"filename": fname, "subfolder": "", "type": "output"}]}}
228
+ msgs.append(["execution_success", {"prompt_id": pid, "timestamp": ts()}])
229
+ self._set_used(peak - 1500) # models stay resident after the job
230
+ self.cache_sig, self.cache_outputs = sig, outputs
231
+ self.log(f"Prompt executed in {0.3 + 0.15 * steps:.2f} seconds")
232
+ self._finish(pid, item, msgs, outputs, True)
233
+
234
+ def _finish(self, pid, item, msgs, outputs, ok) -> None:
235
+ with self.lock:
236
+ self.history[pid] = {"prompt": [item[0], pid, item[2], item[3], item[4]], "outputs": outputs,
237
+ "status": {"status_str": "success" if ok else "error", "completed": ok,
238
+ "messages": msgs}, "meta": {}}
239
+
240
+ def _die_and_restart(self, down_s: float) -> None:
241
+ port = self.httpd.server_address[1]
242
+ self.httpd.shutdown()
243
+ self.httpd.server_close()
244
+ with self.lock:
245
+ self.queue.clear()
246
+ self.history.clear()
247
+ self.running = None
248
+ self.loaded = False
249
+ self.cache_sig = None
250
+ self._set_used(self.baseline - 300) # the dead process's CUDA context is gone
251
+ time.sleep(down_s)
252
+ self._set_used(self.baseline)
253
+ self.serve(port)
254
+
255
+ # ----- HTTP -----------------------------------------------------------------------
256
+ def serve(self, port: int = 0) -> int:
257
+ mock = self
258
+
259
+ class H(BaseHTTPRequestHandler):
260
+ def log_message(self, *a):
261
+ pass
262
+
263
+ def _json(self, obj, code=200):
264
+ b = json.dumps(obj).encode()
265
+ self.send_response(code)
266
+ self.send_header("Content-Type", "application/json")
267
+ self.send_header("Content-Length", str(len(b)))
268
+ self.end_headers()
269
+ self.wfile.write(b)
270
+
271
+ def _body(self):
272
+ n = int(self.headers.get("Content-Length") or 0)
273
+ return json.loads(self.rfile.read(n) or b"{}") if n else {}
274
+
275
+ def _maybe_stall(self):
276
+ wait = mock.stall_until - time.time()
277
+ if wait > 0:
278
+ time.sleep(wait)
279
+
280
+ def do_GET(self):
281
+ self._maybe_stall()
282
+ u = urlparse(self.path)
283
+ path = u.path[4:] if u.path.startswith("/api/") else u.path
284
+ with mock.lock:
285
+ if path == "/system_stats":
286
+ reserved = (mock.used - mock.baseline) * MIB if mock.loaded else 0
287
+ return self._json({"system": {"os": "win32", "ram_total": 48 * 1024 ** 3,
288
+ "ram_free": 30 * 1024 ** 3, "comfyui_version": "0.35.0",
289
+ "python_version": "3.12.7", "pytorch_version": "2.9.0+cu130",
290
+ "argv": ["main.py", "--port", "8000"]},
291
+ "devices": [{"name": "cuda:0 NVIDIA GeForce RTX 5060 Ti : cudaMallocAsync",
292
+ "type": "cuda", "index": 0, "vram_total": TOTAL_MIB * MIB,
293
+ "vram_free": (TOTAL_MIB - mock.used) * MIB,
294
+ "torch_vram_total": reserved, "torch_vram_free": 0}]})
295
+ if path == "/object_info":
296
+ return self._json(OBJECT_INFO)
297
+ if path == "/queue":
298
+ run = [list(mock.running)] if mock.running else []
299
+ return self._json({"queue_running": run, "queue_pending": [list(q) for q in mock.queue]})
300
+ if path.startswith("/history/"):
301
+ pid = unquote(path.split("/", 2)[2])
302
+ return self._json({pid: mock.history[pid]} if pid in mock.history else {})
303
+ if path == "/view":
304
+ q = parse_qs(u.query)
305
+ fn = q.get("filename", [""])[0]
306
+ if fn not in mock.files:
307
+ self.send_response(404)
308
+ self.end_headers()
309
+ return
310
+ b = png_bytes(*mock.files[fn])
311
+ self.send_response(200)
312
+ self.send_header("Content-Type", "image/png")
313
+ self.send_header("Content-Length", str(len(b)))
314
+ self.end_headers()
315
+ self.wfile.write(b)
316
+ return
317
+ if path.startswith("/models/"):
318
+ return self._json(["tiny-model.safetensors"])
319
+ if path == "/internal/folder_paths":
320
+ return self._json({"diffusion_models": [os.path.join(mock.models_root, "unet"),
321
+ os.path.join(mock.models_root, "diffusion_models")],
322
+ "vae": [os.path.join(mock.models_root, "vae")]})
323
+ if path == "/internal/logs/raw":
324
+ return self._json({"entries": mock.logs, "size": {"cols": 80, "rows": 24}})
325
+ if path == "/mock/state":
326
+ return self._json({"running": mock.running[1] if mock.running else None,
327
+ "jobs_started": mock.jobs_started, "history": list(mock.history)})
328
+ self._json({"error": "not found"}, 404)
329
+
330
+ def do_POST(self):
331
+ self._maybe_stall()
332
+ u = urlparse(self.path)
333
+ path = u.path[4:] if u.path.startswith("/api/") and not u.path.startswith("/api/jobs") else u.path
334
+ body = self._body()
335
+ with mock.cv:
336
+ if path == "/prompt":
337
+ prompt = body.get("prompt") or {}
338
+ pid = body.get("prompt_id") or str(uuid.uuid4())
339
+ errors = {}
340
+ for nid, n in prompt.items():
341
+ if n.get("class_type") not in OBJECT_INFO:
342
+ errors[nid] = {"errors": [{"type": "invalid", "message": f"unknown {n.get('class_type')}"}]}
343
+ elif n["class_type"] == "UNETLoader" and \
344
+ n["inputs"].get("unet_name") not in OBJECT_INFO["UNETLoader"]["input"]["required"]["unet_name"][0]:
345
+ errors[nid] = {"errors": [{"type": "value_not_in_list", "message": "Value not in list"}]}
346
+ if errors:
347
+ return self._json({"error": {"type": "prompt_outputs_failed_validation",
348
+ "message": "Prompt outputs failed validation"},
349
+ "node_errors": errors}, 400)
350
+ mock.number += 1
351
+ outs = [k for k, n in prompt.items() if n["class_type"] == "SaveImage"]
352
+ mock.queue.append((mock.number, pid, prompt, body.get("extra_data") or {}, outs))
353
+ mock.cv.notify_all()
354
+ return self._json({"prompt_id": pid, "number": mock.number, "node_errors": {}})
355
+ if path == "/free":
356
+ if body.get("free_memory") or body.get("unload_models"):
357
+ mock.free_flag = True
358
+ mock.cv.notify_all()
359
+ self.send_response(200)
360
+ self.end_headers()
361
+ return
362
+ if path == "/interrupt":
363
+ pid = body.get("prompt_id")
364
+ if mock.running and (pid is None or mock.running[1] == pid):
365
+ mock.interrupt = mock.running[1]
366
+ self.send_response(200)
367
+ self.end_headers()
368
+ return
369
+ if path.startswith("/api/jobs/") and path.endswith("/cancel"):
370
+ pid = path.split("/")[3]
371
+ cancelled = False
372
+ if mock.running and mock.running[1] == pid:
373
+ mock.interrupt = pid
374
+ cancelled = True
375
+ before = len(mock.queue)
376
+ mock.queue = [q for q in mock.queue if q[1] != pid]
377
+ return self._json({"cancelled": cancelled or len(mock.queue) != before})
378
+ if path == "/queue":
379
+ ids = set(body.get("delete") or [])
380
+ mock.queue = [q for q in mock.queue if q[1] not in ids]
381
+ self.send_response(200)
382
+ self.end_headers()
383
+ return
384
+ self._json({"error": "not found"}, 404)
385
+
386
+ class Server(ThreadingHTTPServer):
387
+ daemon_threads = True
388
+ allow_reuse_address = True
389
+
390
+ def handle_error(self, request, client_address):
391
+ pass # a stalled handler writing to a client that already timed out: expected, not news
392
+
393
+ self.httpd = Server(("127.0.0.1", port), H)
394
+ threading.Thread(target=self.httpd.serve_forever, daemon=True).start()
395
+ return self.httpd.server_address[1]
396
+
397
+ def shutdown(self) -> None:
398
+ self.stop = True
399
+ if self.httpd:
400
+ self.httpd.shutdown()
401
+ self.httpd.server_close()
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tests/test_selftest.py ADDED
@@ -0,0 +1,732 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """GPU-free self-test. Run from the harness directory:
2
+
3
+ python -m unittest -v tests.test_selftest (stdlib only; ~2-3 minutes)
4
+
5
+ It mocks ComfyUI's HTTP API (tests/mock_comfy.py), nvidia-smi (tests/fake_nvidia_smi.py)
6
+ and llama-bench (tests/fake_llama_bench.py), then drives the real harness code:
7
+
8
+ 01 the row contract itself (column order read from ../SCHEMA.md when present)
9
+ 02 a successful run, an OOM run that yields ok=false, and the run after it still executing
10
+ 03 a knob mapped to a node id that does not exist (and to a linked input, and off-grid) fails loudly
11
+ 04 resume after the harness is killed mid-run: no duplicate rows, the orphan job is cancelled,
12
+ the interrupted run is retried once and says so
13
+ 05 a hard timeout interrupts the job, records failure=timeout, and the night goes on
14
+ 06 ComfyUI's cache trap: an identical prompt without /free is caught, not recorded as a run
15
+ 07 the shipped API workflows are reproducible from their UI sources; the converter refuses what it cannot prove
16
+ 08 the llama-bench adapter: ok rows with LLM columns, an OOM row, schema conformance
17
+ 09 downloads never overwrite an existing file and verify size
18
+ 10 ComfyUI dies mid-run (port goes silent, comes back empty): failure=crash, the harness waits, the next run runs
19
+ 11 ComfyUI restarts so fast it never stops answering but forgets the job: detected as lost, not a 2-hour wait
20
+ 12 the llama-server probe (the recipe's vision + 32K claim): health wait, image request, timings, OOM at load
21
+ 13 review regressions: llama failure classification order, a torn journal line, a knob that feeds nothing,
22
+ spill wording, a stalled-but-alive ComfyUI, a llama port already taken
23
+ Every written runs.csv is re-read and checked against the schema (column order,
24
+ empty-not-zero, MiB integers, booleans, config_json).
25
+ """
26
+ from __future__ import annotations
27
+
28
+ import contextlib
29
+ import csv
30
+ import hashlib
31
+ import io
32
+ import json
33
+ import os
34
+ import re
35
+ import shutil
36
+ import subprocess
37
+ import sys
38
+ import tempfile
39
+ import time
40
+ import types
41
+ import unittest
42
+ import urllib.request
43
+
44
+ HARNESS = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
45
+ TESTS = os.path.join(HARNESS, "tests")
46
+ sys.path.insert(0, HARNESS)
47
+ sys.path.insert(0, TESTS)
48
+
49
+ import comfy_measure # noqa: E402
50
+ import llama_measure # noqa: E402
51
+ from mharness import schema # noqa: E402
52
+ from mharness.runner_common import FAKE_INSTRUMENT_ENV, FAKE_NOTE # noqa: E402
53
+ from mharness.ui2api import ConversionRefused, convert_ui_to_api # noqa: E402
54
+ from mharness.weights import DownloadItem, WeightSpec, execute_download, plan_downloads # noqa: E402
55
+ from mharness.workflow import validate_api_prompt # noqa: E402
56
+ from mock_comfy import MockComfy # noqa: E402
57
+
58
+ SESSION_KEYS = {"schema_version", "session_id", "operator", "gpu", "host", "display_attached", "runtime",
59
+ "instrument", "harness", "caveats"}
60
+
61
+
62
+ def jload(path):
63
+ with open(path, encoding="utf-8") as f:
64
+ return json.load(f)
65
+
66
+
67
+ def jdump(obj, path):
68
+ with open(path, "w", encoding="utf-8") as f:
69
+ json.dump(obj, f)
70
+
71
+
72
+ def read_text(path, mode="r"):
73
+ with open(path, mode) as f:
74
+ return f.read()
75
+
76
+
77
+ def read_rows(path):
78
+ with open(path, newline="", encoding="utf-8") as f:
79
+ return list(csv.DictReader(f))
80
+
81
+
82
+ def assert_schema_file(tc, path):
83
+ tc.assertEqual(schema.check_csv_file(path), [], f"schema problems in {path}")
84
+ with open(path, newline="", encoding="utf-8") as f:
85
+ header = next(csv.reader(f))
86
+ tc.assertEqual(header, schema.RUNS_COLUMNS)
87
+
88
+
89
+ class MockWorld(unittest.TestCase):
90
+ @classmethod
91
+ def setUpClass(cls):
92
+ cls.tmp = tempfile.mkdtemp(prefix="mharness-selftest-")
93
+ cls.state = os.path.join(cls.tmp, "vram_state.json")
94
+ cls.models = os.path.join(cls.tmp, "models")
95
+ os.makedirs(os.path.join(cls.models, "diffusion_models"))
96
+ cls.weight_bytes = b"x" * 1234
97
+ with open(os.path.join(cls.models, "diffusion_models", "tiny-model.safetensors"), "wb") as f:
98
+ f.write(cls.weight_bytes)
99
+ cls.mock = MockComfy(cls.state, cls.models)
100
+ cls.port = cls.mock.serve()
101
+ cls.url = f"http://127.0.0.1:{cls.port}"
102
+ os.environ["FAKE_NVSMI_STATE"] = cls.state
103
+ os.environ[FAKE_INSTRUMENT_ENV] = json.dumps([sys.executable, os.path.join(TESTS, "fake_nvidia_smi.py")])
104
+
105
+ @classmethod
106
+ def tearDownClass(cls):
107
+ cls.mock.shutdown()
108
+ if not os.environ.get("KEEP_SELFTEST_TMP"):
109
+ shutil.rmtree(cls.tmp, ignore_errors=True)
110
+ else:
111
+ print(f"\n(kept {cls.tmp})")
112
+
113
+ def setUp(self):
114
+ self.case = os.path.join(self.tmp, self._testMethodName)
115
+ os.makedirs(self.case, exist_ok=True)
116
+ self.out = os.path.join(self.case, "out")
117
+
118
+ # ----- fixtures -----------------------------------------------------------------
119
+ def write_config(self, runs, knobs=None, name="cfg.json"):
120
+ wf = {"1": {"class_type": "UNETLoader", "inputs": {"unet_name": "tiny-model.safetensors", "weight_dtype": "default"}},
121
+ "2": {"class_type": "MockGenerate", "inputs": {"model": ["1", 0], "width": 512, "height": ["4", 0],
122
+ "steps": 4, "seed": 1}},
123
+ "3": {"class_type": "SaveImage", "inputs": {"images": ["2", 0], "filename_prefix": "mock"}},
124
+ "4": {"class_type": "PrimitiveInt", "inputs": {"value": 512}}}
125
+ wf_path = os.path.join(self.case, "mock.api.json")
126
+ with open(wf_path, "w") as f:
127
+ json.dump(wf, f)
128
+ default_knobs = {"width": {"node": "2", "input": "width"}, "height": {"node": "4", "input": "value"},
129
+ "steps": {"node": "2", "input": "steps"}, "seed": {"node": "2", "input": "seed"}}
130
+ cfg = {
131
+ "config_schema": 1, "model_slug": "mock-model", "gpu_slug": "rtx-5060-ti", "vertical": "image",
132
+ "runtime": "comfyui", "task": "t2i",
133
+ "workflows": {"w": {"api_file": wf_path, "output_node": "3", "quantization": "fp16",
134
+ "knobs": {**default_knobs, **(knobs or {})}}},
135
+ "weights": {"tiny-model.safetensors": {
136
+ "repo": "selftest/tiny", "path": "tiny-model.safetensors", "revision": "0" * 40,
137
+ "folder": "diffusion_models", "size": len(self.weight_bytes),
138
+ "sha256": hashlib.sha256(self.weight_bytes).hexdigest(), "quantization": "fp16"}},
139
+ "defaults": {"timeout_s": 60, "set": {"steps": 4}},
140
+ "runs": runs,
141
+ }
142
+ path = os.path.join(self.case, name)
143
+ with open(path, "w") as f:
144
+ json.dump(cfg, f)
145
+ return path
146
+
147
+ def harness_args(self, cfg, *extra):
148
+ return ["--comfy-url", self.url, "run", "--config", cfg, "--out-root", self.out, "--sample-ms", "100",
149
+ "--display-attached", "yes", "--no-spill-monitor", "--interrupt-grace", "20", *extra]
150
+
151
+ def session_dir(self):
152
+ d = os.path.join(self.out, "sessions")
153
+ names = sorted(os.listdir(d))
154
+ self.assertEqual(len(names), 1, f"expected one session, found {names}")
155
+ return os.path.join(d, names[0])
156
+
157
+ def run_quiet(self, fn, argv):
158
+ buf = io.StringIO()
159
+ with contextlib.redirect_stdout(buf):
160
+ rc = fn(argv)
161
+ return rc, buf.getvalue()
162
+
163
+
164
+ class T01Contract(unittest.TestCase):
165
+ def good_row(self):
166
+ return {"session_id": "2026-09-11_mock-model_rtx-5060-ti", "run": 1, "measured_at": "2026-09-11T22:00:00.000Z",
167
+ "model_slug": "mock-model", "gpu_slug": "rtx-5060-ti", "vertical": "image", "task": "t2i",
168
+ "runtime": "comfyui", "runtime_version": "0.35.0", "artifact": "a/b/c.safetensors",
169
+ "quantization": "fp16", "width": 512, "height": 512, "config_json": {"k": 1},
170
+ "cold_start": True, "ok": True, "wall_s": 1.5, "idle_device_mib": 800, "peak_device_mib": 9000,
171
+ "vram_total_mib": 16311, "display_attached": True, "gpu_name": "NVIDIA GeForce RTX 5060 Ti",
172
+ "driver": "591.86", "sample_ms": 500, "notes": "a\nb"}
173
+
174
+ def test_column_order_matches_schema_md(self):
175
+ self.assertEqual(len(schema.RUNS_COLUMNS), 35)
176
+ md = os.path.join(os.path.dirname(HARNESS), "SCHEMA.md")
177
+ if not os.path.exists(md):
178
+ self.skipTest("SCHEMA.md not beside the harness")
179
+ text = read_text(md)
180
+ section = text.split("## `runs.csv`", 1)[1].split("\n## ", 1)[0]
181
+ cols = re.findall(r"^\| `([a-z_]+)` \|", section, re.M)
182
+ self.assertEqual(cols, schema.RUNS_COLUMNS)
183
+
184
+ def test_harness_copy_leaves_out_the_licence_ack(self):
185
+ from mharness.session import Session
186
+ with tempfile.TemporaryDirectory() as tmp:
187
+ fake_harness = os.path.join(tmp, "harness")
188
+ os.makedirs(fake_harness)
189
+ for name in ("comfy_measure.py", "ACK_LICENCE_minimax-h3"):
190
+ open(os.path.join(fake_harness, name), "w").close()
191
+ s = Session(os.path.join(tmp, "out"), "2026-09-15_mock-model_rtx-5060-ti")
192
+ s.copy_harness(fake_harness)
193
+ copied = os.listdir(os.path.join(s.raw, "harness"))
194
+ self.assertIn("comfy_measure.py", copied)
195
+ self.assertNotIn("ACK_LICENCE_minimax-h3", copied)
196
+
197
+ def test_row_rules(self):
198
+ schema.validate_row(self.good_row())
199
+ self.assertIn("a b", schema.row_to_csv_line(self.good_row())) # notes forced to one line
200
+ bad = [
201
+ ({"peak_device_mib": 0}, "zero"),
202
+ ({"idle_device_mib": 800.0}, "expected int"),
203
+ ({"failure": "oom"}, "failure must be empty"),
204
+ ({"ok": False}, "needs failure"),
205
+ ({"frames": 1}, "not applicable to an image row"),
206
+ ({"gen_tokens_per_s": 20.0}, "LLM-only"),
207
+ ({"peak_device_mib": 17000}, "instrument or unit error"),
208
+ ({"width": None}, "must carry what the file says"),
209
+ ({"measured_at": "2026-09-11 22:00"}, "ISO 8601"),
210
+ ({"session_id": "mock_2026"}, "is not"),
211
+ ]
212
+ for patch, needle in bad:
213
+ row = self.good_row()
214
+ row.update(patch)
215
+ with self.assertRaises(schema.SchemaError, msg=str(patch)) as cm:
216
+ schema.validate_row(row)
217
+ self.assertIn(needle, str(cm.exception), str(patch))
218
+
219
+ def test_csv_roundtrip(self):
220
+ d = tempfile.mkdtemp()
221
+ try:
222
+ p = os.path.join(d, "runs.csv")
223
+ rc = schema.RunsCsv(p)
224
+ rc.append(self.good_row())
225
+ r2 = self.good_row()
226
+ r2.update(run=2, ok=False, failure="oom", width=None, height=None, wall_s=None, peak_device_mib=16200)
227
+ rc.append(r2)
228
+ assert_schema_file(self, p)
229
+ rows = read_rows(p)
230
+ self.assertEqual(rows[1]["width"], "") # empty, not zero
231
+ self.assertEqual(rows[1]["wall_s"], "")
232
+ self.assertEqual(rows[0]["cold_start"], "true")
233
+ self.assertEqual(rc.recorded_runs(), {1, 2})
234
+ finally:
235
+ shutil.rmtree(d)
236
+
237
+
238
+ class T02to06Comfy(MockWorld):
239
+ def test_02_success_then_oom_then_next_run_still_runs(self):
240
+ cfg = self.write_config([
241
+ {"run": 1, "key": "ok512", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 11},
242
+ "expect": {"width": 512, "height": 512}},
243
+ {"run": 2, "key": "oom", "workflow": "w", "set": {"width": 4000, "height": 512, "seed": 12}},
244
+ {"run": 3, "key": "ok768", "workflow": "w", "set": {"width": 768, "height": 640, "seed": 13}},
245
+ ])
246
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg))
247
+ self.assertEqual(rc, 0, out)
248
+ sd = self.session_dir()
249
+ p = os.path.join(sd, "runs.csv")
250
+ assert_schema_file(self, p)
251
+ rows = read_rows(p)
252
+ self.assertEqual([r["run"] for r in rows], ["1", "2", "3"])
253
+ r1, r2, r3 = rows
254
+ self.assertEqual((r1["ok"], r1["failure"], r1["width"], r1["height"]), ("true", "", "512", "512"))
255
+ self.assertEqual((r2["ok"], r2["failure"]), ("false", "oom"))
256
+ self.assertIn("GPU OOM", r2["notes"])
257
+ self.assertEqual((r2["width"], r2["height"], r2["frames"]), ("", "", ""))
258
+ self.assertEqual((r3["ok"], r3["width"], r3["height"]), ("true", "768", "640")) # ran after the OOM
259
+ for r in rows:
260
+ self.assertIn(FAKE_NOTE, r["notes"])
261
+ idle, peak = int(r["idle_device_mib"]), int(r["peak_device_mib"])
262
+ self.assertTrue(700 < idle < 1000, f"idle {idle} should be the post-/free baseline")
263
+ self.assertGreater(peak, idle)
264
+ self.assertEqual((r["vram_total_mib"], r["display_attached"], r["sample_ms"], r["cold_start"]),
265
+ ("16311", "true", "100", "true"))
266
+ self.assertEqual(r["gpu_name"], "NVIDIA GeForce RTX 5060 Ti")
267
+ cj = json.loads(r["config_json"])
268
+ self.assertIn("overrides_applied", cj)
269
+ self.assertGreaterEqual(int(r1["peak_device_mib"]), 3000 + 512 - 5)
270
+ self.assertGreaterEqual(int(r2["peak_device_mib"]), 16000)
271
+ self.assertTrue(0.5 < float(r1["wall_s"]) < 10, r1["wall_s"])
272
+ sj = jload(os.path.join(sd, "session.json"))
273
+ self.assertEqual(set(sj), SESSION_KEYS)
274
+ self.assertEqual(sj["instrument"]["scope"], "whole-card")
275
+ self.assertIn(FAKE_NOTE, sj["caveats"])
276
+ self.assertTrue(any(n.startswith("nvidia-smi_") and n.endswith(".csv") for n in os.listdir(os.path.join(sd, "raw"))))
277
+ self.assertTrue(os.path.isdir(os.path.join(sd, "raw", "harness")))
278
+ # every applied override was also present in what ComfyUI stored
279
+ run1 = jload(os.path.join(sd, "raw", "runs", "run01.json"))
280
+ self.assertEqual(run1["stored_prompt_problems"], [])
281
+
282
+ def test_13d_knob_that_feeds_nothing_is_fatal(self):
283
+ # height on node 4 AND height_direct cutting 4's link: node 4 no longer feeds the output
284
+ knobs = {"height_direct": {"node": "2", "input": "height", "replace_link": True}}
285
+ cfg = self.write_config([{"run": 1, "key": "k", "workflow": "w",
286
+ "set": {"width": 512, "height": 640, "height_direct": 512}}], knobs=knobs,
287
+ name="nofeed.json")
288
+ rc, out = self.run_quiet(comfy_measure.main, ["--comfy-url", self.url, "check", "--config", cfg])
289
+ self.assertEqual(rc, 1, out)
290
+ self.assertIn("would change nothing", out)
291
+
292
+ def test_03_bad_mapping_fails_loudly_before_anything_runs(self):
293
+ cases = [
294
+ ({"width": {"node": "999", "input": "width"}}, "does not exist"),
295
+ ({"width": {"node": "2", "input": "height"}}, "fed by a link"),
296
+ ({"width": {"node": "2", "input": "no_such_input"}}, "has no input"),
297
+ ]
298
+ for knobs, needle in cases:
299
+ cfg = self.write_config([{"run": 1, "key": "k", "workflow": "w", "set": {"width": 512}}],
300
+ knobs=knobs, name=f"cfg_{needle.replace(' ', '_')}.json")
301
+ started = self.mock.jobs_started
302
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg))
303
+ self.assertEqual(rc, 1, out)
304
+ self.assertIn(needle, out)
305
+ self.assertIn("FATAL", out)
306
+ self.assertEqual(self.mock.jobs_started, started, "nothing may be queued")
307
+ self.assertFalse(os.path.exists(os.path.join(self.out, "sessions")), "no session for a broken config")
308
+ cfg = self.write_config([{"run": 1, "key": "k", "workflow": "w", "set": {"width": 500}}], name="offgrid.json")
309
+ rc, out = self.run_quiet(comfy_measure.main, ["--comfy-url", self.url, "check", "--config", cfg])
310
+ self.assertEqual(rc, 1)
311
+ self.assertIn("off-grid", out)
312
+ # the summary line must agree with the FATAL: batch 1 printed "runnable now: [1, 2, 3, 4, 5]" here
313
+ self.assertIn("=> runnable now: [] (FATAL above", out)
314
+ self.assertNotIn("=> runnable now: [1]", out)
315
+
316
+ def test_04_resume_after_harness_killed_mid_run(self):
317
+ cfg = self.write_config([
318
+ {"run": 1, "key": "a", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 21}},
319
+ {"run": 2, "key": "b-long", "workflow": "w", "set": {"width": 640, "height": 512, "seed": 22, "steps": 40}},
320
+ {"run": 3, "key": "c", "workflow": "w", "set": {"width": 768, "height": 512, "seed": 23}},
321
+ ])
322
+ cmd = [sys.executable, os.path.join(HARNESS, "comfy_measure.py")] + self.harness_args(cfg)
323
+ log = open(os.path.join(self.case, "first.log"), "w")
324
+ proc = subprocess.Popen(cmd, stdout=log, stderr=subprocess.STDOUT, env=os.environ.copy())
325
+ deadline = time.time() + 120
326
+ killed = False
327
+ while time.time() < deadline:
328
+ sessions = os.path.join(self.out, "sessions")
329
+ rows = []
330
+ if os.path.isdir(sessions) and os.listdir(sessions):
331
+ p = os.path.join(sessions, os.listdir(sessions)[0], "runs.csv")
332
+ rows = read_rows(p) if os.path.exists(p) else []
333
+ with urllib.request.urlopen(self.url + "/mock/state") as resp:
334
+ st = json.load(resp)
335
+ if len(rows) == 1 and st["running"]:
336
+ time.sleep(0.5)
337
+ proc.kill() # the 4 a.m. crash
338
+ killed = True
339
+ break
340
+ if proc.poll() is not None:
341
+ break
342
+ time.sleep(0.2)
343
+ proc.wait()
344
+ log.close()
345
+ self.assertTrue(killed, read_text(os.path.join(self.case, "first.log")))
346
+ sd = self.session_dir()
347
+ self.assertEqual(len(read_rows(os.path.join(sd, "runs.csv"))), 1)
348
+ with urllib.request.urlopen(self.url + "/mock/state") as resp:
349
+ orphan = json.load(resp)["running"]
350
+ self.assertIsNotNone(orphan, "the killed harness left its job running in ComfyUI")
351
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg))
352
+ self.assertEqual(rc, 0, out)
353
+ self.assertEqual(self.session_dir(), sd, "resume must reuse the unfinished session")
354
+ rows = read_rows(os.path.join(sd, "runs.csv"))
355
+ self.assertEqual(sorted(int(r["run"]) for r in rows), [1, 2, 3])
356
+ by = {int(r["run"]): r for r in rows}
357
+ self.assertEqual({r["ok"] for r in rows}, {"true"})
358
+ self.assertIn("retried after 1 interrupted attempt", by[2]["notes"])
359
+ self.assertIn("already recorded", out)
360
+ events = [json.loads(l) for l in read_text(os.path.join(sd, "raw", "events.jsonl")).splitlines() if l]
361
+ self.assertTrue(any(e["kind"] == "orphans_cancelled" and orphan in e["ids"] for e in events))
362
+ self.assertEqual(jload(os.path.join(sd, "raw", "state.json"))["status"], "finished")
363
+ assert_schema_file(self, os.path.join(sd, "runs.csv"))
364
+
365
+ def test_05_timeout_is_a_result_and_the_night_goes_on(self):
366
+ cfg = self.write_config([
367
+ {"run": 1, "key": "hang", "workflow": "w", "set": {"width": 3008, "height": 512, "seed": 31}, "timeout_s": 4},
368
+ {"run": 2, "key": "after", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 32}},
369
+ ])
370
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg))
371
+ self.assertEqual(rc, 0, out)
372
+ rows = read_rows(os.path.join(self.session_dir(), "runs.csv"))
373
+ self.assertEqual((rows[0]["ok"], rows[0]["failure"]), ("false", "timeout"))
374
+ self.assertIn("hard timeout", rows[0]["notes"])
375
+ self.assertEqual(rows[1]["ok"], "true")
376
+ assert_schema_file(self, os.path.join(self.session_dir(), "runs.csv"))
377
+
378
+ def test_06_cache_trap_is_caught(self):
379
+ # --warm skips /free: the identical second prompt is served from ComfyUI's cache
380
+ # (same file, near-zero time), exactly as measured on a real ComfyUI.
381
+ cfg = self.write_config([
382
+ {"run": 1, "key": "first", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 41}},
383
+ {"run": 2, "key": "identical", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 41}},
384
+ ])
385
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg, "--warm"))
386
+ self.assertEqual(rc, 0, out)
387
+ rows = read_rows(os.path.join(self.session_dir(), "runs.csv"))
388
+ self.assertEqual(rows[0]["ok"], "true")
389
+ self.assertEqual((rows[1]["ok"], rows[1]["failure"], rows[1]["cold_start"]), ("false", "invalid-output", "false"))
390
+ self.assertIn("cache", rows[1]["notes"])
391
+
392
+
393
+ class T10Deaths(MockWorld):
394
+ def _death(self, width, needle):
395
+ cfg = self.write_config([
396
+ {"run": 1, "key": "dies", "workflow": "w", "set": {"width": width, "height": 512, "seed": 51}, "timeout_s": 120},
397
+ {"run": 2, "key": "after", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 52}},
398
+ ])
399
+ t0 = time.time()
400
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg, "--unreachable-after", "2",
401
+ "--comfy-restart-wait", "60"))
402
+ self.assertEqual(rc, 0, out)
403
+ self.assertLess(time.time() - t0, 100, "must not wait out the 120 s run timeout")
404
+ p = os.path.join(self.session_dir(), "runs.csv")
405
+ rows = read_rows(p)
406
+ self.assertEqual((rows[0]["ok"], rows[0]["failure"]), ("false", "crash"))
407
+ self.assertIn(needle, rows[0]["notes"])
408
+ self.assertEqual(rows[1]["ok"], "true", "the run after the death still runs")
409
+ assert_schema_file(self, p)
410
+
411
+ def test_10_comfyui_dies_mid_run(self):
412
+ self._death(2976, "stopped answering")
413
+
414
+ def test_13e_stalled_but_alive_comfyui_is_not_a_crash(self):
415
+ cfg = self.write_config([
416
+ {"run": 1, "key": "stall", "workflow": "w", "set": {"width": 2944, "height": 512, "seed": 61, "steps": 20}},
417
+ {"run": 2, "key": "after", "workflow": "w", "set": {"width": 512, "height": 512, "seed": 62}},
418
+ ])
419
+ rc, out = self.run_quiet(comfy_measure.main, self.harness_args(cfg, "--unreachable-after", "2",
420
+ "--http-timeout", "1",
421
+ "--stall-tolerance", "60"))
422
+ self.assertEqual(rc, 0, out)
423
+ rows = read_rows(os.path.join(self.session_dir(), "runs.csv"))
424
+ self.assertEqual((rows[0]["ok"], rows[0]["failure"]), ("true", ""), rows[0]["notes"])
425
+ self.assertEqual(rows[1]["ok"], "true")
426
+
427
+ def test_11_comfyui_restarts_and_forgets_the_job(self):
428
+ self._death(2960, "vanished")
429
+
430
+
431
+ class T07Converter(unittest.TestCase):
432
+ def setUp(self):
433
+ fx = jload(os.path.join(TESTS, "fixtures", "object_info_comfyui-0.35.0_subset.json"))
434
+ self.oi = fx["classes"]
435
+
436
+ def test_shipped_workflows_rebuild_identically(self):
437
+ sys.path.insert(0, os.path.join(HARNESS, "tools"))
438
+ import build_workflows
439
+ manifest = jload(os.path.join(HARNESS, "workflows", "build.json"))
440
+ for item in manifest["outputs"]:
441
+ ui = jload(os.path.join(HARNESS, item["source"]))
442
+ api, report = convert_ui_to_api(ui, self.oi)
443
+ for t in item.get("transforms") or []:
444
+ build_workflows.apply_transform(api, t, self.oi)
445
+ shipped = jload(os.path.join(HARNESS, item["out"]))
446
+ strip = lambda d: {k: {"class_type": v["class_type"], "inputs": v["inputs"]} for k, v in d.items()} # noqa: E731
447
+ self.assertEqual(strip(api), strip(shipped), item["out"])
448
+ # validated AFTER the declared transforms, which is what ships
449
+ self.assertEqual(validate_api_prompt(api, self.oi).errors, [], item["out"])
450
+
451
+ def test_minimax_subgraph_is_flattened_with_promoted_values(self):
452
+ ui = jload(os.path.join(HARNESS, "workflows", "sources", "video_minimax_h3_t2v.json"))
453
+ api, report = convert_ui_to_api(ui, self.oi)
454
+ self.assertEqual(api["140:131"]["inputs"]["width"], ["115", 0]) # outer link through the subgraph input
455
+ self.assertEqual(api["140:133"]["inputs"]["value"], 5) # promoted 'duration' beats inner widget 2
456
+ self.assertEqual(api["140:138"]["inputs"]["value"], 8) # promoted 'turbo_steps' beats inner 6
457
+ self.assertEqual(api["140:124"]["inputs"]["steps"], ["140:136", 0])
458
+ self.assertEqual(api["92"]["inputs"]["format.codec"], "auto") # dynamic combo sub-widget naming
459
+ self.assertNotIn("116", api) # MarkdownNote dropped
460
+ self.assertGreater(report["named_crosschecks"], 40)
461
+
462
+ def test_wan_bypassed_loadimage_is_dropped_and_its_link_removed(self):
463
+ ui = jload(os.path.join(HARNESS, "workflows", "sources", "video_wan2_2_5B_ti2v.json"))
464
+ api, report = convert_ui_to_api(ui, self.oi)
465
+ self.assertNotIn("56", api)
466
+ self.assertNotIn("start_image", api["55"]["inputs"])
467
+ self.assertEqual(api["3"]["inputs"]["steps"], 20)
468
+ self.assertNotIn("control_after_generate", json.dumps(api)) # UI-only widget never sent
469
+
470
+ def test_refusals(self):
471
+ base = jload(os.path.join(HARNESS, "workflows", "sources", "video_wan2_2_5B_ti2v.json"))
472
+ unknown = json.loads(json.dumps(base))
473
+ unknown["nodes"][0]["type"] = "SomeCustomNodeNotInstalled"
474
+ with self.assertRaises(ConversionRefused) as cm:
475
+ convert_ui_to_api(unknown, self.oi)
476
+ self.assertIn("not installed", str(cm.exception))
477
+ extra = json.loads(json.dumps(base))
478
+ ks = next(n for n in extra["nodes"] if n["type"] == "KSampler")
479
+ ks["widgets_values"] = ks["widgets_values"] + [123]
480
+ with self.assertRaises(ConversionRefused) as cm:
481
+ convert_ui_to_api(extra, self.oi)
482
+ self.assertIn("saved widget values", str(cm.exception))
483
+ shifted = json.loads(json.dumps(base))
484
+ ks = next(n for n in shifted["nodes"] if n["type"] == "KSampler")
485
+ ks["widgets_values"] = [ks["widgets_values"][0], 20, "randomize"] + ks["widgets_values"][3:]
486
+ with self.assertRaises(ConversionRefused):
487
+ convert_ui_to_api(shifted, self.oi)
488
+
489
+
490
+ class T08Llama(MockWorld):
491
+ def test_08_llama_bench_rows(self):
492
+ bindir = os.path.join(self.case, "bin")
493
+ os.makedirs(bindir)
494
+ fake = os.path.join(TESTS, "fake_llama_bench.py")
495
+ if os.name == "nt":
496
+ with open(os.path.join(bindir, "llama-bench.cmd"), "w") as f:
497
+ f.write(f'@"{sys.executable}" "{fake}" %*\n')
498
+ else:
499
+ p = os.path.join(bindir, "llama-bench")
500
+ with open(p, "w") as f:
501
+ f.write(f'#!/bin/sh\nexec "{sys.executable}" "{fake}" "$@"\n')
502
+ os.chmod(p, 0o755)
503
+ md = os.path.join(self.case, "models")
504
+ os.makedirs(md)
505
+ for n in ("main.gguf", "oom-model.gguf"):
506
+ with open(os.path.join(md, n), "wb") as f:
507
+ f.write(b"g" * 100)
508
+ cfg = {"config_schema": 1, "model_slug": "mock-llm", "gpu_slug": "rtx-5060-ti", "vertical": "llm",
509
+ "runtime": "llama.cpp", "task": "llm",
510
+ "weights": {"main": {"filename": "main.gguf", "repo": "selftest/llm", "path": "main.gguf",
511
+ "revision": "0" * 40, "size": 100, "quantization": "Q3_K_M"},
512
+ "oom": {"filename": "oom-model.gguf", "repo": "selftest/llm", "path": "oom-model.gguf",
513
+ "revision": "0" * 40, "size": 100, "quantization": "Q8_0"}},
514
+ "runs": [{"run": 1, "key": "ctx4096", "mode": "bench", "model": "main", "ctx": 4096,
515
+ "n_prompt": 512, "n_gen": 128, "bench_args": ["-ngl", "99", "-fa", "on"], "timeout_s": 60},
516
+ {"run": 2, "key": "oom", "mode": "bench", "model": "oom", "ctx": 4096,
517
+ "n_prompt": 512, "n_gen": 128, "bench_args": ["-ngl", "99"], "timeout_s": 60},
518
+ {"run": 3, "key": "ctx8192", "mode": "bench", "model": "main", "ctx": 8192,
519
+ "n_prompt": 512, "n_gen": 128, "bench_args": ["-ngl", "99", "-fa", "on"], "timeout_s": 60}]}
520
+ cp = os.path.join(self.case, "llm.json")
521
+ jdump(cfg, cp)
522
+ rc, out = self.run_quiet(llama_measure.main, ["--llama-bin-dir", bindir, "--models-dir", md, "run",
523
+ "--config", cp, "--out-root", self.out, "--sample-ms", "100",
524
+ "--display-attached", "yes", "--no-spill-monitor",
525
+ "--no-comfy-free"])
526
+ self.assertEqual(rc, 0, out)
527
+ p = os.path.join(self.session_dir(), "runs.csv")
528
+ assert_schema_file(self, p)
529
+ rows = read_rows(p)
530
+ r1, r2, r3 = rows
531
+ self.assertEqual((r1["ok"], r1["prefill_tokens_per_s"], r1["gen_tokens_per_s"]), ("true", "612.5", "21.4"))
532
+ self.assertEqual((r1["context_tokens"], r1["prompt_tokens"], r1["gen_tokens"]), ("4096", "512", "128"))
533
+ self.assertEqual((r1["width"], r1["frames"], r1["wall_s"], r1["task"]), ("", "", "", "llm"))
534
+ self.assertEqual(json.loads(r1["config_json"])["n_depth"], 3584)
535
+ self.assertEqual(r1["runtime_version"], "b10442 (abc1234)")
536
+ self.assertEqual((r2["ok"], r2["failure"]), ("false", "oom"))
537
+ self.assertIn("cudaMalloc failed", r2["notes"])
538
+ self.assertEqual(r3["ok"], "true")
539
+ self.assertGreater(int(r1["peak_device_mib"]), int(r1["idle_device_mib"]))
540
+
541
+
542
+ def test_12_llama_server_probe(self):
543
+ bindir = os.path.join(self.case, "bin")
544
+ os.makedirs(bindir)
545
+ fake = os.path.join(TESTS, "fake_llama_server.py")
546
+ if os.name == "nt":
547
+ with open(os.path.join(bindir, "llama-server.cmd"), "w") as f:
548
+ f.write(f'@"{sys.executable}" "{fake}" %*\n')
549
+ else:
550
+ p = os.path.join(bindir, "llama-server")
551
+ with open(p, "w") as f:
552
+ f.write(f'#!/bin/sh\nexec "{sys.executable}" "{fake}" "$@"\n')
553
+ os.chmod(p, 0o755)
554
+ md = os.path.join(self.case, "models")
555
+ os.makedirs(md)
556
+ for n in ("main.gguf", "mmproj.gguf", "oom-model.gguf"):
557
+ with open(os.path.join(md, n), "wb") as f:
558
+ f.write(b"g" * 10)
559
+ w = lambda fn: {"filename": fn, "repo": "selftest/llm", "path": fn, "revision": "0" * 40, "size": 10, # noqa: E731
560
+ "quantization": "Q3_K_M"}
561
+ srv_args = ["--ctx-size", "32768", "--parallel", "1", "--flash-attn", "on"]
562
+ cfg = {"config_schema": 1, "model_slug": "mock-vlm", "gpu_slug": "rtx-5060-ti", "vertical": "multimodal",
563
+ "runtime": "llama.cpp", "task": "llm",
564
+ "weights": {"main": w("main.gguf"), "mmproj": w("mmproj.gguf"), "oom": w("oom-model.gguf")},
565
+ "runs": [{"run": 1, "key": "vision32k", "mode": "server", "model": "main", "mmproj": "mmproj",
566
+ "ctx": 32768, "port": 18089, "startup_timeout_s": 60, "timeout_s": 60, "server_args": srv_args,
567
+ "request": {"prompt": "Describe.", "max_tokens": 64, "image_size": [256, 256]}},
568
+ {"run": 2, "key": "oom-at-load", "mode": "server", "model": "oom", "mmproj": "mmproj",
569
+ "ctx": 32768, "port": 18090, "startup_timeout_s": 60, "timeout_s": 60, "server_args": srv_args,
570
+ "request": {"image_size": [64, 64]}}]}
571
+ cp = os.path.join(self.case, "vlm.json")
572
+ jdump(cfg, cp)
573
+ rc, out = self.run_quiet(llama_measure.main, ["--llama-bin-dir", bindir, "--models-dir", md, "run",
574
+ "--config", cp, "--out-root", self.out, "--sample-ms", "100",
575
+ "--display-attached", "yes", "--no-spill-monitor",
576
+ "--no-comfy-free"])
577
+ self.assertEqual(rc, 0, out)
578
+ p = os.path.join(self.session_dir(), "runs.csv")
579
+ assert_schema_file(self, p)
580
+ r1, r2 = read_rows(p)
581
+ self.assertEqual((r1["ok"], r1["context_tokens"], r1["prompt_tokens"], r1["gen_tokens"]),
582
+ ("true", "32768", "1100", "64"))
583
+ self.assertEqual((r1["prefill_tokens_per_s"], r1["gen_tokens_per_s"], r1["wall_s"]), ("550", "21.333", "5"))
584
+ self.assertEqual(r1["artifact"], "selftest/llm:main.gguf;selftest/llm:mmproj.gguf")
585
+ # the server path has no JSON build fields; it reads `--version`, whose format changed upstream
586
+ self.assertEqual(r1["runtime_version"], "b10442 (abc1234)")
587
+ self.assertGreaterEqual(int(r1["peak_device_mib"]), 14700 - 5) # the vision-encode bump was sampled
588
+ if os.name != "nt":
589
+ self.assertIn("self=13380 MiB", r1["notes"]) # graceful SIGINT printed the breakdown
590
+ self.assertEqual((r2["ok"], r2["failure"]), ("false", "oom"))
591
+ self.assertIn("died during load", r2["notes"])
592
+
593
+
594
+ def test_13f_busy_port_is_not_measured(self):
595
+ import socket
596
+ bindir = os.path.join(self.case, "bin")
597
+ os.makedirs(bindir)
598
+ fake = os.path.join(TESTS, "fake_llama_server.py")
599
+ if os.name == "nt":
600
+ with open(os.path.join(bindir, "llama-server.cmd"), "w") as f:
601
+ f.write(f'@"{sys.executable}" "{fake}" %*\n')
602
+ else:
603
+ p = os.path.join(bindir, "llama-server")
604
+ with open(p, "w") as f:
605
+ f.write(f'#!/bin/sh\nexec "{sys.executable}" "{fake}" "$@"\n')
606
+ os.chmod(p, 0o755)
607
+ md = os.path.join(self.case, "models")
608
+ os.makedirs(md)
609
+ with open(os.path.join(md, "main.gguf"), "wb") as f:
610
+ f.write(b"g" * 10)
611
+ squatter = socket.socket()
612
+ squatter.bind(("127.0.0.1", 0))
613
+ squatter.listen(1)
614
+ port = squatter.getsockname()[1]
615
+ try:
616
+ cfg = {"config_schema": 1, "model_slug": "mock-vlm2", "gpu_slug": "rtx-5060-ti", "vertical": "multimodal",
617
+ "runtime": "llama.cpp", "task": "llm",
618
+ "weights": {"main": {"filename": "main.gguf", "repo": "selftest/llm", "path": "main.gguf",
619
+ "revision": "0" * 40, "size": 10, "quantization": "Q3_K_M"}},
620
+ "runs": [{"run": 1, "key": "squatted", "mode": "server", "model": "main", "ctx": 4096,
621
+ "port": port, "server_args": [], "request": {"image_size": [32, 32]}}]}
622
+ cp = os.path.join(self.case, "busy.json")
623
+ jdump(cfg, cp)
624
+ rc, out = self.run_quiet(llama_measure.main, ["--llama-bin-dir", bindir, "--models-dir", md, "run",
625
+ "--config", cp, "--out-root", self.out, "--sample-ms", "100",
626
+ "--display-attached", "yes", "--no-spill-monitor",
627
+ "--no-comfy-free"])
628
+ finally:
629
+ squatter.close()
630
+ self.assertEqual(rc, 0, out)
631
+ self.assertIn("already in use", out)
632
+ p = os.path.join(self.session_dir(), "runs.csv")
633
+ self.assertEqual(read_rows(p) if os.path.exists(p) else [], [], "nothing measured on a squatted port")
634
+
635
+
636
+ class T13ReviewRegressions(unittest.TestCase):
637
+ def test_13a_llama_classification_order(self):
638
+ cuda_rt = "llama_model_loader: loaded meta data\nCUDA error: invalid argument\n current device: 0\n"
639
+ self.assertEqual(llama_measure.classify_failure(cuda_rt, 1)[0], "crash") # ran, then failed: a row
640
+ parser = "error: invalid parameter for argument: -fa\nusage: llama-bench [options]\n"
641
+ self.assertIsNone(llama_measure.classify_failure(parser, 1)[0]) # never ran: no row
642
+ server_parser = "error: invalid argument: --image-min-tokens\n"
643
+ self.assertIsNone(llama_measure.classify_failure(server_parser, 1)[0])
644
+ oom = ("error: invalid argument: x\nggml_backend_cuda_buffer_type_alloc_buffer: allocating 9000.00 MiB on "
645
+ "device 0: cudaMalloc failed: out of memory\n")
646
+ self.assertEqual(llama_measure.classify_failure(oom, 1)[0], "oom") # OOM wins
647
+
648
+ def test_13b_torn_journal_line_does_not_block_resume(self):
649
+ from mharness.session import Session
650
+ d = tempfile.mkdtemp()
651
+ try:
652
+ s = Session(d, "2026-09-11_mock-model_rtx-5060-ti")
653
+ s.attempt(1, "start", prompt_id="a")
654
+ s.attempt(1, "end", outcome="recorded")
655
+ s.attempt(2, "start", prompt_id="b")
656
+ with open(s.attempts_path, "ab") as f:
657
+ f.write(b'{"ts": 1, "run": 3, "wha' + b"\x00" * 40) # power cut mid-append
658
+ self.assertEqual(s.interrupted_attempts(2), 1)
659
+ self.assertEqual(s.our_prompt_ids(), {"a", "b"})
660
+ with open(s.events_path, "w") as f:
661
+ f.write('{"kind": "free", "post_free_mib": 800}\n{"kind": "fr')
662
+ self.assertEqual(len(s.events()), 1)
663
+ finally:
664
+ shutil.rmtree(d)
665
+
666
+ def test_13c_spill_wording(self):
667
+ from mharness.runner_common import window_notes
668
+ win = {"n": 50, "peak_mib": 16200, "max_gap_s": 0.5, "first_after_start_s": 0.2, "last_before_end_s": 0.2}
669
+ low = dict(win, peak_mib=12000)
670
+ j = lambda xs: " | ".join(xs) # noqa: E731
671
+ self.assertIn("fallback likely", j(window_notes(win, 500, 16311, (900, "ok"))))
672
+ self.assertIn("not attributed to fallback", j(window_notes(low, 500, 16311, (900, "ok"))))
673
+ self.assertIn("did not rise", j(window_notes(win, 500, 16311, (0, "ok"))))
674
+ missing = j(window_notes(win, 500, 16311, (None, "no shared-memory counter row after the run")))
675
+ self.assertIn("spill is unknown", missing)
676
+ self.assertNotIn("did not rise", missing) # no data never reads as no spill
677
+ self.assertIn("ends", j(window_notes(win, 500, 16311, (None, "x"), covered=False)))
678
+
679
+
680
+ class T09Downloads(unittest.TestCase):
681
+ def setUp(self):
682
+ self.d = tempfile.mkdtemp()
683
+ self.dest = os.path.join(self.d, "models", "vae")
684
+ os.makedirs(self.dest)
685
+
686
+ def tearDown(self):
687
+ shutil.rmtree(self.d)
688
+ sys.modules.pop("huggingface_hub", None)
689
+
690
+ def fake_hub(self, payload: bytes):
691
+ mod = types.ModuleType("huggingface_hub")
692
+
693
+ def hf_hub_download(repo_id, filename, revision, local_dir):
694
+ p = os.path.join(local_dir, filename)
695
+ os.makedirs(os.path.dirname(p), exist_ok=True)
696
+ with open(p, "wb") as f:
697
+ f.write(payload)
698
+ return p
699
+ mod.hf_hub_download = hf_hub_download
700
+ sys.modules["huggingface_hub"] = mod
701
+
702
+ def item(self, fname, size, sha=None):
703
+ spec = WeightSpec(filename=fname, repo="o/r", path=f"sub/{fname}", folder="vae", size=size, sha256=sha)
704
+ return DownloadItem(spec, self.dest, os.path.join(self.d, "models", ".smeltcore-staging", "o__r"), size, sha)
705
+
706
+ def test_existing_file_is_never_touched(self):
707
+ keep = os.path.join(self.dest, "a.safetensors")
708
+ with open(keep, "wb") as f:
709
+ f.write(b"keep")
710
+ spec = WeightSpec(filename="a.safetensors", repo="o/r", path="a.safetensors", folder="vae", size=4)
711
+ items, problems = plan_downloads([spec], {"vae": [self.dest]}, check_remote=False)
712
+ self.assertEqual(items, [])
713
+ self.assertTrue(any("will not download over it" in p for p in problems))
714
+ self.fake_hub(b"NEWBYTES")
715
+ with self.assertRaises(RuntimeError):
716
+ execute_download(self.item("a.safetensors", 8), verify_sha256=False, log=lambda *a: None)
717
+ self.assertEqual(read_text(keep, "rb"), b"keep")
718
+
719
+ def test_fresh_download_is_verified_and_placed(self):
720
+ data = b"0123456789"
721
+ self.fake_hub(data)
722
+ final = execute_download(self.item("b.safetensors", 10, hashlib.sha256(data).hexdigest()), log=lambda *a: None)
723
+ self.assertEqual(final, os.path.join(self.dest, "b.safetensors"))
724
+ self.assertEqual(read_text(final, "rb"), data)
725
+ self.fake_hub(b"short")
726
+ with self.assertRaises(RuntimeError):
727
+ execute_download(self.item("c.safetensors", 10), log=lambda *a: None)
728
+ self.assertFalse(os.path.exists(os.path.join(self.dest, "c.safetensors")))
729
+
730
+
731
+ if __name__ == "__main__":
732
+ unittest.main(verbosity=2)
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/tools/build_workflows.py ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Rebuild the shipped API-format workflows from their UI sources (workflows/build.json).
3
+
4
+ python tools/build_workflows.py --object-info path/to/object_info.json # offline
5
+ python tools/build_workflows.py --live [--comfy-url URL] # against the running ComfyUI
6
+
7
+ Each output is: the conservative converter over the UI source, then the declared
8
+ transforms (and nothing else), then structural validation against the object_info
9
+ used. A provenance file is written beside every output. If the converter refuses a
10
+ source, the output is NOT written — rebuild from a human "Export (API)" instead.
11
+
12
+ Transforms:
13
+ replace_node {node, class_type, inputs} same id, new class and literal inputs; links INTO the
14
+ old node are dropped, links OUT of it are kept
15
+ drop_node {node} only if every consumer input is optional or lazy
16
+ set {node, input, value} a literal on an existing input
17
+ """
18
+ from __future__ import annotations
19
+
20
+ import argparse
21
+ import hashlib
22
+ import json
23
+ import os
24
+ import sys
25
+
26
+ HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
27
+ sys.path.insert(0, HERE)
28
+
29
+ from mharness import HARNESS_VERSION # noqa: E402
30
+ from mharness.comfy_api import ComfyClient # noqa: E402
31
+ from mharness.ui2api import ConversionRefused, convert_ui_to_api # noqa: E402
32
+ from mharness.workflow import (_spec_opts, is_link, node_input_specs, prompt_digest, # noqa: E402
33
+ validate_api_prompt)
34
+
35
+
36
+ class TransformError(RuntimeError):
37
+ pass
38
+
39
+
40
+ def apply_transform(api: dict, t: dict, oi: dict) -> None:
41
+ op = t["op"]
42
+ nid = str(t["node"])
43
+ if nid not in api:
44
+ raise TransformError(f"{op}: node {nid} is not in the converted workflow")
45
+ if op == "replace_node":
46
+ ct = t["class_type"]
47
+ old = api[nid]
48
+ keep_links = {}
49
+ if ct in oi:
50
+ specs = node_input_specs(oi[ct])
51
+ keep_links = {k: v for k, v in old["inputs"].items() if is_link(v) and k in specs}
52
+ api[nid] = {"class_type": ct, "inputs": {**keep_links, **t["inputs"]},
53
+ "_meta": {"title": f"{ct} (replaces {old['class_type']})"}}
54
+ elif op == "drop_node":
55
+ for cid, node in api.items():
56
+ for k, v in list(node["inputs"].items()):
57
+ if is_link(v) and str(v[0]) == nid:
58
+ info = oi.get(node["class_type"])
59
+ if info is None:
60
+ raise TransformError(f"drop {nid}: consumer {cid} ({node['class_type']}) is not installed")
61
+ sect, spec = node_input_specs(info).get(k, (None, None))
62
+ if sect != "optional" and not _spec_opts(spec).get("lazy"):
63
+ raise TransformError(f"drop {nid}: consumer {cid}.{k} is a required, non-lazy input")
64
+ del node["inputs"][k]
65
+ del api[nid]
66
+ elif op == "set":
67
+ if t["input"] not in api[nid]["inputs"]:
68
+ raise TransformError(f"set: node {nid} has no input {t['input']!r}")
69
+ if is_link(api[nid]["inputs"][t["input"]]):
70
+ raise TransformError(f"set: {nid}.{t['input']} is a link")
71
+ api[nid]["inputs"][t["input"]] = t["value"]
72
+ else:
73
+ raise TransformError(f"unknown transform {op!r}")
74
+
75
+
76
+ def sha256_of(path: str) -> str:
77
+ with open(path, "rb") as f:
78
+ return hashlib.sha256(f.read()).hexdigest()
79
+
80
+
81
+ def main() -> int:
82
+ ap = argparse.ArgumentParser()
83
+ g = ap.add_mutually_exclusive_group(required=True)
84
+ g.add_argument("--object-info", help="saved GET /object_info JSON")
85
+ g.add_argument("--live", action="store_true", help="fetch /object_info from --comfy-url")
86
+ ap.add_argument("--comfy-url", default=os.environ.get("COMFYUI_URL", "http://127.0.0.1:8000"))
87
+ ap.add_argument("--manifest", default=os.path.join(HERE, "workflows", "build.json"))
88
+ ap.add_argument("--out-dir", default=HERE, help="root the manifest's 'out' paths are relative to")
89
+ args = ap.parse_args()
90
+
91
+ if args.live:
92
+ client = ComfyClient(args.comfy_url)
93
+ oi = client.object_info()
94
+ ss = client.system_stats().get("system", {})
95
+ oi_origin = {"source": "live", "url": args.comfy_url, "comfyui_version": ss.get("comfyui_version"),
96
+ "argv": ss.get("argv")}
97
+ else:
98
+ with open(args.object_info, encoding="utf-8") as f:
99
+ oi = json.load(f)
100
+ origin_text = None
101
+ if isinstance(oi, dict) and "classes" in oi and "_origin" in oi: # tests/fixtures format
102
+ origin_text, oi = oi["_origin"], oi["classes"]
103
+ path = os.path.abspath(args.object_info)
104
+ rel = os.path.relpath(path, HERE)
105
+ oi_origin = {"source": "file", "path": rel if not rel.startswith("..") else path,
106
+ "sha256": sha256_of(args.object_info), "origin": origin_text}
107
+
108
+ with open(args.manifest, encoding="utf-8") as f:
109
+ manifest = json.load(f)
110
+ rc = 0
111
+ for item in manifest["outputs"]:
112
+ src = os.path.join(HERE, item["source"])
113
+ out = os.path.join(args.out_dir, item["out"])
114
+ with open(src, encoding="utf-8") as f:
115
+ ui = json.load(f)
116
+ try:
117
+ api, report = convert_ui_to_api(ui, oi)
118
+ for t in item.get("transforms") or []:
119
+ apply_transform(api, t, oi)
120
+ except (ConversionRefused, TransformError) as e:
121
+ print(f"REFUSED {item['out']}: {e}")
122
+ rc = 1
123
+ continue
124
+ v = validate_api_prompt(api, oi)
125
+ weight_only = all(m in {x[3] for x in v.combo_misses} for m in v.errors)
126
+ os.makedirs(os.path.dirname(out), exist_ok=True)
127
+ with open(out, "w", encoding="utf-8") as f:
128
+ json.dump(api, f, indent=1, ensure_ascii=False)
129
+ prov = {
130
+ "harness_version": HARNESS_VERSION, "source": item["source"], "source_sha256": sha256_of(src),
131
+ "source_origin": item.get("source_origin"), "transforms": item.get("transforms") or [],
132
+ "object_info": oi_origin, "prompt_sha256": prompt_digest(api), "nodes": len(api),
133
+ "converter_report": {k: report[k] for k in ("emitted", "dropped_frontend_only", "bypassed", "muted",
134
+ "defaulted_widgets", "named_crosschecks", "warnings")},
135
+ "validation_errors": v.errors, "validation_warnings": v.warnings,
136
+ "validation_note": ("all remaining errors are model files absent from the object_info used"
137
+ if weight_only else "NON-WEIGHT VALIDATION ERRORS: do not use this workflow"),
138
+ }
139
+ with open(out.replace(".api.json", ".provenance.json"), "w", encoding="utf-8") as f:
140
+ json.dump(prov, f, indent=1, ensure_ascii=False)
141
+ print(f"wrote {item['out']}: {len(api)} nodes, sha {prompt_digest(api)[:12]}, "
142
+ f"{'weights-only errors' if weight_only else 'OTHER ERRORS'} ({len(v.errors)})")
143
+ if not weight_only:
144
+ rc = 1
145
+ return rc
146
+
147
+
148
+ if __name__ == "__main__":
149
+ sys.exit(main())
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/build.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_what": "Recipe for the shipped API-format workflows. Each output = convert(UI source) + the transforms listed, validated against /object_info. Rebuild with: python tools/build_workflows.py [--object-info FILE | --live]",
3
+ "outputs": [
4
+ {
5
+ "out": "workflows/wan-2-2_ti2v-5b_fp16.api.json",
6
+ "source": "workflows/sources/video_wan2_2_5B_ti2v.json",
7
+ "source_origin": "Comfy-Org/workflow_templates templates/video_wan2_2_5B_ti2v.json @ f051bbde7e31f0c563241b04e42c93d11e55f035 (2026-09-11); the template the wan-2-2 recipe tells readers to load ('Wan2.2 5B video generation')",
8
+ "transforms": []
9
+ },
10
+ {
11
+ "out": "workflows/wan-2-2_ti2v-5b_q8-gguf.api.json",
12
+ "source": "workflows/sources/video_wan2_2_5B_ti2v.json",
13
+ "source_origin": "same template",
14
+ "transforms": [
15
+ {"op": "replace_node", "node": "37", "class_type": "UnetLoaderGGUF",
16
+ "inputs": {"unet_name": "Wan2.2-TI2V-5B-Q8_0.gguf"},
17
+ "why": "the recipe's alternative path, verbatim: 'swap the Load Diffusion Model node for Unet Loader (GGUF) ... and point it at the .gguf file'. Same node id, same output slot, so every consumer link is unchanged."}
18
+ ]
19
+ },
20
+ {
21
+ "out": "workflows/krea-2_turbo-fp8_alperkts.api.json",
22
+ "source": "workflows/sources/alperkts_Krea 2 simple workflow.json",
23
+ "source_origin": "AlperKTS/Krea2_FP8 workflows/Krea 2 simple workflow.json @ 19c1c7da8760da12f338f7c4472575ab7dceb445 (the workflow the krea-2 recipe tells readers to drag in; its sibling krea2_native_workflow.json is node-for-node identical except the prompt text)",
24
+ "transforms": []
25
+ },
26
+ {
27
+ "out": "workflows/minimax-h3_t2v_turbo-branch-pruned.api.json",
28
+ "source": "workflows/sources/video_minimax_h3_t2v.json",
29
+ "source_origin": "Comfy-Org/workflow_templates templates/video_minimax_h3_t2v.json @ f051bbde7e31f0c563241b04e42c93d11e55f035 (the 'MiniMax H3 Text to Video' template the minimax-h3 recipe tells readers to load)",
30
+ "transforms": [
31
+ {"op": "drop_node", "node": "140:134",
32
+ "why": "LoraLoaderModelOnly for the optional Turbo LoRA (lightx2v/Minimax-h3-Turbo), which the template added after the recipe was written. It feeds only ComfySwitchNode 140:135.on_true, a lazy input that is never evaluated while turbo_mode=false (the template default and every run here). ComfyUI's validate_prompt nevertheless rejects the whole prompt if that LoRA file is absent ('Value not in list: lora_name', measured 2026-09-11 against ComfyUI 0.35.0). Dropping the dead branch is execution-identical and lets the recipe's four files suffice."}
33
+ ]
34
+ }
35
+ ]
36
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/build.qwen-image-2-1.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_what": "Qwen-Image-2.1 workflows for the rtx-5060-ti measurement session of 2026-09-21. Same format as build.json (convert(UI source) + transforms, validated against /object_info), kept in its own manifest because the self-test's T07 converts build.json against the pinned ComfyUI 0.35.0 object_info, which predates the Qwen-Image-2.1 nodes (ComfyUI v0.37.0, PR #16400). Built 2026-09-21 against a GET /object_info from a CPU-only ComfyUI at tag v0.37.0 (commit 73c9bad4d21e7addbe1d13bc92eee0f1431b017d); rebuild with: python tools/build_workflows.py --manifest workflows/build.qwen-image-2-1.json [--object-info FILE | --live]. The two file swaps are separate outputs rather than knobs on purpose: a knob that names an absent file is FATAL for the whole config (by design), whereas a loader default that names an absent file is 'weight missing -> BLOCKED run N', so the template runs still happen if only the three template files were downloaded. NOT built: the 'Qwen Image 2.1: Image Edit' template (workflows/sources/image_qwen_image_2_1_image_edit.json, kept for the record) — the converter refuses its ImageCompare node ('input compare_view is a IMAGECOMPARE widget, which this converter does not port'), and its LoadImage nodes need the template's input PNGs in ComfyUI/input/. Export (API) from the UI is the documented fallback (README section 7).",
3
+ "outputs": [
4
+ {
5
+ "out": "workflows/qwen-image-2-1_t2i_int8-template.api.json",
6
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
7
+ "source_origin": "Comfy-Org/workflow_templates templates/image_qwen_image_2_1_t2i.json @ 371a7b7171bbd11e9cc92ef615ba5ad223d7e5b4 (2026-09-20T12:56Z, 'Switch Qwen Image 2.1 CLIP to int8 convrot (0.11.66)'); the 'Qwen Image 2.1: Text to Image' template ComfyUI ships and the docs page tells readers to load. sha256 d33a6b36d530756e26ef4e25beb17d950daaea09d295475cd65f97f5d0af3b41",
8
+ "transforms": []
9
+ },
10
+ {
11
+ "out": "workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json",
12
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
13
+ "source_origin": "same template",
14
+ "transforms": [
15
+ {"op": "set", "node": "459:453", "input": "clip_name", "value": "qwen3vl_8b_w4a8.safetensors",
16
+ "why": "the round brief's co-residence alternative: Comfy-Org's own w4a8 encoder (6,312,105,364 B, same repo and revision as the template's files) in place of the int8_convrot one (9,350,798,360 B). One widget on one loader; every link is unchanged."}
17
+ ]
18
+ },
19
+ {
20
+ "out": "workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json",
21
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
22
+ "source_origin": "same template",
23
+ "transforms": [
24
+ {"op": "set", "node": "459:451", "input": "unet_name", "value": "qwen_image_2.1_bf16.safetensors",
25
+ "why": "the round brief's quality reference: Comfy-Org's bf16 DiT (14,230,280,616 B) in place of the int8_convrot one (7,256,783,064 B) — the docs page's 'needs more memory' alternative. One widget on one loader; every link is unchanged."}
26
+ ]
27
+ }
28
+ ]
29
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/krea-2_turbo-fp8_alperkts.api.json ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "13": {
3
+ "inputs": {
4
+ "clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
5
+ "type": "krea2",
6
+ "device": "default"
7
+ },
8
+ "class_type": "CLIPLoader",
9
+ "_meta": {
10
+ "title": "CLIPLoader"
11
+ }
12
+ },
13
+ "1": {
14
+ "inputs": {
15
+ "unet_name": "krea2_turbo_fp8.safetensors",
16
+ "weight_dtype": "default"
17
+ },
18
+ "class_type": "UNETLoader",
19
+ "_meta": {
20
+ "title": "UNETLoader"
21
+ }
22
+ },
23
+ "8": {
24
+ "inputs": {
25
+ "conditioning": [
26
+ "6",
27
+ 0
28
+ ]
29
+ },
30
+ "class_type": "ConditioningZeroOut",
31
+ "_meta": {
32
+ "title": "ConditioningZeroOut"
33
+ }
34
+ },
35
+ "10": {
36
+ "inputs": {
37
+ "width": 1280,
38
+ "height": 720,
39
+ "batch_size": 1
40
+ },
41
+ "class_type": "EmptyLatentImage",
42
+ "_meta": {
43
+ "title": "EmptyLatentImage"
44
+ }
45
+ },
46
+ "3": {
47
+ "inputs": {
48
+ "samples": [
49
+ "2",
50
+ 0
51
+ ],
52
+ "vae": [
53
+ "4",
54
+ 0
55
+ ]
56
+ },
57
+ "class_type": "VAEDecode",
58
+ "_meta": {
59
+ "title": "VAEDecode"
60
+ }
61
+ },
62
+ "2": {
63
+ "inputs": {
64
+ "seed": 0,
65
+ "steps": 8,
66
+ "cfg": 1,
67
+ "sampler_name": "er_sde",
68
+ "scheduler": "simple",
69
+ "denoise": 1,
70
+ "model": [
71
+ "1",
72
+ 0
73
+ ],
74
+ "positive": [
75
+ "6",
76
+ 0
77
+ ],
78
+ "negative": [
79
+ "8",
80
+ 0
81
+ ],
82
+ "latent_image": [
83
+ "10",
84
+ 0
85
+ ]
86
+ },
87
+ "class_type": "KSampler",
88
+ "_meta": {
89
+ "title": "KSampler"
90
+ }
91
+ },
92
+ "5": {
93
+ "inputs": {
94
+ "images": [
95
+ "3",
96
+ 0
97
+ ]
98
+ },
99
+ "class_type": "PreviewImage",
100
+ "_meta": {
101
+ "title": "PreviewImage"
102
+ }
103
+ },
104
+ "6": {
105
+ "inputs": {
106
+ "text": "",
107
+ "clip": [
108
+ "13",
109
+ 0
110
+ ]
111
+ },
112
+ "class_type": "CLIPTextEncode",
113
+ "_meta": {
114
+ "title": "CLIPTextEncode"
115
+ }
116
+ },
117
+ "4": {
118
+ "inputs": {
119
+ "vae_name": "qwen_image_vae.safetensors"
120
+ },
121
+ "class_type": "VAELoader",
122
+ "_meta": {
123
+ "title": "VAELoader"
124
+ }
125
+ }
126
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/krea-2_turbo-fp8_alperkts.provenance.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "source": "workflows/sources/alperkts_Krea 2 simple workflow.json",
4
+ "source_sha256": "b92f4c44fb63282b8dc746d695d79112e39fdb71aa74d39d1c44115662f3314d",
5
+ "source_origin": "AlperKTS/Krea2_FP8 workflows/Krea 2 simple workflow.json @ 19c1c7da8760da12f338f7c4472575ab7dceb445 (the workflow the krea-2 recipe tells readers to drag in; its sibling krea2_native_workflow.json is node-for-node identical except the prompt text)",
6
+ "transforms": [],
7
+ "object_info": {
8
+ "source": "file",
9
+ "path": "tests/fixtures/object_info_comfyui-0.35.0_subset.json",
10
+ "sha256": "a881948f2074ae994d870858cd053c20017531a90d940666bcc4dd5ba7f18c2f",
11
+ "origin": "GET /object_info from ComfyUI 0.35.0 (commit 1d48d9cf7bcecb6022a87b3cb13e0fb435bf9b8a) + city96/ComfyUI-GGUF 6ea2651, CPU instance, 2026-09-11; placeholder model files listed in the loader combos"
12
+ },
13
+ "prompt_sha256": "9ba8b8f369f07a8202ed1f89435e4cafecde63518032c6a6fa4ef5b789a20bec",
14
+ "nodes": 9,
15
+ "converter_report": {
16
+ "emitted": [
17
+ "13",
18
+ "1",
19
+ "8",
20
+ "10",
21
+ "3",
22
+ "2",
23
+ "5",
24
+ "6",
25
+ "4"
26
+ ],
27
+ "dropped_frontend_only": [
28
+ "14 (Note)"
29
+ ],
30
+ "bypassed": [],
31
+ "muted": [],
32
+ "defaulted_widgets": [],
33
+ "named_crosschecks": 0,
34
+ "warnings": []
35
+ },
36
+ "validation_errors": [],
37
+ "validation_warnings": [],
38
+ "validation_note": "all remaining errors are model files absent from the object_info used"
39
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/minimax-h3_t2v_turbo-branch-pruned.api.json ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "92": {
3
+ "inputs": {
4
+ "filename_prefix": "video/MiniMax_H3",
5
+ "format": "auto",
6
+ "format.codec": "auto",
7
+ "codec": "auto",
8
+ "video": [
9
+ "140:130",
10
+ 0
11
+ ]
12
+ },
13
+ "class_type": "SaveVideo",
14
+ "_meta": {
15
+ "title": "SaveVideo"
16
+ }
17
+ },
18
+ "115": {
19
+ "inputs": {
20
+ "aspect_ratio": "16:9 (Widescreen)",
21
+ "megapixels": 0.4,
22
+ "multiple": 32
23
+ },
24
+ "class_type": "ResolutionSelector",
25
+ "_meta": {
26
+ "title": "ResolutionSelector"
27
+ }
28
+ },
29
+ "140:119": {
30
+ "inputs": {
31
+ "vae_name": "minimax_h3_video_vae_fp16.safetensors"
32
+ },
33
+ "class_type": "VAELoader",
34
+ "_meta": {
35
+ "title": "VAELoader"
36
+ }
37
+ },
38
+ "140:120": {
39
+ "inputs": {
40
+ "vae_name": "minimax_h3_audio_vae_fp32.safetensors"
41
+ },
42
+ "class_type": "VAELoader",
43
+ "_meta": {
44
+ "title": "VAELoader"
45
+ }
46
+ },
47
+ "140:121": {
48
+ "inputs": {
49
+ "samples": [
50
+ "140:125",
51
+ 0
52
+ ],
53
+ "vae": [
54
+ "140:120",
55
+ 0
56
+ ]
57
+ },
58
+ "class_type": "VAEDecodeAudio",
59
+ "_meta": {
60
+ "title": "VAEDecodeAudio"
61
+ }
62
+ },
63
+ "140:122": {
64
+ "inputs": {
65
+ "samples": [
66
+ "140:125",
67
+ 0
68
+ ],
69
+ "vae": [
70
+ "140:119",
71
+ 0
72
+ ]
73
+ },
74
+ "class_type": "VAEDecode",
75
+ "_meta": {
76
+ "title": "VAEDecode"
77
+ }
78
+ },
79
+ "140:123": {
80
+ "inputs": {
81
+ "sampler_name": "res_multistep"
82
+ },
83
+ "class_type": "KSamplerSelect",
84
+ "_meta": {
85
+ "title": "KSamplerSelect"
86
+ }
87
+ },
88
+ "140:124": {
89
+ "inputs": {
90
+ "scheduler": "simple",
91
+ "steps": [
92
+ "140:136",
93
+ 0
94
+ ],
95
+ "denoise": 1,
96
+ "model": [
97
+ "140:135",
98
+ 0
99
+ ]
100
+ },
101
+ "class_type": "BasicScheduler",
102
+ "_meta": {
103
+ "title": "BasicScheduler"
104
+ }
105
+ },
106
+ "140:125": {
107
+ "inputs": {
108
+ "noise": [
109
+ "140:129",
110
+ 0
111
+ ],
112
+ "guider": [
113
+ "140:126",
114
+ 0
115
+ ],
116
+ "sampler": [
117
+ "140:123",
118
+ 0
119
+ ],
120
+ "sigmas": [
121
+ "140:124",
122
+ 0
123
+ ],
124
+ "latent_image": [
125
+ "140:131",
126
+ 1
127
+ ]
128
+ },
129
+ "class_type": "SamplerCustomAdvanced",
130
+ "_meta": {
131
+ "title": "SamplerCustomAdvanced"
132
+ }
133
+ },
134
+ "140:126": {
135
+ "inputs": {
136
+ "model": [
137
+ "140:135",
138
+ 0
139
+ ],
140
+ "conditioning": [
141
+ "140:131",
142
+ 0
143
+ ]
144
+ },
145
+ "class_type": "BasicGuider",
146
+ "_meta": {
147
+ "title": "BasicGuider"
148
+ }
149
+ },
150
+ "140:127": {
151
+ "inputs": {
152
+ "unet_name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors",
153
+ "weight_dtype": "default"
154
+ },
155
+ "class_type": "UNETLoader",
156
+ "_meta": {
157
+ "title": "UNETLoader"
158
+ }
159
+ },
160
+ "140:128": {
161
+ "inputs": {
162
+ "clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
163
+ "type": "minimax",
164
+ "device": "default"
165
+ },
166
+ "class_type": "CLIPLoader",
167
+ "_meta": {
168
+ "title": "CLIPLoader"
169
+ }
170
+ },
171
+ "140:129": {
172
+ "inputs": {
173
+ "noise_seed": 757358688076805
174
+ },
175
+ "class_type": "RandomNoise",
176
+ "_meta": {
177
+ "title": "RandomNoise"
178
+ }
179
+ },
180
+ "140:130": {
181
+ "inputs": {
182
+ "fps": 24,
183
+ "bit_depth": 8,
184
+ "color_space": "sRGB",
185
+ "images": [
186
+ "140:122",
187
+ 0
188
+ ],
189
+ "audio": [
190
+ "140:121",
191
+ 0
192
+ ]
193
+ },
194
+ "class_type": "CreateVideo",
195
+ "_meta": {
196
+ "title": "CreateVideo"
197
+ }
198
+ },
199
+ "140:131": {
200
+ "inputs": {
201
+ "prompt": "Realistic live-action cinematic look, action movie trailer: practical film photography style, a post-rain dusk metropolis, anamorphic lens, shallow depth of field, film grain, city volumetric fog, flying-car traffic between the towers, restrained grading for a premium feel, powerful natural movement.\n\nScene overview: at dusk on a cluster of skyscrapers, the protagonist is being chased, sprinting and leaping across rooftops, jumping from one building's roof to the next with pursuers closing in behind. This is the escape sequence of an action movie trailer: every leap is life-or-death, thrilling and fluid.\n\nStoryboard (each shot a separate scene, rapid cuts, all landing on the musical beats):\n[0s-1.5s] Shot 1: high side angle: the protagonist sprinting at the roof edge, pursuers appearing in the rooftop doorway behind him, wind catching his coat.\n[1s-2.5s] Shot 2: the protagonist leaps across the gap between buildings, body stretching mid-air, towers and flying-car light trails behind him, a slight slow-motion feel.\n[2.5s-4s] Shot 3: he lands, rolls and rises, low-angle shot, tower shadows and fog behind him, he keeps running.\n[4s-5s] Shot 4: freeze: the instant he hits the edge of the next roof and launches into the jump, silhouette, holding.\n\nCamera: each shot its own angle, cuts clean and hard, no dissolves, a slight frame jitter on the jumps.\n\nAudio: wind, rapid footsteps, city ambience, low score underneath, an accent hit on each leap, the score bursting at 4s, closing the last 1s.\n\nNo text, subtitles, logos or watermarks of any kind, no animation or cartoon rendering, no overly-CG look, keep the live-action texture.",
202
+ "width": [
203
+ "115",
204
+ 0
205
+ ],
206
+ "height": [
207
+ "115",
208
+ 1
209
+ ],
210
+ "length": [
211
+ "140:132",
212
+ 1
213
+ ],
214
+ "clip": [
215
+ "140:128",
216
+ 0
217
+ ],
218
+ "vae": [
219
+ "140:119",
220
+ 0
221
+ ]
222
+ },
223
+ "class_type": "MiniMaxH3ImageToVideo",
224
+ "_meta": {
225
+ "title": "MiniMaxH3ImageToVideo"
226
+ }
227
+ },
228
+ "140:132": {
229
+ "inputs": {
230
+ "expression": "max(5, round(a * 24)) + (5 - (max(5, round(a * 24)) % 17)) % 17",
231
+ "values.a": [
232
+ "140:133",
233
+ 0
234
+ ]
235
+ },
236
+ "class_type": "ComfyMathExpression",
237
+ "_meta": {
238
+ "title": "ComfyMathExpression"
239
+ }
240
+ },
241
+ "140:133": {
242
+ "inputs": {
243
+ "value": 5
244
+ },
245
+ "class_type": "PrimitiveFloat",
246
+ "_meta": {
247
+ "title": "Float (duration)"
248
+ }
249
+ },
250
+ "140:135": {
251
+ "inputs": {
252
+ "switch": [
253
+ "140:139",
254
+ 0
255
+ ],
256
+ "on_false": [
257
+ "140:127",
258
+ 0
259
+ ]
260
+ },
261
+ "class_type": "ComfySwitchNode",
262
+ "_meta": {
263
+ "title": "If/Else Switch (Model)"
264
+ }
265
+ },
266
+ "140:136": {
267
+ "inputs": {
268
+ "switch": [
269
+ "140:139",
270
+ 0
271
+ ],
272
+ "on_false": [
273
+ "140:137",
274
+ 0
275
+ ],
276
+ "on_true": [
277
+ "140:138",
278
+ 0
279
+ ]
280
+ },
281
+ "class_type": "ComfySwitchNode",
282
+ "_meta": {
283
+ "title": "If/Else Switch (Steps)"
284
+ }
285
+ },
286
+ "140:137": {
287
+ "inputs": {
288
+ "value": 20
289
+ },
290
+ "class_type": "PrimitiveInt",
291
+ "_meta": {
292
+ "title": "PrimitiveInt"
293
+ }
294
+ },
295
+ "140:138": {
296
+ "inputs": {
297
+ "value": 8
298
+ },
299
+ "class_type": "PrimitiveInt",
300
+ "_meta": {
301
+ "title": "PrimitiveInt"
302
+ }
303
+ },
304
+ "140:139": {
305
+ "inputs": {
306
+ "value": false
307
+ },
308
+ "class_type": "PrimitiveBoolean",
309
+ "_meta": {
310
+ "title": "Boolean (Enable Lightning LoRA)"
311
+ }
312
+ }
313
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/minimax-h3_t2v_turbo-branch-pruned.provenance.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "source": "workflows/sources/video_minimax_h3_t2v.json",
4
+ "source_sha256": "2400b01a7c8acae3fed038c0372f08bacb90d2cdf915febadbe7e3f9802506ea",
5
+ "source_origin": "Comfy-Org/workflow_templates templates/video_minimax_h3_t2v.json @ f051bbde7e31f0c563241b04e42c93d11e55f035 (the 'MiniMax H3 Text to Video' template the minimax-h3 recipe tells readers to load)",
6
+ "transforms": [
7
+ {
8
+ "op": "drop_node",
9
+ "node": "140:134",
10
+ "why": "LoraLoaderModelOnly for the optional Turbo LoRA (lightx2v/Minimax-h3-Turbo), which the template added after the recipe was written. It feeds only ComfySwitchNode 140:135.on_true, a lazy input that is never evaluated while turbo_mode=false (the template default and every run here). ComfyUI's validate_prompt nevertheless rejects the whole prompt if that LoRA file is absent ('Value not in list: lora_name', measured 2026-09-11 against ComfyUI 0.35.0). Dropping the dead branch is execution-identical and lets the recipe's four files suffice."
11
+ }
12
+ ],
13
+ "object_info": {
14
+ "source": "file",
15
+ "path": "tests/fixtures/object_info_comfyui-0.35.0_subset.json",
16
+ "sha256": "a881948f2074ae994d870858cd053c20017531a90d940666bcc4dd5ba7f18c2f",
17
+ "origin": "GET /object_info from ComfyUI 0.35.0 (commit 1d48d9cf7bcecb6022a87b3cb13e0fb435bf9b8a) + city96/ComfyUI-GGUF 6ea2651, CPU instance, 2026-09-11; placeholder model files listed in the loader combos"
18
+ },
19
+ "prompt_sha256": "8e70247d4ca7d6f844ad3f036e564bd015f3397f72d210a2ea505062dadf5f13",
20
+ "nodes": 22,
21
+ "converter_report": {
22
+ "emitted": [
23
+ "92",
24
+ "115",
25
+ "140:119",
26
+ "140:120",
27
+ "140:121",
28
+ "140:122",
29
+ "140:123",
30
+ "140:124",
31
+ "140:125",
32
+ "140:126",
33
+ "140:127",
34
+ "140:128",
35
+ "140:129",
36
+ "140:130",
37
+ "140:131",
38
+ "140:132",
39
+ "140:133",
40
+ "140:134",
41
+ "140:135",
42
+ "140:136",
43
+ "140:137",
44
+ "140:138",
45
+ "140:139"
46
+ ],
47
+ "dropped_frontend_only": [
48
+ "116 (MarkdownNote)",
49
+ "117 (MarkdownNote)",
50
+ "118 (MarkdownNote)"
51
+ ],
52
+ "bypassed": [],
53
+ "muted": [],
54
+ "defaulted_widgets": [
55
+ {
56
+ "node": "92",
57
+ "class_type": "SaveVideo",
58
+ "widgets": [
59
+ "codec"
60
+ ]
61
+ },
62
+ {
63
+ "node": "140:130",
64
+ "class_type": "CreateVideo",
65
+ "widgets": [
66
+ "color_space"
67
+ ]
68
+ }
69
+ ],
70
+ "named_crosschecks": 46,
71
+ "warnings": []
72
+ },
73
+ "validation_errors": [],
74
+ "validation_warnings": [],
75
+ "validation_note": "all remaining errors are model files absent from the object_info used"
76
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.api.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "13": {
3
+ "inputs": {
4
+ "aspect_ratio": "1:1 (Square)",
5
+ "megapixels": 1,
6
+ "multiple": 8
7
+ },
8
+ "class_type": "ResolutionSelector",
9
+ "_meta": {
10
+ "title": "ResolutionSelector"
11
+ }
12
+ },
13
+ "459:451": {
14
+ "inputs": {
15
+ "unet_name": "qwen_image_2.1_bf16.safetensors",
16
+ "weight_dtype": "default"
17
+ },
18
+ "class_type": "UNETLoader",
19
+ "_meta": {
20
+ "title": "UNETLoader"
21
+ }
22
+ },
23
+ "459:452": {
24
+ "inputs": {
25
+ "prompt": "Greyscale fashion editorial portrait of an avant-garde woman tilted upwards in profile, captured with striking high-contrast chiaroscuro lighting. She wears oversized, thick-rimmed circular black sunglasses with matte dark lenses, concealing her upward gaze. Her attire merges high couture with tactical abstraction: a high-necked structural dress tailored from heavyweight fabric featuring a disrupted optical camouflage pattern—interlocking oversized polka dots, pixelated stippling, and organic contour blotches in stark monochrome that mimic military disruptive patterns in a refined runway style. Around her shoulders, asymmetric pleated webbing and tailored cargo straps are integrated seamlessly into the garment’s architecture. In her gloved hand, she clutches a structured matte-leather geometric handbag accented with subtle tactical buckles, utility stitching, and dark brushed-metal hardware. Her skin texture is rendered with hyper-detailed clarity, sculpted by intense, razor-sharp studio key light and deep graphite shadows. The striking background is a vivid mixed-media graphic collage, composed of flat vibrant lime green planes, stark black and white overlapping circles, segmented semi-circles with bold zebra striping, dense micro-halftone dot matrices, and vector topographic contour lines. The clash between monochromatic disruptive camo elements on her clothing and the saturated, retro-futuristic pop-art backdrop creates an intense visual dissonance, emphasizing sharp silhouettes, paper cut-out edges, dynamic compositional balance, and clean graphic novel textures. Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.",
26
+ "negative_prompt": "",
27
+ "resolution": 1024,
28
+ "clip": [
29
+ "459:453",
30
+ 0
31
+ ]
32
+ },
33
+ "class_type": "TextEncodeQwenImage21",
34
+ "_meta": {
35
+ "title": "TextEncodeQwenImage21"
36
+ }
37
+ },
38
+ "459:453": {
39
+ "inputs": {
40
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
41
+ "type": "qwen_image",
42
+ "device": "default"
43
+ },
44
+ "class_type": "CLIPLoader",
45
+ "_meta": {
46
+ "title": "CLIPLoader"
47
+ }
48
+ },
49
+ "459:454": {
50
+ "inputs": {
51
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
52
+ },
53
+ "class_type": "VAELoader",
54
+ "_meta": {
55
+ "title": "VAELoader"
56
+ }
57
+ },
58
+ "459:456": {
59
+ "inputs": {
60
+ "width": [
61
+ "13",
62
+ 0
63
+ ],
64
+ "height": [
65
+ "13",
66
+ 1
67
+ ],
68
+ "batch_size": 1
69
+ },
70
+ "class_type": "EmptyLatentImage",
71
+ "_meta": {
72
+ "title": "EmptyLatentImage"
73
+ }
74
+ },
75
+ "459:457": {
76
+ "inputs": {
77
+ "samples": [
78
+ "459:458",
79
+ 0
80
+ ],
81
+ "vae": [
82
+ "459:454",
83
+ 0
84
+ ]
85
+ },
86
+ "class_type": "VAEDecode",
87
+ "_meta": {
88
+ "title": "VAEDecode"
89
+ }
90
+ },
91
+ "459:458": {
92
+ "inputs": {
93
+ "seed": 593103825222985,
94
+ "steps": 25,
95
+ "cfg": 1,
96
+ "sampler_name": "euler",
97
+ "scheduler": "simple",
98
+ "denoise": 1,
99
+ "model": [
100
+ "459:451",
101
+ 0
102
+ ],
103
+ "positive": [
104
+ "459:452",
105
+ 0
106
+ ],
107
+ "negative": [
108
+ "459:452",
109
+ 1
110
+ ],
111
+ "latent_image": [
112
+ "459:456",
113
+ 0
114
+ ]
115
+ },
116
+ "class_type": "KSampler",
117
+ "_meta": {
118
+ "title": "KSampler"
119
+ }
120
+ },
121
+ "461": {
122
+ "inputs": {
123
+ "filename_prefix": "Qwen_image_2.1",
124
+ "format": "png",
125
+ "format.bit_depth": "8-bit",
126
+ "format.input_color_space": "sRGB",
127
+ "images": [
128
+ "459:457",
129
+ 0
130
+ ]
131
+ },
132
+ "class_type": "SaveImageAdvanced",
133
+ "_meta": {
134
+ "title": "SaveImageAdvanced"
135
+ }
136
+ }
137
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_bf16-dit_int8-encoder.provenance.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
4
+ "source_sha256": "d33a6b36d530756e26ef4e25beb17d950daaea09d295475cd65f97f5d0af3b41",
5
+ "source_origin": "same template",
6
+ "transforms": [
7
+ {
8
+ "op": "set",
9
+ "node": "459:451",
10
+ "input": "unet_name",
11
+ "value": "qwen_image_2.1_bf16.safetensors",
12
+ "why": "the round brief's quality reference: Comfy-Org's bf16 DiT (14,230,280,616 B) in place of the int8_convrot one (7,256,783,064 B) — the docs page's 'needs more memory' alternative. One widget on one loader; every link is unchanged."
13
+ }
14
+ ],
15
+ "object_info": {
16
+ "source": "file",
17
+ "path": "<build-host>/object_info_v0.37.0.json",
18
+ "sha256": "d9f108e8103634b8afaef5c21a61fa22ea39cc0891a8ea81d0330a33daad6e8e",
19
+ "origin": null
20
+ },
21
+ "prompt_sha256": "6933e7296d6588623b7709f622395bfef1f2e0a121729c6c18dc5d74757c1743",
22
+ "nodes": 9,
23
+ "converter_report": {
24
+ "emitted": [
25
+ "13",
26
+ "459:451",
27
+ "459:452",
28
+ "459:453",
29
+ "459:454",
30
+ "459:456",
31
+ "459:457",
32
+ "459:458",
33
+ "461"
34
+ ],
35
+ "dropped_frontend_only": [
36
+ "463 (MarkdownNote)",
37
+ "468 (MarkdownNote)"
38
+ ],
39
+ "bypassed": [],
40
+ "muted": [],
41
+ "defaulted_widgets": [],
42
+ "named_crosschecks": 37,
43
+ "warnings": []
44
+ },
45
+ "validation_errors": [
46
+ "node 459:451 (UNETLoader): unet_name='qwen_image_2.1_bf16.safetensors' is not one of the available values []",
47
+ "node 459:453 (CLIPLoader): clip_name='qwen3vl_8b_int8_convrot.safetensors' is not one of the available values []",
48
+ "node 459:454 (VAELoader): vae_name='qwen_image_2.1_vae_bf16.safetensors' is not one of the available values ['pixel_space']"
49
+ ],
50
+ "validation_warnings": [],
51
+ "validation_note": "all remaining errors are model files absent from the object_info used"
52
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.api.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "13": {
3
+ "inputs": {
4
+ "aspect_ratio": "1:1 (Square)",
5
+ "megapixels": 1,
6
+ "multiple": 8
7
+ },
8
+ "class_type": "ResolutionSelector",
9
+ "_meta": {
10
+ "title": "ResolutionSelector"
11
+ }
12
+ },
13
+ "459:451": {
14
+ "inputs": {
15
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
16
+ "weight_dtype": "default"
17
+ },
18
+ "class_type": "UNETLoader",
19
+ "_meta": {
20
+ "title": "UNETLoader"
21
+ }
22
+ },
23
+ "459:452": {
24
+ "inputs": {
25
+ "prompt": "Greyscale fashion editorial portrait of an avant-garde woman tilted upwards in profile, captured with striking high-contrast chiaroscuro lighting. She wears oversized, thick-rimmed circular black sunglasses with matte dark lenses, concealing her upward gaze. Her attire merges high couture with tactical abstraction: a high-necked structural dress tailored from heavyweight fabric featuring a disrupted optical camouflage pattern—interlocking oversized polka dots, pixelated stippling, and organic contour blotches in stark monochrome that mimic military disruptive patterns in a refined runway style. Around her shoulders, asymmetric pleated webbing and tailored cargo straps are integrated seamlessly into the garment’s architecture. In her gloved hand, she clutches a structured matte-leather geometric handbag accented with subtle tactical buckles, utility stitching, and dark brushed-metal hardware. Her skin texture is rendered with hyper-detailed clarity, sculpted by intense, razor-sharp studio key light and deep graphite shadows. The striking background is a vivid mixed-media graphic collage, composed of flat vibrant lime green planes, stark black and white overlapping circles, segmented semi-circles with bold zebra striping, dense micro-halftone dot matrices, and vector topographic contour lines. The clash between monochromatic disruptive camo elements on her clothing and the saturated, retro-futuristic pop-art backdrop creates an intense visual dissonance, emphasizing sharp silhouettes, paper cut-out edges, dynamic compositional balance, and clean graphic novel textures. Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.",
26
+ "negative_prompt": "",
27
+ "resolution": 1024,
28
+ "clip": [
29
+ "459:453",
30
+ 0
31
+ ]
32
+ },
33
+ "class_type": "TextEncodeQwenImage21",
34
+ "_meta": {
35
+ "title": "TextEncodeQwenImage21"
36
+ }
37
+ },
38
+ "459:453": {
39
+ "inputs": {
40
+ "clip_name": "qwen3vl_8b_w4a8.safetensors",
41
+ "type": "qwen_image",
42
+ "device": "default"
43
+ },
44
+ "class_type": "CLIPLoader",
45
+ "_meta": {
46
+ "title": "CLIPLoader"
47
+ }
48
+ },
49
+ "459:454": {
50
+ "inputs": {
51
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
52
+ },
53
+ "class_type": "VAELoader",
54
+ "_meta": {
55
+ "title": "VAELoader"
56
+ }
57
+ },
58
+ "459:456": {
59
+ "inputs": {
60
+ "width": [
61
+ "13",
62
+ 0
63
+ ],
64
+ "height": [
65
+ "13",
66
+ 1
67
+ ],
68
+ "batch_size": 1
69
+ },
70
+ "class_type": "EmptyLatentImage",
71
+ "_meta": {
72
+ "title": "EmptyLatentImage"
73
+ }
74
+ },
75
+ "459:457": {
76
+ "inputs": {
77
+ "samples": [
78
+ "459:458",
79
+ 0
80
+ ],
81
+ "vae": [
82
+ "459:454",
83
+ 0
84
+ ]
85
+ },
86
+ "class_type": "VAEDecode",
87
+ "_meta": {
88
+ "title": "VAEDecode"
89
+ }
90
+ },
91
+ "459:458": {
92
+ "inputs": {
93
+ "seed": 593103825222985,
94
+ "steps": 25,
95
+ "cfg": 1,
96
+ "sampler_name": "euler",
97
+ "scheduler": "simple",
98
+ "denoise": 1,
99
+ "model": [
100
+ "459:451",
101
+ 0
102
+ ],
103
+ "positive": [
104
+ "459:452",
105
+ 0
106
+ ],
107
+ "negative": [
108
+ "459:452",
109
+ 1
110
+ ],
111
+ "latent_image": [
112
+ "459:456",
113
+ 0
114
+ ]
115
+ },
116
+ "class_type": "KSampler",
117
+ "_meta": {
118
+ "title": "KSampler"
119
+ }
120
+ },
121
+ "461": {
122
+ "inputs": {
123
+ "filename_prefix": "Qwen_image_2.1",
124
+ "format": "png",
125
+ "format.bit_depth": "8-bit",
126
+ "format.input_color_space": "sRGB",
127
+ "images": [
128
+ "459:457",
129
+ 0
130
+ ]
131
+ },
132
+ "class_type": "SaveImageAdvanced",
133
+ "_meta": {
134
+ "title": "SaveImageAdvanced"
135
+ }
136
+ }
137
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-dit_w4a8-encoder.provenance.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
4
+ "source_sha256": "d33a6b36d530756e26ef4e25beb17d950daaea09d295475cd65f97f5d0af3b41",
5
+ "source_origin": "same template",
6
+ "transforms": [
7
+ {
8
+ "op": "set",
9
+ "node": "459:453",
10
+ "input": "clip_name",
11
+ "value": "qwen3vl_8b_w4a8.safetensors",
12
+ "why": "the round brief's co-residence alternative: Comfy-Org's own w4a8 encoder (6,312,105,364 B, same repo and revision as the template's files) in place of the int8_convrot one (9,350,798,360 B). One widget on one loader; every link is unchanged."
13
+ }
14
+ ],
15
+ "object_info": {
16
+ "source": "file",
17
+ "path": "<build-host>/object_info_v0.37.0.json",
18
+ "sha256": "d9f108e8103634b8afaef5c21a61fa22ea39cc0891a8ea81d0330a33daad6e8e",
19
+ "origin": null
20
+ },
21
+ "prompt_sha256": "f75e479511ed874c530b1cea86b693f9bbf17ae176ccbaf84d5c5b79e44211d4",
22
+ "nodes": 9,
23
+ "converter_report": {
24
+ "emitted": [
25
+ "13",
26
+ "459:451",
27
+ "459:452",
28
+ "459:453",
29
+ "459:454",
30
+ "459:456",
31
+ "459:457",
32
+ "459:458",
33
+ "461"
34
+ ],
35
+ "dropped_frontend_only": [
36
+ "463 (MarkdownNote)",
37
+ "468 (MarkdownNote)"
38
+ ],
39
+ "bypassed": [],
40
+ "muted": [],
41
+ "defaulted_widgets": [],
42
+ "named_crosschecks": 37,
43
+ "warnings": []
44
+ },
45
+ "validation_errors": [
46
+ "node 459:451 (UNETLoader): unet_name='qwen_image_2.1_int8_convrot.safetensors' is not one of the available values []",
47
+ "node 459:453 (CLIPLoader): clip_name='qwen3vl_8b_w4a8.safetensors' is not one of the available values []",
48
+ "node 459:454 (VAELoader): vae_name='qwen_image_2.1_vae_bf16.safetensors' is not one of the available values ['pixel_space']"
49
+ ],
50
+ "validation_warnings": [],
51
+ "validation_note": "all remaining errors are model files absent from the object_info used"
52
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-template.api.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "13": {
3
+ "inputs": {
4
+ "aspect_ratio": "1:1 (Square)",
5
+ "megapixels": 1,
6
+ "multiple": 8
7
+ },
8
+ "class_type": "ResolutionSelector",
9
+ "_meta": {
10
+ "title": "ResolutionSelector"
11
+ }
12
+ },
13
+ "459:451": {
14
+ "inputs": {
15
+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",
16
+ "weight_dtype": "default"
17
+ },
18
+ "class_type": "UNETLoader",
19
+ "_meta": {
20
+ "title": "UNETLoader"
21
+ }
22
+ },
23
+ "459:452": {
24
+ "inputs": {
25
+ "prompt": "Greyscale fashion editorial portrait of an avant-garde woman tilted upwards in profile, captured with striking high-contrast chiaroscuro lighting. She wears oversized, thick-rimmed circular black sunglasses with matte dark lenses, concealing her upward gaze. Her attire merges high couture with tactical abstraction: a high-necked structural dress tailored from heavyweight fabric featuring a disrupted optical camouflage pattern—interlocking oversized polka dots, pixelated stippling, and organic contour blotches in stark monochrome that mimic military disruptive patterns in a refined runway style. Around her shoulders, asymmetric pleated webbing and tailored cargo straps are integrated seamlessly into the garment’s architecture. In her gloved hand, she clutches a structured matte-leather geometric handbag accented with subtle tactical buckles, utility stitching, and dark brushed-metal hardware. Her skin texture is rendered with hyper-detailed clarity, sculpted by intense, razor-sharp studio key light and deep graphite shadows. The striking background is a vivid mixed-media graphic collage, composed of flat vibrant lime green planes, stark black and white overlapping circles, segmented semi-circles with bold zebra striping, dense micro-halftone dot matrices, and vector topographic contour lines. The clash between monochromatic disruptive camo elements on her clothing and the saturated, retro-futuristic pop-art backdrop creates an intense visual dissonance, emphasizing sharp silhouettes, paper cut-out edges, dynamic compositional balance, and clean graphic novel textures. Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.",
26
+ "negative_prompt": "",
27
+ "resolution": 1024,
28
+ "clip": [
29
+ "459:453",
30
+ 0
31
+ ]
32
+ },
33
+ "class_type": "TextEncodeQwenImage21",
34
+ "_meta": {
35
+ "title": "TextEncodeQwenImage21"
36
+ }
37
+ },
38
+ "459:453": {
39
+ "inputs": {
40
+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",
41
+ "type": "qwen_image",
42
+ "device": "default"
43
+ },
44
+ "class_type": "CLIPLoader",
45
+ "_meta": {
46
+ "title": "CLIPLoader"
47
+ }
48
+ },
49
+ "459:454": {
50
+ "inputs": {
51
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
52
+ },
53
+ "class_type": "VAELoader",
54
+ "_meta": {
55
+ "title": "VAELoader"
56
+ }
57
+ },
58
+ "459:456": {
59
+ "inputs": {
60
+ "width": [
61
+ "13",
62
+ 0
63
+ ],
64
+ "height": [
65
+ "13",
66
+ 1
67
+ ],
68
+ "batch_size": 1
69
+ },
70
+ "class_type": "EmptyLatentImage",
71
+ "_meta": {
72
+ "title": "EmptyLatentImage"
73
+ }
74
+ },
75
+ "459:457": {
76
+ "inputs": {
77
+ "samples": [
78
+ "459:458",
79
+ 0
80
+ ],
81
+ "vae": [
82
+ "459:454",
83
+ 0
84
+ ]
85
+ },
86
+ "class_type": "VAEDecode",
87
+ "_meta": {
88
+ "title": "VAEDecode"
89
+ }
90
+ },
91
+ "459:458": {
92
+ "inputs": {
93
+ "seed": 593103825222985,
94
+ "steps": 25,
95
+ "cfg": 1,
96
+ "sampler_name": "euler",
97
+ "scheduler": "simple",
98
+ "denoise": 1,
99
+ "model": [
100
+ "459:451",
101
+ 0
102
+ ],
103
+ "positive": [
104
+ "459:452",
105
+ 0
106
+ ],
107
+ "negative": [
108
+ "459:452",
109
+ 1
110
+ ],
111
+ "latent_image": [
112
+ "459:456",
113
+ 0
114
+ ]
115
+ },
116
+ "class_type": "KSampler",
117
+ "_meta": {
118
+ "title": "KSampler"
119
+ }
120
+ },
121
+ "461": {
122
+ "inputs": {
123
+ "filename_prefix": "Qwen_image_2.1",
124
+ "format": "png",
125
+ "format.bit_depth": "8-bit",
126
+ "format.input_color_space": "sRGB",
127
+ "images": [
128
+ "459:457",
129
+ 0
130
+ ]
131
+ },
132
+ "class_type": "SaveImageAdvanced",
133
+ "_meta": {
134
+ "title": "SaveImageAdvanced"
135
+ }
136
+ }
137
+ }
sessions/2026-09-21_qwen-image-2-1_rtx-5060-ti/raw/harness/workflows/qwen-image-2-1_t2i_int8-template.provenance.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "harness_version": "1.0.0",
3
+ "source": "workflows/sources/image_qwen_image_2_1_t2i.json",
4
+ "source_sha256": "d33a6b36d530756e26ef4e25beb17d950daaea09d295475cd65f97f5d0af3b41",
5
+ "source_origin": "Comfy-Org/workflow_templates templates/image_qwen_image_2_1_t2i.json @ 371a7b7171bbd11e9cc92ef615ba5ad223d7e5b4 (2026-09-20T12:56Z, 'Switch Qwen Image 2.1 CLIP to int8 convrot (0.11.66)'); the 'Qwen Image 2.1: Text to Image' template ComfyUI ships and the docs page tells readers to load. sha256 d33a6b36d530756e26ef4e25beb17d950daaea09d295475cd65f97f5d0af3b41",
6
+ "transforms": [],
7
+ "object_info": {
8
+ "source": "file",
9
+ "path": "<build-host>/object_info_v0.37.0.json",
10
+ "sha256": "d9f108e8103634b8afaef5c21a61fa22ea39cc0891a8ea81d0330a33daad6e8e",
11
+ "origin": null
12
+ },
13
+ "prompt_sha256": "86dc736491d1ba526543ba65e305c81df8eaa72cb9305670ec9ae408e18e5cfc",
14
+ "nodes": 9,
15
+ "converter_report": {
16
+ "emitted": [
17
+ "13",
18
+ "459:451",
19
+ "459:452",
20
+ "459:453",
21
+ "459:454",
22
+ "459:456",
23
+ "459:457",
24
+ "459:458",
25
+ "461"
26
+ ],
27
+ "dropped_frontend_only": [
28
+ "463 (MarkdownNote)",
29
+ "468 (MarkdownNote)"
30
+ ],
31
+ "bypassed": [],
32
+ "muted": [],
33
+ "defaulted_widgets": [],
34
+ "named_crosschecks": 37,
35
+ "warnings": []
36
+ },
37
+ "validation_errors": [
38
+ "node 459:451 (UNETLoader): unet_name='qwen_image_2.1_int8_convrot.safetensors' is not one of the available values []",
39
+ "node 459:453 (CLIPLoader): clip_name='qwen3vl_8b_int8_convrot.safetensors' is not one of the available values []",
40
+ "node 459:454 (VAELoader): vae_name='qwen_image_2.1_vae_bf16.safetensors' is not one of the available values ['pixel_space']"
41
+ ],
42
+ "validation_warnings": [],
43
+ "validation_note": "all remaining errors are model files absent from the object_info used"
44
+ }