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
renzhc
diffusers_dcu
Commits
4e445348
Unverified
Commit
4e445348
authored
Jan 04, 2025
by
chaowenguo
Committed by
GitHub
Jan 04, 2025
Browse files
Update rerender_a_video.py fix dtype error (#10451)
Update rerender_a_video.py
parent
a17832b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/community/rerender_a_video.py
examples/community/rerender_a_video.py
+3
-3
No files found.
examples/community/rerender_a_video.py
View file @
4e445348
...
...
@@ -782,7 +782,7 @@ class RerenderAVideoPipeline(StableDiffusionControlNetImg2ImgPipeline):
self
.
attn_state
.
reset
()
# 4.1 prepare frames
image
=
self
.
image_processor
.
preprocess
(
frames
[
0
]).
to
(
dtype
=
torch
.
float32
)
image
=
self
.
image_processor
.
preprocess
(
frames
[
0
]).
to
(
dtype
=
self
.
dtype
)
first_image
=
image
[
0
]
# C, H, W
# 4.2 Prepare controlnet_conditioning_image
...
...
@@ -926,8 +926,8 @@ class RerenderAVideoPipeline(StableDiffusionControlNetImg2ImgPipeline):
prev_image
=
frames
[
idx
-
1
]
control_image
=
control_frames
[
idx
]
# 5.1 prepare frames
image
=
self
.
image_processor
.
preprocess
(
image
).
to
(
dtype
=
torch
.
float32
)
prev_image
=
self
.
image_processor
.
preprocess
(
prev_image
).
to
(
dtype
=
torch
.
float32
)
image
=
self
.
image_processor
.
preprocess
(
image
).
to
(
dtype
=
self
.
dtype
)
prev_image
=
self
.
image_processor
.
preprocess
(
prev_image
).
to
(
dtype
=
self
.
dtype
)
warped_0
,
bwd_occ_0
,
bwd_flow_0
=
get_warped_and_mask
(
self
.
flow_model
,
first_image
,
image
[
0
],
first_result
,
False
,
self
.
device
...
...
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