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
2df62723
Commit
2df62723
authored
Jul 31, 2025
by
HamQiuZ
Browse files
fix: add cm scheduler reproduce noise generator
parent
6277a533
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lightx2v/models/schedulers/wan/step_distill/scheduler.py
lightx2v/models/schedulers/wan/step_distill/scheduler.py
+2
-1
No files found.
lightx2v/models/schedulers/wan/step_distill/scheduler.py
View file @
2df62723
...
@@ -52,5 +52,6 @@ class WanStepDistillScheduler(WanScheduler):
...
@@ -52,5 +52,6 @@ class WanStepDistillScheduler(WanScheduler):
noisy_image_or_video
=
self
.
latents
.
to
(
torch
.
float32
)
-
sigma
*
flow_pred
noisy_image_or_video
=
self
.
latents
.
to
(
torch
.
float32
)
-
sigma
*
flow_pred
if
self
.
step_index
<
self
.
infer_steps
-
1
:
if
self
.
step_index
<
self
.
infer_steps
-
1
:
sigma
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
()
sigma
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
()
noisy_image_or_video
=
self
.
add_noise
(
noisy_image_or_video
,
torch
.
randn_like
(
noisy_image_or_video
),
self
.
sigmas
[
self
.
step_index
+
1
].
item
())
noise
=
torch
.
randn
(
noisy_image_or_video
.
shape
,
dtype
=
torch
.
float32
,
device
=
self
.
device
,
generator
=
self
.
generator
)
noisy_image_or_video
=
self
.
add_noise
(
noisy_image_or_video
,
noise
=
noise
,
sigma
=
self
.
sigmas
[
self
.
step_index
+
1
].
item
())
self
.
latents
=
noisy_image_or_video
.
to
(
self
.
latents
.
dtype
)
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