Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit e05949c

Browse files
committed
fix flux adapter guidance scale
Signed-off-by: linnan wang <linnanw@nvidia.com>
1 parent da57c5c commit e05949c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • dfm/src/automodel/flow_matching/adapters

dfm/src/automodel/flow_matching/adapters/flux.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def prepare_inputs(self, context: FlowMatchingContext) -> Dict[str, Any]:
174174
# The pipeline provides timesteps in [0, num_train_timesteps]
175175
timesteps = context.timesteps.to(dtype) / 1000.0
176176

177-
guidance = torch.full((batch_size,), 3.5, device=device, dtype=torch.float32)
177+
# TODO: guidance scale is different across pretraining and finetuning, we need pass it as a hyperparamters.
178+
# needs verify by Pranav
179+
guidance = torch.full((batch_size,), self.guidance_scale, device=device, dtype=torch.float32)
178180

179181
inputs = {
180182
"hidden_states": packed_latents,

0 commit comments

Comments
 (0)