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
4fd60670
Commit
4fd60670
authored
Apr 23, 2025
by
helloyongyang
Browse files
fix mm_config bug and update scripts
parent
fb686a90
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
9 deletions
+7
-9
.gitmodules
.gitmodules
+0
-3
lightx2v/__main__.py
lightx2v/__main__.py
+2
-2
lightx2v/utils/set_config.py
lightx2v/utils/set_config.py
+1
-0
scripts/run_hunyuan_i2v.sh
scripts/run_hunyuan_i2v.sh
+1
-1
scripts/run_hunyuan_t2v.sh
scripts/run_hunyuan_t2v.sh
+1
-1
scripts/run_wan_i2v.sh
scripts/run_wan_i2v.sh
+1
-1
scripts/run_wan_t2v.sh
scripts/run_wan_t2v.sh
+1
-1
No files found.
.gitmodules
View file @
4fd60670
[submodule "3rd/flash-attention"]
[submodule "3rd/flash-attention"]
path = 3rd/flash-attention
path = 3rd/flash-attention
url = https://github.com/Dao-AILab/flash-attention.git
url = https://github.com/Dao-AILab/flash-attention.git
[submodule "3rd/SpargeAttn"]
path = 3rd/SpargeAttn
url = https://github.com/thu-ml/SpargeAttn.git
lightx2v/__main__.py
View file @
4fd60670
...
@@ -21,11 +21,11 @@ if __name__ == "__main__":
...
@@ -21,11 +21,11 @@ if __name__ == "__main__":
parser
.
add_argument
(
"--model_cls"
,
type
=
str
,
required
=
True
,
choices
=
[
"wan2.1"
,
"hunyuan"
],
default
=
"hunyuan"
)
parser
.
add_argument
(
"--model_cls"
,
type
=
str
,
required
=
True
,
choices
=
[
"wan2.1"
,
"hunyuan"
],
default
=
"hunyuan"
)
parser
.
add_argument
(
"--task"
,
type
=
str
,
choices
=
[
"t2v"
,
"i2v"
],
default
=
"t2v"
)
parser
.
add_argument
(
"--task"
,
type
=
str
,
choices
=
[
"t2v"
,
"i2v"
],
default
=
"t2v"
)
parser
.
add_argument
(
"--model_path"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--model_path"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--image_path"
,
type
=
str
,
default
=
None
,
help
=
"The path to input image file or path for image-to-video (i2v) task"
)
parser
.
add_argument
(
"--save_video_path"
,
type
=
str
,
default
=
"./output_lightx2v.mp4"
,
help
=
"The path to save video path/file"
)
parser
.
add_argument
(
"--prompt"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--prompt"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--negative_prompt"
,
type
=
str
,
default
=
""
)
parser
.
add_argument
(
"--negative_prompt"
,
type
=
str
,
default
=
""
)
parser
.
add_argument
(
"--image_path"
,
type
=
str
,
default
=
None
,
help
=
"The path to input image file or path for image-to-video (i2v) task"
)
parser
.
add_argument
(
"--config_json"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--config_json"
,
type
=
str
,
required
=
True
)
parser
.
add_argument
(
"--save_video_path"
,
type
=
str
,
default
=
"./output_lightx2v.mp4"
,
help
=
"The path to save video path/file"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
print
(
f
"args:
{
args
}
"
)
print
(
f
"args:
{
args
}
"
)
...
...
lightx2v/utils/set_config.py
View file @
4fd60670
...
@@ -18,6 +18,7 @@ def get_default_config():
...
@@ -18,6 +18,7 @@ def get_default_config():
"use_bfloat16"
:
True
,
"use_bfloat16"
:
True
,
"lora_path"
:
None
,
"lora_path"
:
None
,
"strength_model"
:
1.0
,
"strength_model"
:
1.0
,
"mm_config"
:
None
,
}
}
return
default_config
return
default_config
...
...
scripts/run_hunyuan_i2v.sh
View file @
4fd60670
...
@@ -6,7 +6,7 @@ model_path=""
...
@@ -6,7 +6,7 @@ model_path=""
# check section
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
6
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
fi
...
...
scripts/run_hunyuan_t2v.sh
View file @
4fd60670
...
@@ -6,7 +6,7 @@ model_path=""
...
@@ -6,7 +6,7 @@ model_path=""
# check section
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
6
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
fi
...
...
scripts/run_wan_i2v.sh
View file @
4fd60670
...
@@ -6,7 +6,7 @@ model_path=""
...
@@ -6,7 +6,7 @@ model_path=""
# check section
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
6
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
fi
...
...
scripts/run_wan_t2v.sh
View file @
4fd60670
...
@@ -6,7 +6,7 @@ model_path=""
...
@@ -6,7 +6,7 @@ model_path=""
# check section
# check section
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
if
[
-z
"
${
CUDA_VISIBLE_DEVICES
}
"
]
;
then
cuda_devices
=
6
cuda_devices
=
0
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
echo
"Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value:
${
cuda_devices
}
, change at shell script or set env variable."
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
export
CUDA_VISIBLE_DEVICES
=
${
cuda_devices
}
fi
fi
...
...
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