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
b32321e4
Unverified
Commit
b32321e4
authored
Oct 27, 2025
by
gushiqiao
Committed by
GitHub
Oct 27, 2025
Browse files
[Fix] fix wanti2v-t2v vae encode bug (#408)
parent
e24de2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lightx2v/models/runners/wan/wan_runner.py
lightx2v/models/runners/wan/wan_runner.py
+4
-4
No files found.
lightx2v/models/runners/wan/wan_runner.py
View file @
b32321e4
...
@@ -532,10 +532,10 @@ class Wan22DenseRunner(WanRunner):
...
@@ -532,10 +532,10 @@ class Wan22DenseRunner(WanRunner):
# to tensor
# to tensor
img
=
TF
.
to_tensor
(
img
).
sub_
(
0.5
).
div_
(
0.5
).
cuda
().
unsqueeze
(
1
)
img
=
TF
.
to_tensor
(
img
).
sub_
(
0.5
).
div_
(
0.5
).
cuda
().
unsqueeze
(
1
)
vae_encoder_out
=
self
.
get_vae_encoder_output
(
img
)
vae_encoder_out
=
self
.
get_vae_encoder_output
(
img
)
self
.
config
.
lat_w
,
self
.
config
.
la
t_h
=
ow
//
self
.
config
.
vae_stride
[
2
],
oh
//
self
.
config
.
vae_stride
[
1
]
latent_w
,
laten
t_h
=
ow
//
self
.
config
[
"
vae_stride
"
]
[
2
],
oh
//
self
.
config
[
"
vae_stride
"
]
[
1
]
latent_shape
=
self
.
get_latent_shape_with_lat_hw
(
latent_h
,
latent_w
)
return
vae_encoder_out
return
vae_encoder_out
,
latent_shape
def
get_vae_encoder_output
(
self
,
img
):
def
get_vae_encoder_output
(
self
,
img
):
z
=
self
.
vae_encoder
.
encode
(
img
.
to
(
GET_DTYPE
()))
z
=
self
.
vae_encoder
.
encode
(
img
.
unsqueeze
(
0
).
to
(
GET_DTYPE
()))
return
z
return
z
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