Skip to content

feat(rollout): forward --sglang-text-encoder-precisions to the engine - #113

Draft
Rockdu wants to merge 2 commits into
radixark:mainfrom
Rockdu:feat/sd3-true-onpolicy
Draft

feat(rollout): forward --sglang-text-encoder-precisions to the engine#113
Rockdu wants to merge 2 commits into
radixark:mainfrom
Rockdu:feat/sd3-true-onpolicy

Conversation

@Rockdu

@Rockdu Rockdu commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What

Forward --sglang-text-encoder-precisions from miles to the rollout engine.

Why

text_encoder_precisions is a PipelineConfig field, so miles' auto-prefix already exposes --sglang-text-encoder-precisions on the CLI, but _compute_server_args only forwards dit_precision / vae_precision explicitly. Passing the flag today is silently dropped and the engine keeps its per-pipeline defaults. This bites whenever the DiT precision is moved off the pipeline default: SD3 ships ("fp16", "fp16", "fp32") text encoders, so an fp32 DiT run dies in the engine with mat1 and mat2 must have the same dtype until the encoders follow.

set_defaults(..., None) keeps "unset" detectable, so a run that does not pass the flag forwards nothing and the engine's own defaults still win.

Files

  • miles/utils/arguments.py — default the passthrough arg to None
  • miles/backends/sglang_diffusion_utils/sglang_diffusion_engine.py — add the field to the explicit forwarding tuple

Checklist

  • pre-commit run --all-filesnot run locally
  • Added/updated tests — none; this extends an existing forwarding tuple with no new branch
  • pytest -xnot run locally
  • python3 train_diffusion.py --help parses, and an SD3 GRPO run launches with the flag set (verified on an H200 devbox)
  • CLI reference docs — n/a, no new flag
  • Example walkthrough — n/a

@Rockdu

Rockdu commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Wrong base: main does not yet contain #106, so this PR swallowed its 13 commits. Reopening against the #106 branch in the fork so the diff is just the two lines.

@Rockdu Rockdu closed this Aug 9, 2026
@Rockdu Rockdu reopened this Aug 9, 2026
@Rockdu
Rockdu force-pushed the feat/sd3-true-onpolicy branch from 34ece4f to 681ceba Compare August 9, 2026 07:51
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