Skip to content

fix(wan rollout)(5/n): drop the FlowGRPO negative-prompt fallback, use the engine default - #172

Merged
Rockdu merged 2 commits into
fix/colocate-reward-bound-placementfrom
fix/rollout-negative-prompt-engine-default
Aug 16, 2026
Merged

Rockdu merged 2 commits into
fix/colocate-reward-bound-placementfrom
fix/rollout-negative-prompt-engine-default

Conversation

@Rockdu

@Rockdu Rockdu commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Stack position: 5/n, on top of #170 (4/n).

What

  • build_rollout_generate_payload no longer forces negative_prompt = " " whenever CFG is on,
    and build_rollout_sampling_params omits the key entirely when --diffusion-negative-prompt
    is unset. The engine then applies its own per-model default (rollout_api.py strips absent
    fields; for wan2.2 the default is the official 137-char Chinese negative prompt from
    wan/configs/shared_config.py).
  • The SD3 recipes pass --diffusion-negative-prompt ' ' explicitly to keep their FlowGRPO
    alignment byte-for-byte.

Why

The " " fallback is an SD3/FlowGRPO convention that was silently imposed on every model family.
Model-specific defaults belong to the engine; miles should transmit what the user set and nothing
else. Measured on wan2.2 true inference (same prompt/seed/steps): the official negative prompt cuts
whole-video entropy ~20% and visibly cleans the first frame vs " ".

Parity-safe: the trainer recomputes from the engine-returned cond_kwargs, so both sides always see
the same negative embedding. Verified in production — model_output_mean_abs_diff = 0.0 sustained
after the switch (run wan22_16gpu_480p5f_ns16_n07_shift5).

Landing note

scripts/run_diffusion_grpo_cosmos3_pickscore_t2i_4gpu.py landed on main after this stack's base
and also relies on the fallback (CFG on, no explicit negative prompt). It needs the same one-line
--diffusion-negative-prompt ' ' when this stack merges; it does not exist on this branch.

Files

  • miles/rollout/sglang_diffusion_rollout.py — drop the fallback; omit the key when unset
  • scripts/run_diffusion_grpo_sd3_ocr_sglang.py, scripts/run_diffusion_grpo_pickscore_5gpu_flowgrpo_aligned.py
    — explicit ' ' to preserve behavior
  • tests/fast/rollout/test_rollout_negative_prompt.py — unset ⇒ key absent; explicit ⇒ verbatim

Checklist

  • Added/updated tests (test_rollout_negative_prompt.py, 2 passed, registered stage-a-cpu)
  • isort/black --check clean against the repo config
  • pre-commit run --all-files — not run locally (formatters verified individually)
  • No new launch flags (--diffusion-negative-prompt already exists; its unset semantics change
    from " " to engine default — that is the fix)

@Rockdu
Rockdu marked this pull request as ready for review August 16, 2026 05:45
@Rockdu Rockdu changed the title fix(rollout)(5/n): drop the FlowGRPO negative-prompt fallback, use the engine default fix(wan rollout)(5/n): drop the FlowGRPO negative-prompt fallback, use the engine default Aug 16, 2026
@Rockdu
Rockdu merged commit 43f65ec into main Aug 16, 2026
17 checks passed
niehen6174 added a commit to niehen6174/miles_diffusion that referenced this pull request Aug 18, 2026
…neg-prompt fallback

Hand-built Namespaces in CI lack train_pipeline_config_path; getattr keeps the H3 hook from crashing. Unset negative_prompt stays omitted so main's radixark#172 contract still holds.
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
…e the engine default (radixark#172)

* fix(rollout): drop the FlowGRPO negative-prompt fallback, let the engine default apply

* style: single-line the miles import for isort profile=black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant