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
1f0fe18f
Unverified
Commit
1f0fe18f
authored
Oct 22, 2025
by
sandy
Committed by
GitHub
Oct 22, 2025
Browse files
[optimize] add waring up for vsr init (#399)
parent
08a3181b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
lightx2v/models/runners/vsr/vsr_wrapper.py
lightx2v/models/runners/vsr/vsr_wrapper.py
+7
-0
No files found.
lightx2v/models/runners/vsr/vsr_wrapper.py
View file @
1f0fe18f
...
...
@@ -121,6 +121,13 @@ class VSRWrapper:
self
.
sparse_ratio
=
2.0
# Recommended: 1.5 or 2.0. 1.5 → faster; 2.0 → more stable.
with
ProfilingContext4DebugL2
(
"Load VSR model"
):
self
.
pipe
=
init_pipeline
(
model_path
)
self
.
_warm_up
()
def
_warm_up
(
self
):
dummy
=
torch
.
zeros
((
25
,
384
,
640
,
3
),
dtype
=
torch
.
float32
,
device
=
self
.
device
)
_
=
self
.
super_resolve_frames
(
dummy
,
seed
=
0
,
scale
=
2.0
)
torch
.
cuda
.
synchronize
()
del
dummy
@
ProfilingContext4DebugL2
(
"VSR video"
)
def
super_resolve_frames
(
...
...
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