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
64948a2e
Commit
64948a2e
authored
Aug 08, 2025
by
wangshankun
Browse files
dist group统一从runner入口
parent
826e9b03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lightx2v/models/networks/wan/infer/dist_infer/transformer_infer.py
...models/networks/wan/infer/dist_infer/transformer_infer.py
+2
-2
lightx2v/models/networks/wan/model.py
lightx2v/models/networks/wan/model.py
+7
-2
No files found.
lightx2v/models/networks/wan/infer/dist_infer/transformer_infer.py
View file @
64948a2e
...
...
@@ -7,9 +7,9 @@ from lightx2v.models.networks.wan.infer.utils import pad_freqs
class
WanTransformerDistInfer
(
WanTransformerInfer
):
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
,
seq_p_group
=
None
):
super
().
__init__
(
config
)
self
.
seq_p_group
=
se
lf
.
config
[
"device_mesh"
].
get_group
(
mesh_dim
=
"seq_p"
)
self
.
seq_p_group
=
se
q_p_group
def
infer
(
self
,
weights
,
grid_sizes
,
embed
,
x
,
embed0
,
seq_lens
,
freqs
,
context
,
audio_dit_blocks
=
None
):
x
,
embed0
=
self
.
dist_pre_process
(
x
,
embed0
)
...
...
lightx2v/models/networks/wan/model.py
View file @
64948a2e
...
...
@@ -83,7 +83,7 @@ class WanModel:
def
_init_infer_class
(
self
):
self
.
pre_infer_class
=
WanPreInfer
self
.
post_infer_class
=
WanPostInfer
if
self
.
config
[
"seq_parallel"
]
:
if
self
.
seq_p_group
is
not
None
:
self
.
transformer_infer_class
=
WanTransformerDistInfer
else
:
if
self
.
config
[
"feature_caching"
]
==
"NoCaching"
:
...
...
@@ -255,7 +255,12 @@ class WanModel:
def
_init_infer
(
self
):
self
.
pre_infer
=
self
.
pre_infer_class
(
self
.
config
)
self
.
post_infer
=
self
.
post_infer_class
(
self
.
config
)
self
.
transformer_infer
=
self
.
transformer_infer_class
(
self
.
config
)
if
self
.
seq_p_group
is
not
None
:
self
.
transformer_infer
=
self
.
transformer_infer_class
(
self
.
config
,
self
.
seq_p_group
)
else
:
self
.
transformer_infer
=
self
.
transformer_infer_class
(
self
.
config
)
if
self
.
config
[
"cfg_parallel"
]:
self
.
infer_func
=
self
.
infer_with_cfg_parallel
else
:
...
...
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