Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
videogen
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
videogen
Commits
4254eddc
Commit
4254eddc
authored
Feb 27, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental'
parents
e6901870
e668b610
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
videogen.py
videogen.py
+14
-17
No files found.
videogen.py
View file @
4254eddc
...
@@ -8554,13 +8554,6 @@ def main(args):
...
@@ -8554,13 +8554,6 @@ def main(args):
m_info
=
MODELS
[
model_key
]
m_info
=
MODELS
[
model_key
]
# Fix LoRA model info - the stored values may be incorrect
# Always determine supports_i2v and base model from the LoRA name
if
m_info
.
get
(
"is_lora"
):
lora_id
=
m_info
.
get
(
"id"
,
""
)
.
lower
()
if
"i2v"
in
lora_id
:
m_info
[
"supports_i2v"
]
=
True
# Determine task type based on arguments
# Determine task type based on arguments
model_id
=
m_info
[
"id"
]
model_id
=
m_info
[
"id"
]
is_i2v_mode
=
args
.
image_to_video
or
args
.
image
is_i2v_mode
=
args
.
image_to_video
or
args
.
image
...
@@ -8661,20 +8654,22 @@ def main(args):
...
@@ -8661,20 +8654,22 @@ def main(args):
if
is_lora
:
if
is_lora
:
lora_id
=
m_info
[
"id"
]
lora_id
=
m_info
[
"id"
]
base_model_id
=
m_info
.
get
(
"base_model"
)
# Allow manual override via --base-model
# Allow manual override via --base-model
if
args
.
base_model
:
if
args
.
base_model
:
base_model_id
=
args
.
base_model
base_model_id
=
args
.
base_model
print
(
f
" Using override base model: {base_model_id}"
)
print
(
f
" Using override base model: {base_model_id}"
)
else
:
# Always re-infer base model from LoRA name - the stored value may be incorrect
if
not
base_model_id
:
# T
his is especially important for Wan models where I2V vs T2V matters
# T
ry to infer base model from LoRA/model name
lora_id_lower
=
lora_id
.
lower
()
lora_id_lower
=
lora_id
.
lower
()
# Wan models - check for version 2.2 first, then 2.1
# Wan models - check for version 2.2 first, then 2.1
if
"wan"
in
lora_id_lower
:
if
"wan"
in
lora_id_lower
:
if
"wan2.2"
in
lora_id_lower
or
"wan2_2"
in
lora_id_lower
:
if
"wan2.2"
in
lora_id_lower
or
"wan2_2"
in
lora_id_lower
:
# Wan 2.2 models - use lora_id_lower to determine I2V vs T2V
# Wan 2.2 models - use lora_id_lower to determine I2V vs T2V
# This is more reliable than m_info.get("supports_i2v")
if
"i2v"
in
lora_id_lower
:
if
"i2v"
in
lora_id_lower
:
base_model_id
=
"Wan-AI/Wan2.2-I2V-A14B-Diffusers"
base_model_id
=
"Wan-AI/Wan2.2-I2V-A14B-Diffusers"
else
:
else
:
...
@@ -8687,6 +8682,7 @@ def main(args):
...
@@ -8687,6 +8682,7 @@ def main(args):
base_model_id
=
"Wan-AI/Wan2.1-T2V-14B-Diffusers"
base_model_id
=
"Wan-AI/Wan2.1-T2V-14B-Diffusers"
else
:
else
:
# Generic Wan - check the lora_id for i2v instead of m_info
# Generic Wan - check the lora_id for i2v instead of m_info
# This is more reliable as m_info.supports_i2v may not be set correctly
if
"i2v"
in
lora_id_lower
:
if
"i2v"
in
lora_id_lower
:
base_model_id
=
"Wan-AI/Wan2.2-I2V-A14B-Diffusers"
base_model_id
=
"Wan-AI/Wan2.2-I2V-A14B-Diffusers"
else
:
else
:
...
@@ -8698,12 +8694,9 @@ def main(args):
...
@@ -8698,12 +8694,9 @@ def main(args):
elif
"flux"
in
lora_id_lower
:
elif
"flux"
in
lora_id_lower
:
base_model_id
=
"black-forest-labs/FLUX.1-dev"
base_model_id
=
"black-forest-labs/FLUX.1-dev"
else
:
else
:
# Fallback to stored value if we can't infer
print
(
f
"❌ Cannot determine base model for LoRA: {lora_id}"
)
base_model_id
=
m_info
.
get
(
"base_model"
)
print
(
f
" Please specify --base-model when using this LoRA"
)
if
not
base_model_id
:
sys
.
exit
(
1
)
print
(
f
"❌ Cannot determine base model for LoRA: {lora_id}"
)
print
(
f
" Please specify --base-model when using this LoRA"
)
sys
.
exit
(
1
)
print
(
f
" LoRA detected: {lora_id}"
)
print
(
f
" LoRA detected: {lora_id}"
)
print
(
f
" Base model: {base_model_id}"
)
print
(
f
" Base model: {base_model_id}"
)
...
@@ -9418,7 +9411,11 @@ def main(args):
...
@@ -9418,7 +9411,11 @@ def main(args):
# before loading the video model. This ensures only one model is in memory at a time.
# before loading the video model. This ensures only one model is in memory at a time.
if
args
.
image_to_video
or
args
.
image
:
if
args
.
image_to_video
or
args
.
image
:
if
not
m_info
.
get
(
"supports_i2v"
):
# Check I2V support - also detect from model ID if not in config
model_id
=
m_info
.
get
(
"id"
,
""
)
.
lower
()
tags
=
m_info
.
get
(
"tags"
,
[])
supports_i2v
=
m_info
.
get
(
"supports_i2v"
)
or
"i2v"
in
model_id
or
"image-to-video"
in
tags
if
not
supports_i2v
:
print
(
f
"Error: {args.model} does not support image-to-video."
)
print
(
f
"Error: {args.model} does not support image-to-video."
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
...
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