From d389d6daff8284084fd1045c022d67806f92faa4 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 27 Jun 2026 10:03:06 +0200 Subject: [PATCH] Trim dead inputs: drop fp16 precision and prompt_used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fp16 offers nothing over bf16 for these models (removed from the quant dropdown; loader still tolerant if passed). prompt_used was metadata-only — removed from the node inputs, report payload/markdown, the bridge, and the example workflows. Co-Authored-By: Claude Opus 4.8 --- README.md | 2 +- agent_bridge.py | 1 - docs/AGENT_LOOP.md | 1 - docs/CALIBRATION_POLICY.md | 2 +- nodes/qwen_judge.py | 11 ++++------- workflow/workflow_api.json | 1 - workflow/workflow_describe_api.json | 3 +-- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1b304b1..8f23079 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ can act on it. | `profile` | general / oral / penetration / handjob / solo | general | **analysis profile** — act-specialized axis set; the act-critical axes are distance/proximity-aware (e.g. `mouth_genital_distance`) so magnitude isn't hidden behind a coarse label | | `generated_image` | IMAGE (optional) | — | the candidate to score (required for `compare`, ignored for `describe`) | | `model_select` | dropdown (model name) | 4B local | **which judge** (transformers/safetensors, auto-downloaded): Qwen3-VL 4B/8B/30B-A3B, **Qwen3.5-9B**, **Qwen3.6-27B/35B-A3B** (newer, natively multimodal). Param size shown in the label | -| `precision` | bf16 / fp16 / fp8 / nf4 | bf16 | **the quant** — applies to the selected model (VRAM table below) | +| `precision` | bf16 / fp8 / nf4 | bf16 | **the quant** — applies to the selected model (VRAM table below) | | `model_path` | STRING | "" (empty) | **manual override** of the dropdown — local dir, HF repo id, or alias (`8b`/`30b-a3b`/`3.5-9b`/`3.6-27b`/`3.6-35b`). Empty = use `model_select` | | `axes` | STRING | "" (empty) | **override** the profile's axis set with a custom comma/newline list; empty = use `profile` | | `max_new_tokens` | INT | 1024 | | diff --git a/agent_bridge.py b/agent_bridge.py index a2c74a0..1471b07 100644 --- a/agent_bridge.py +++ b/agent_bridge.py @@ -67,7 +67,6 @@ def _inject(graph: dict, prompt: str, negative: str, seed: int, run_tag: str, mo elif ctype == JUDGE_CLASS: inputs["mode"] = mode inputs["run_tag"] = run_tag - inputs["prompt_used"] = prompt if reference_description: inputs["reference_description"] = reference_description if profile: diff --git a/docs/AGENT_LOOP.md b/docs/AGENT_LOOP.md index a84914d..4dd4fe2 100644 --- a/docs/AGENT_LOOP.md +++ b/docs/AGENT_LOOP.md @@ -64,7 +64,6 @@ Stdout (captured by the agent) is the report: "body_orientation": {"verdict": "mismatch", "ref": "female on top, facing partner", "gen": "female on bottom"}, "clothing_state": {"verdict": "partial", "ref": "red lace lingerie", "gen": "plain bra"} }, - "prompt_used": "...", "_prompt_id": "…", "_report_path": "…/calib_iter003.json" } ``` diff --git a/docs/CALIBRATION_POLICY.md b/docs/CALIBRATION_POLICY.md index 2b1c308..fba79f9 100644 --- a/docs/CALIBRATION_POLICY.md +++ b/docs/CALIBRATION_POLICY.md @@ -163,7 +163,7 @@ iter6 overall=0.93 mism=0 ≥ target → STOP "body_orientation": {"verdict": "mismatch", "ref": "female on top, facing partner", "gen": "female on bottom"}, "scene": {"verdict": "match", "ref": "dim bedroom", "gen": "dim bedroom"} }, - "prompt_used": "...", "_prompt_id": "...", "_report_path": "..." + "_prompt_id": "...", "_report_path": "..." } ``` diff --git a/nodes/qwen_judge.py b/nodes/qwen_judge.py index 17f1df4..91f0a8b 100644 --- a/nodes/qwen_judge.py +++ b/nodes/qwen_judge.py @@ -619,7 +619,7 @@ def _report_base_dir(report_dir: str) -> str: return os.path.join(os.path.dirname(os.path.dirname(__file__)), "output", "calibrator") -def _write_report(report_dir, run_tag, overall, merged, diff_analysis, raw_all, prompt_used, +def _write_report(report_dir, run_tag, overall, merged, diff_analysis, raw_all, mismatch_count=0): """Persist the analysis so the external CLI agent can read it after a queue. @@ -638,7 +638,6 @@ def _write_report(report_dir, run_tag, overall, merged, diff_analysis, raw_all, "mismatch_count": mismatch_count, "axes": (merged or {}).get("axes", {}), "diff_analysis": diff_analysis, - "prompt_used": prompt_used, "raw": raw_all, } tag = re.sub(r"[^A-Za-z0-9._-]", "_", run_tag) if run_tag else "latest" @@ -653,7 +652,6 @@ def _write_report(report_dir, run_tag, overall, merged, diff_analysis, raw_all, try: md = (f"# Calibration analysis ({tag})\n\n" f"**overall_score:** {payload['overall_score']}\n\n" - f"**prompt_used:**\n\n{prompt_used or '(not provided)'}\n\n" f"## per-axis\n\n{diff_analysis}\n") with open(os.path.join(base, f"calib_{tag}.md"), "w", encoding="utf-8") as f: f.write(md) @@ -746,7 +744,7 @@ class QwenVLImageJudge: "model_select": ([MANUAL_CHOICE] + list(MODEL_PRESETS.keys()), {"default": list(MODEL_PRESETS.keys())[0]}), "model_path": ("STRING", {"default": ""}), # manual override (local dir / HF repo / alias) - "precision": (["bf16", "fp16", "fp8", "nf4"], {"default": "bf16"}), + "precision": (["bf16", "fp8", "nf4"], {"default": "bf16"}), "axes": ("STRING", {"default": "", "multiline": True}), "max_new_tokens": ("INT", {"default": 1024, "min": 64, "max": 4096}), "temperature": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.5, "step": 0.05}), @@ -759,7 +757,6 @@ class QwenVLImageJudge: # The agent reads the analysis from these files after each queue. "report_dir": ("STRING", {"default": ""}), "run_tag": ("STRING", {"default": ""}), - "prompt_used": ("STRING", {"default": "", "multiline": True}), # compare: canonical reference text (from describe). When set, compare # anchors on it instead of re-reading the reference image each time. "reference_description": ("STRING", {"default": "", "multiline": True}), @@ -773,7 +770,7 @@ class QwenVLImageJudge: max_new_tokens, temperature, swap_eval, profile="general", model_select=MANUAL_CHOICE, generated_image=None, keep_loaded=True, auto_download=True, - report_dir="", run_tag="", prompt_used="", reference_description="", + report_dir="", run_tag="", reference_description="", system_prompt="", user_prompt="Describe this image."): # `axes` overrides the profile when provided; otherwise use the profile's axis set. axis_list = [a.strip() for a in re.split(r"[,\n]", axes) if a.strip()] @@ -866,7 +863,7 @@ class QwenVLImageJudge: diff_analysis = header + "\n" + "\n".join(diff_lines) if diff_lines else "(no parseable judgement)" report_path = _write_report( - report_dir, run_tag, overall, merged, diff_analysis, raw_all, prompt_used, mismatch_count) + report_dir, run_tag, overall, merged, diff_analysis, raw_all, mismatch_count) return (round(overall, 4), axis_scores, diff_analysis, raw_all, report_path) diff --git a/workflow/workflow_api.json b/workflow/workflow_api.json index 206dc4d..089e70a 100644 --- a/workflow/workflow_api.json +++ b/workflow/workflow_api.json @@ -76,7 +76,6 @@ "auto_download": true, "report_dir": "/media/p5/Comfyui/output/calibrator", "run_tag": "", - "prompt_used": "", "reference_description": "" }, "_meta": { "title": "Qwen3-VL Image Judge (Calibrator)" } diff --git a/workflow/workflow_describe_api.json b/workflow/workflow_describe_api.json index 06a51e8..d59fb3f 100644 --- a/workflow/workflow_describe_api.json +++ b/workflow/workflow_describe_api.json @@ -19,8 +19,7 @@ "keep_loaded": true, "auto_download": true, "report_dir": "/media/p5/Comfyui/output/calibrator", - "run_tag": "seed", - "prompt_used": "" + "run_tag": "seed" }, "_meta": { "title": "Qwen3-VL Describe (first pass)" } }