Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xuwx1
LightX2V
Commits
3c464853
Unverified
Commit
3c464853
authored
Sep 29, 2025
by
gushiqiao
Committed by
GitHub
Sep 29, 2025
Browse files
update scheduler (#345)
parent
131c8a46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
lightx2v/models/schedulers/wan/step_distill/scheduler.py
lightx2v/models/schedulers/wan/step_distill/scheduler.py
+5
-14
No files found.
lightx2v/models/schedulers/wan/step_distill/scheduler.py
100644 → 100755
View file @
3c464853
...
...
@@ -75,19 +75,10 @@ class Wan22StepDistillScheduler(WanStepDistillScheduler):
def
step_post
(
self
):
flow_pred
=
self
.
noise_pred
.
to
(
torch
.
float32
)
sigma
=
self
.
sigmas
[
self
.
step_index
].
item
()
noisy_image_or_video
=
self
.
latents
.
to
(
torch
.
float32
)
-
flow_pred
*
sigma
# self.latent: x_t
if
self
.
step_index
<
self
.
boundary_step_index
:
# noisy_image_or_video: x_500
alpha
,
beta
=
self
.
calculate_alpha_beta_high
(
sigma
)
noisy_image_or_video
=
(
self
.
latents
.
to
(
torch
.
float32
)
-
beta
*
(
1
-
self
.
sigma_bound
)
*
flow_pred
)
/
(
alpha
+
beta
)
if
self
.
step_index
<
self
.
boundary_step_index
-
1
:
sigma_n
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
()
alpha_n
,
beta_n
=
self
.
calculate_alpha_beta_high
(
sigma_n
)
noisy_image_or_video
=
(
alpha_n
+
beta_n
)
*
noisy_image_or_video
+
(
1
-
self
.
sigma_bound
)
*
beta_n
*
flow_pred
else
:
# noisy_image_or_video: x_0
noisy_image_or_video
=
self
.
latents
.
to
(
torch
.
float32
)
-
flow_pred
*
sigma
if
self
.
step_index
<
self
.
infer_steps
-
1
:
sigma_n
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
()
noisy_image_or_video
=
noisy_image_or_video
+
flow_pred
*
sigma_n
if
self
.
step_index
<
self
.
infer_steps
-
1
:
sigma_n
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
()
noisy_image_or_video
=
noisy_image_or_video
+
flow_pred
*
sigma_n
self
.
latents
=
noisy_image_or_video
.
to
(
self
.
latents
.
dtype
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment