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
d242358f
Unverified
Commit
d242358f
authored
Nov 27, 2025
by
Yang Yong (雍洋)
Committed by
GitHub
Nov 27, 2025
Browse files
fix mtx-game model (#523)
parent
c0863477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
26 deletions
+6
-26
lightx2v/models/networks/wan/infer/matrix_game2/pre_infer.py
lightx2v/models/networks/wan/infer/matrix_game2/pre_infer.py
+3
-3
test_cases/run_qwen_image_i2i_2509.sh
test_cases/run_qwen_image_i2i_2509.sh
+3
-23
No files found.
lightx2v/models/networks/wan/infer/matrix_game2/pre_infer.py
View file @
d242358f
import
torch
import
torch
from
lightx2v.models.networks.wan.infer.module_io
import
GridOutput
,
WanPreInferModuleOutput
from
lightx2v.models.networks.wan.infer.module_io
import
GridOutput
from
lightx2v.models.networks.wan.infer.self_forcing.pre_infer
import
WanSFPreInfer
,
sinusoidal_embedding_1d
from
lightx2v.models.networks.wan.infer.self_forcing.pre_infer
import
WanSFPreInfer
,
WanSFPreInferModuleOutput
,
sinusoidal_embedding_1d
from
lightx2v.utils.envs
import
*
from
lightx2v.utils.envs
import
*
...
@@ -86,7 +86,7 @@ class WanMtxg2PreInfer(WanSFPreInfer):
...
@@ -86,7 +86,7 @@ class WanMtxg2PreInfer(WanSFPreInfer):
context_lens
=
None
context_lens
=
None
context
=
self
.
img_emb
(
weights
,
visual_context
)
context
=
self
.
img_emb
(
weights
,
visual_context
)
return
WanPreInferModuleOutput
(
return
Wan
SF
PreInferModuleOutput
(
embed
=
embed
,
embed
=
embed
,
grid_sizes
=
grid_sizes
,
grid_sizes
=
grid_sizes
,
x
=
x
.
squeeze
(
0
),
x
=
x
.
squeeze
(
0
),
...
...
test_cases/run_qwen_image_i2i_2509.sh
View file @
d242358f
#!/bin/bash
#!/bin/bash
export
CUDA_VISIBLE_DEVICES
=
# set path and first
# set path and first
export
lightx2v_path
=
export
lightx2v_path
=
export
model_path
=
export
model_path
=
# check section
export
CUDA_VISIBLE_DEVICES
=
0
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using default value:
${
cuda_devices
}
, change at shell script or set env variable."
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
if
[
-z
"
${
lightx2v_path
}
"
]
;
then
echo
"Error: lightx2v_path is not set. Please set this variable first."
exit
1
fi
if
[
-z
"
${
model_path
}
"
]
;
then
echo
"Error: model_path is not set. Please set this variable first."
exit
1
fi
export
TOKENIZERS_PARALLELISM
=
false
export
PYTHONPATH
=
${
lightx2v_path
}
:
$PYTHONPATH
export
DTYPE
=
BF16
export
PROFILING_DEBUG_LEVEL
=
2
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
python
-m
lightx2v.infer
\
--model_cls
qwen_image
\
--model_cls
qwen_image
\
...
...
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