1、Implement cfg_trunc calculation directly using timesteps, without intermediate steps.

2、Deprecate and remove the guidance_scale parameter because it used in inference not train

3、Add inference command-line arguments --ct for cfg_trunc_ratio and --rc for renorm_cfg to control CFG truncation and renormalization during inference.
This commit is contained in:
sdbds
2025-02-24 14:10:24 +08:00
parent 653621de57
commit fc772affbe
4 changed files with 33 additions and 26 deletions

View File

@@ -1081,7 +1081,7 @@ class NextDiT(nn.Module):
cap_feats: Tensor,
cap_mask: Tensor,
cfg_scale: float,
cfg_trunc: int = 100,
cfg_trunc: float = 0.25,
renorm_cfg: float = 1.0,
):
"""