Skip to content

Commit

Permalink
Update rerender_a_video.py fix dtype error (#10451)
Browse files Browse the repository at this point in the history
Update rerender_a_video.py
  • Loading branch information
chaowenguo authored Jan 4, 2025
1 parent a17832b commit 4e44534
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/community/rerender_a_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def __call__(
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
Expand Down Expand Up @@ -926,8 +926,8 @@ def __call__(
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
Expand Down

0 comments on commit 4e44534

Please sign in to comment.