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
53787c69
Commit
53787c69
authored
Aug 18, 2025
by
helloyongyang
Browse files
fix parallel compile
parent
067a2b61
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
3 deletions
+1
-3
lightx2v/models/networks/wan/infer/post_infer.py
lightx2v/models/networks/wan/infer/post_infer.py
+0
-1
lightx2v/models/networks/wan/infer/pre_infer.py
lightx2v/models/networks/wan/infer/pre_infer.py
+0
-1
lightx2v/models/networks/wan/infer/transformer_infer.py
lightx2v/models/networks/wan/infer/transformer_infer.py
+0
-1
lightx2v/models/networks/wan/model.py
lightx2v/models/networks/wan/model.py
+1
-0
No files found.
lightx2v/models/networks/wan/infer/post_infer.py
View file @
53787c69
...
...
@@ -14,7 +14,6 @@ class WanPostInfer:
def
set_scheduler
(
self
,
scheduler
):
self
.
scheduler
=
scheduler
@
torch
.
compile
(
disable
=
not
CHECK_ENABLE_GRAPH_MODE
())
def
infer
(
self
,
x
,
pre_infer_out
):
x
=
self
.
unpatchify
(
x
,
pre_infer_out
.
grid_sizes
)
...
...
lightx2v/models/networks/wan/infer/pre_infer.py
View file @
53787c69
...
...
@@ -32,7 +32,6 @@ class WanPreInfer:
def
set_scheduler
(
self
,
scheduler
):
self
.
scheduler
=
scheduler
@
torch
.
compile
(
disable
=
not
CHECK_ENABLE_GRAPH_MODE
())
def
infer
(
self
,
weights
,
inputs
,
kv_start
=
0
,
kv_end
=
0
):
x
=
self
.
scheduler
.
latents
...
...
lightx2v/models/networks/wan/infer/transformer_infer.py
View file @
53787c69
...
...
@@ -97,7 +97,6 @@ class WanTransformerInfer(BaseTransformerInfer):
freqs_i
=
compute_freqs
(
q
.
size
(
2
)
//
2
,
grid_sizes
,
freqs
)
return
freqs_i
@
torch
.
compile
(
disable
=
not
CHECK_ENABLE_GRAPH_MODE
())
def
infer
(
self
,
weights
,
pre_infer_out
):
x
=
self
.
infer_main_blocks
(
weights
,
pre_infer_out
)
return
self
.
infer_post_blocks
(
weights
,
x
,
pre_infer_out
.
embed
)
...
...
lightx2v/models/networks/wan/model.py
View file @
53787c69
...
...
@@ -354,6 +354,7 @@ class WanModel:
self
.
pre_weight
.
to_cpu
()
self
.
transformer_weights
.
post_weights_to_cpu
()
@
torch
.
compile
(
disable
=
not
CHECK_ENABLE_GRAPH_MODE
())
@
torch
.
no_grad
()
def
_infer_cond_uncond
(
self
,
inputs
,
infer_condition
=
True
):
self
.
scheduler
.
infer_condition
=
infer_condition
...
...
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