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
fc413707
Commit
fc413707
authored
Aug 14, 2025
by
wangshankun
Browse files
del script private info
parent
9e120289
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
30 deletions
+11
-30
lightx2v/infer.py
lightx2v/infer.py
+0
-13
lightx2v/models/runners/wan/wan_audio_runner.py
lightx2v/models/runners/wan/wan_audio_runner.py
+2
-7
scripts/dist_infer/run_wan22_ti2v_i2v_ulysses.sh
scripts/dist_infer/run_wan22_ti2v_i2v_ulysses.sh
+2
-2
scripts/wan/run_wan_i2v_audio.sh
scripts/wan/run_wan_i2v_audio.sh
+2
-3
scripts/wan/run_wan_i2v_audio_dist.sh
scripts/wan/run_wan_i2v_audio_dist.sh
+2
-2
scripts/wan22/run_wan22_ti2v_i2v.sh
scripts/wan22/run_wan22_ti2v_i2v.sh
+3
-3
No files found.
lightx2v/infer.py
View file @
fc413707
...
@@ -39,31 +39,18 @@ def main():
...
@@ -39,31 +39,18 @@ def main():
type
=
str
,
type
=
str
,
required
=
True
,
required
=
True
,
choices
=
[
choices
=
[
"wan2.1"
,
"wan2.1"
,
"hunyuan"
,
"hunyuan"
,
"wan2.1_distill"
,
"wan2.1_distill"
,
"wan2.1_causvid"
,
"wan2.1_causvid"
,
"wan2.1_skyreels_v2_df"
,
"wan2.1_skyreels_v2_df"
,
"cogvideox"
,
"cogvideox"
,
"wan2.1_audio"
,
"wan2.1_audio"
,
"wan2.2_moe"
,
"wan2.2_moe"
,
"wan2.2"
,
"wan2.2"
,
"wan2.2_moe_audio"
,
"wan2.2_moe_audio"
,
"wan2.2_audio"
,
"wan2.2_audio"
,
"wan2.2_moe_distill"
,
"wan2.2_moe_distill"
,
,
],
],
default
=
"wan2.1"
,
default
=
"wan2.1"
,
)
)
...
...
lightx2v/models/runners/wan/wan_audio_runner.py
View file @
fc413707
...
@@ -343,7 +343,7 @@ class VideoGenerator:
...
@@ -343,7 +343,7 @@ class VideoGenerator:
self
.
model
.
scheduler
.
reset
()
self
.
model
.
scheduler
.
reset
()
inputs
[
"previmg_encoder_output"
]
=
self
.
prepare_prev_latents
(
prev_video
,
prev_frame_length
)
inputs
[
"previmg_encoder_output"
]
=
self
.
prepare_prev_latents
(
prev_video
,
prev_frame_length
)
# Run inference loop
# Run inference loop
if
total_steps
is
None
:
if
total_steps
is
None
:
total_steps
=
self
.
model
.
scheduler
.
infer_steps
total_steps
=
self
.
model
.
scheduler
.
infer_steps
...
@@ -385,11 +385,6 @@ class WanAudioRunner(WanRunner): # type:ignore
...
@@ -385,11 +385,6 @@ class WanAudioRunner(WanRunner): # type:ignore
self
.
_video_generator
=
None
self
.
_video_generator
=
None
self
.
_audio_preprocess
=
None
self
.
_audio_preprocess
=
None
if
self
.
seq_p_group
is
None
:
self
.
sp_size
=
1
else
:
self
.
sp_size
=
dist
.
get_world_size
(
self
.
seq_p_group
)
def
initialize
(
self
):
def
initialize
(
self
):
"""Initialize all models once for multiple runs"""
"""Initialize all models once for multiple runs"""
...
@@ -613,7 +608,7 @@ class WanAudioRunner(WanRunner): # type:ignore
...
@@ -613,7 +608,7 @@ class WanAudioRunner(WanRunner): # type:ignore
def
load_transformer
(
self
):
def
load_transformer
(
self
):
"""Load transformer with LoRA support"""
"""Load transformer with LoRA support"""
base_model
=
WanAudioModel
(
self
.
config
.
model_path
,
self
.
config
,
self
.
init_device
,
self
.
seq_p_group
)
base_model
=
WanAudioModel
(
self
.
config
.
model_path
,
self
.
config
,
self
.
init_device
)
if
self
.
config
.
get
(
"lora_configs"
)
and
self
.
config
.
lora_configs
:
if
self
.
config
.
get
(
"lora_configs"
)
and
self
.
config
.
lora_configs
:
assert
not
self
.
config
.
get
(
"dit_quantized"
,
False
)
or
self
.
config
.
mm_config
.
get
(
"weight_auto_quant"
,
False
)
assert
not
self
.
config
.
get
(
"dit_quantized"
,
False
)
or
self
.
config
.
mm_config
.
get
(
"weight_auto_quant"
,
False
)
lora_wrapper
=
WanLoraWrapper
(
base_model
)
lora_wrapper
=
WanLoraWrapper
(
base_model
)
...
...
scripts/dist_infer/run_wan22_ti2v_i2v_ulysses.sh
View file @
fc413707
#!/bin/bash
#!/bin/bash
# set path and first
# set path and first
lightx2v_path
=
"/home/wangshankun/code/LightX2V"
lightx2v_path
=
model_path
=
"/data/nvme0/gushiqiao/models/Wan2.2-R2V812-Audio-5B"
model_path
=
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
...
...
scripts/wan/run_wan_i2v_audio.sh
View file @
fc413707
#!/bin/bash
#!/bin/bash
# set path and first
# set path and first
lightx2v_path
=
"/home/wangshankun/code/LightX2V"
lightx2v_path
=
model_path
=
"/data/nvme0/models/Wan2.1-R2V721-Audio-14B-720P"
model_path
=
export
CUDA_VISIBLE_DEVICES
=
0
export
CUDA_VISIBLE_DEVICES
=
0
...
@@ -11,7 +11,6 @@ source ${lightx2v_path}/scripts/base/base.sh
...
@@ -11,7 +11,6 @@ source ${lightx2v_path}/scripts/base/base.sh
export
TORCH_CUDA_ARCH_LIST
=
"9.0"
export
TORCH_CUDA_ARCH_LIST
=
"9.0"
export
PYTORCH_CUDA_ALLOC_CONF
=
expandable_segments:True
export
PYTORCH_CUDA_ALLOC_CONF
=
expandable_segments:True
export
ENABLE_GRAPH_MODE
=
false
export
ENABLE_GRAPH_MODE
=
false
export
ENABLE_GRAPH_MODE
=
false
export
SENSITIVE_LAYER_DTYPE
=
None
export
SENSITIVE_LAYER_DTYPE
=
None
...
...
scripts/wan/run_wan_i2v_audio_dist.sh
View file @
fc413707
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
# set path and first
# set path and first
lightx2v_path
=
"/home/wangshankun/code/LightX2V"
lightx2v_path
=
model_path
=
"/data/nvme0/models/Wan2.1-R2V721-Audio-14B-720P"
model_path
=
# set environment variables
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
source
${
lightx2v_path
}
/scripts/base/base.sh
...
...
scripts/wan22/run_wan22_ti2v_i2v.sh
View file @
fc413707
#!/bin/bash
#!/bin/bash
# set path and first
# set path and first
lightx2v_path
=
"/home/wangshankun/code/LightX2V"
lightx2v_path
=
model_path
=
"/data/nvme0/gushiqiao/models/official_models/wan2.2/Wan2.2-TI2V-5B"
model_path
=
export
CUDA_VISIBLE_DEVICES
=
0
export
CUDA_VISIBLE_DEVICES
=
0
# set environment variables
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
source
${
lightx2v_path
}
/scripts/base/base.sh
export
ENABLE_GRAPH_MODE
=
false
python
-m
lightx2v.infer
\
python
-m
lightx2v.infer
\
--model_cls
wan2.2
\
--model_cls
wan2.2
\
--task
i2v
\
--task
i2v
\
...
...
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