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
a3d0f2d9
Commit
a3d0f2d9
authored
Aug 06, 2025
by
helloyongyang
Browse files
update scripts
parent
26105692
Changes
41
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
121 additions
and
420 deletions
+121
-420
lightx2v/utils/envs.py
lightx2v/utils/envs.py
+2
-2
scripts/base/base.sh
scripts/base/base.sh
+61
-0
scripts/cache/run_wan_i2v_tea.sh
scripts/cache/run_wan_i2v_tea.sh
+3
-22
scripts/cache/run_wan_t2v_tea.sh
scripts/cache/run_wan_t2v_tea.sh
+3
-22
scripts/changing_resolution/run_wan_i2v_changing_resolution.sh
...ts/changing_resolution/run_wan_i2v_changing_resolution.sh
+3
-23
scripts/changing_resolution/run_wan_t2v_changing_resolution.sh
...ts/changing_resolution/run_wan_t2v_changing_resolution.sh
+3
-22
scripts/dist_infer/run_wan22_moe_t2v_cfg.sh
scripts/dist_infer/run_wan22_moe_t2v_cfg.sh
+3
-22
scripts/dist_infer/run_wan22_moe_t2v_cfg_ulysses.sh
scripts/dist_infer/run_wan22_moe_t2v_cfg_ulysses.sh
+3
-23
scripts/dist_infer/run_wan22_moe_t2v_ulysses.sh
scripts/dist_infer/run_wan22_moe_t2v_ulysses.sh
+3
-22
scripts/dist_infer/run_wan_i2v_dist_cfg_ulysses.sh
scripts/dist_infer/run_wan_i2v_dist_cfg_ulysses.sh
+3
-22
scripts/dist_infer/run_wan_i2v_dist_ring.sh
scripts/dist_infer/run_wan_i2v_dist_ring.sh
+3
-22
scripts/dist_infer/run_wan_i2v_dist_ulysses.sh
scripts/dist_infer/run_wan_i2v_dist_ulysses.sh
+3
-22
scripts/dist_infer/run_wan_t2v_dist_cfg.sh
scripts/dist_infer/run_wan_t2v_dist_cfg.sh
+3
-22
scripts/dist_infer/run_wan_t2v_dist_cfg_ulysses.sh
scripts/dist_infer/run_wan_t2v_dist_cfg_ulysses.sh
+3
-22
scripts/dist_infer/run_wan_t2v_dist_ring.sh
scripts/dist_infer/run_wan_t2v_dist_ring.sh
+3
-22
scripts/dist_infer/run_wan_t2v_dist_ulysses.sh
scripts/dist_infer/run_wan_t2v_dist_ulysses.sh
+3
-22
scripts/quantization/run_wan_i2v_quantization.sh
scripts/quantization/run_wan_i2v_quantization.sh
+3
-23
scripts/server/start_multi_servers.sh
scripts/server/start_multi_servers.sh
+4
-28
scripts/server/start_server.sh
scripts/server/start_server.sh
+6
-32
scripts/video_frame_interpolation/run_wan_t2v_video_frame_interpolation.sh
...me_interpolation/run_wan_t2v_video_frame_interpolation.sh
+3
-25
No files found.
lightx2v/utils/envs.py
View file @
a3d0f2d9
...
...
@@ -43,7 +43,7 @@ def GET_DTYPE():
@
lru_cache
(
maxsize
=
None
)
def
GET_SENSITIVE_DTYPE
():
RUNNING_FLAG
=
os
.
getenv
(
"SENSITIVE_LAYER_DTYPE"
,
None
)
if
RUNNING_FLAG
is
None
:
RUNNING_FLAG
=
os
.
getenv
(
"SENSITIVE_LAYER_DTYPE"
,
"
None
"
)
if
RUNNING_FLAG
==
"
None
"
:
return
GET_DTYPE
()
return
DTYPE_MAP
[
RUNNING_FLAG
]
scripts/base/base.sh
0 → 100644
View file @
a3d0f2d9
#!/bin/bash
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
PYTHONPATH
=
${
lightx2v_path
}
:
$PYTHONPATH
# always set false to avoid some warnings
export
TOKENIZERS_PARALLELISM
=
false
# =====================================================================================
# ⚠️ IMPORTANT CONFIGURATION PARAMETERS - READ CAREFULLY AND MODIFY WITH CAUTION ⚠️
# =====================================================================================
# Model Inference Data Type Setting (IMPORTANT!)
# Key parameter affecting model accuracy and performance
# Available options: [BF16, FP16]
# If not set, default value: BF16
export
DTYPE
=
BF16
# Sensitive Layer Data Type Setting (IMPORTANT!)
# Used for layers requiring higher precision
# Available options: [FP32, None]
# If not set, default value: None (follows DTYPE setting)
# Note: If set to FP32, it will be slower, so we recommend set ENABLE_GRAPH_MODE to true.
export
SENSITIVE_LAYER_DTYPE
=
FP32
# Performance Profiling Debug Mode (Debug Only)
# Enables detailed performance analysis output, such as time cost and memory usage
# Available options: [true, false]
# If not set, default value: false
# Note: This option can be set to false for production.
export
ENABLE_PROFILING_DEBUG
=
true
# Graph Mode Optimization (Performance Enhancement)
# Enables torch.compile for graph optimization, can improve inference performance
# Available options: [true, false]
# If not set, default value: false
# Note: First run may require compilation time, subsequent runs will be faster
# Note: When you use lightx2v as a service, you can set this option to true.
export
ENABLE_GRAPH_MODE
=
true
echo
"==============================================================================="
echo
"LightX2V Environment Variables Summary:"
echo
"-------------------------------------------------------------------------------"
echo
"lightx2v_path:
${
lightx2v_path
}
"
echo
"model_path:
${
model_path
}
"
echo
"-------------------------------------------------------------------------------"
echo
"Model Inference Data Type:
${
DTYPE
}
"
echo
"Sensitive Layer Data Type:
${
SENSITIVE_LAYER_DTYPE
}
"
echo
"Performance Profiling Debug Mode:
${
ENABLE_PROFILING_DEBUG
}
"
echo
"Graph Mode Optimization:
${
ENABLE_GRAPH_MODE
}
"
echo
"==============================================================================="
scripts/cache/run_wan_i2v_tea.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
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
export
CUDA_VISIBLE_DEVICES
=
0
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/cache/run_wan_t2v_tea.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
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
export
CUDA_VISIBLE_DEVICES
=
0
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/changing_resolution/run_wan_i2v_changing_resolution.sh
View file @
a3d0f2d9
...
...
@@ -4,30 +4,10 @@
lightx2v_path
=
model_path
=
# check section
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
export
CUDA_VISIBLE_DEVICES
=
0
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
export
DTYPE
=
BF16
# remove this can get high quality video
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/changing_resolution/run_wan_t2v_changing_resolution.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
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
export
CUDA_VISIBLE_DEVICES
=
0
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan22_moe_t2v_cfg.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1
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
export
CUDA_VISIBLE_DEVICES
=
0,1
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
2
-m
lightx2v.infer
\
--model_cls
wan2.2_moe
\
...
...
scripts/dist_infer/run_wan22_moe_t2v_cfg_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,30 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3,4,5,6,7
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
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
SENSITIVE_LAYER_DTYPE
=
FP32
export
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
8
-m
lightx2v.infer
\
--model_cls
wan2.2_moe
\
...
...
scripts/dist_infer/run_wan22_moe_t2v_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
4
-m
lightx2v.infer
\
--model_cls
wan2.2_moe
\
...
...
scripts/dist_infer/run_wan_i2v_dist_cfg_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3,4,5,6,7
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
8
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_i2v_dist_ring.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
4
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_i2v_dist_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
4
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_t2v_dist_cfg.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3,4,5,6,7
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
export
CUDA_VISIBLE_DEVICES
=
0,1
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
2
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_t2v_dist_cfg_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3,4,5,6,7
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
8
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_t2v_dist_ring.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
4
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/dist_infer/run_wan_t2v_dist_ulysses.sh
View file @
a3d0f2d9
...
...
@@ -4,29 +4,10 @@
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
torchrun
--nproc_per_node
=
4
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/quantization/run_wan_i2v_quantization.sh
View file @
a3d0f2d9
...
...
@@ -4,30 +4,10 @@
lightx2v_path
=
model_path
=
# check section
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
export
CUDA_VISIBLE_DEVICES
=
0
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
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
export
DTYPE
=
BF16
# remove this can get high quality video
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
python
-m
lightx2v.infer
\
--model_cls
wan2.1
\
...
...
scripts/server/start_multi_servers.sh
View file @
a3d0f2d9
#!/bin/bash
#
Default values
#
set path and first
lightx2v_path
=
model_path
=
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0,1,2,3,4,5,6,7
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
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
if
[
-z
"
${
num_gpus
}
"
]
;
then
num_gpus
=
8
fi
# Check required parameters
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
# Set environment variables
export
TOKENIZERS_PARALLELISM
=
false
export
PYTHONPATH
=
${
lightx2v_path
}
:
$PYTHONPATH
export
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
export
DTYPE
=
BF16
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
# Start multiple servers
python
-m
lightx2v.api_multi_servers
\
...
...
scripts/server/start_server.sh
View file @
a3d0f2d9
#!/bin/bash
#
S
et path
s
lightx2v_path
=
"/data/lightx2v-dev/"
model_path
=
"/data/lightx2v-dev/Wan2.1-I2V-14B-480P/"
#
s
et path
and first
lightx2v_path
=
model_path
=
# Check parameters
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using default value:
${
cuda_devices
}
"
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
export
CUDA_VISIBLE_DEVICES
=
0
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
# Set environment variables
export
TOKENIZERS_PARALLELISM
=
false
export
PYTHONPATH
=
${
lightx2v_path
}
:
$PYTHONPATH
export
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
export
DTYPE
=
BF16
echo
"=========================================="
echo
"Starting distributed inference API server"
echo
"Model path:
$model_path
"
echo
"CUDA devices:
$CUDA_VISIBLE_DEVICES
"
echo
"API port: 8000"
echo
"=========================================="
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
# Start API server with distributed inference service
python
-m
lightx2v.api_server
\
...
...
scripts/video_frame_interpolation/run_wan_t2v_video_frame_interpolation.sh
View file @
a3d0f2d9
#!/bin/bash
# Video Frame Interpolation Example Script for WAN T2V
# This script demonstrates how to use RIFE frame interpolation with LightX2V
# VFI is enabled through configuration file, not command line parameters
# set path and first
lightx2v_path
=
model_path
=
# check section
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
CUDA_VISIBLE_DEVICES
=
0
export
TOKENIZERS_PARALLELISM
=
false
export
PYTHONPATH
=
${
lightx2v_path
}
:
$PYTHONPATH
export
ENABLE_PROFILING_DEBUG
=
true
export
ENABLE_GRAPH_MODE
=
false
export
DTYPE
=
BF16
# remove this can get high quality video
# set environment variables
source
${
lightx2v_path
}
/scripts/base/base.sh
# Run inference with VFI enabled through config file
# The wan_t2v.json config contains video_frame_interpolation settings
...
...
Prev
1
2
3
Next
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