xi0v Fabrice-TIERCELIN commited on
Commit
6bac019
1 Parent(s): fdf74c1

It seems that we can parameterize the width and the height; let's try on dragnuwa (#36)

Browse files

- It seems that we can parameterize the width and the height; let's try on dragnuwa (24423e8fe404bc27687269c56e6fd9ed6b5e58e6)


Co-authored-by: Fabrice TIERCELIN <Fabrice-TIERCELIN@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -109,6 +109,7 @@ def animate(
109
  gr.update(visible = True)
110
  ]
111
 
 
112
  @spaces.GPU(duration=120)
113
  def animate_on_gpu(
114
  image: Image,
@@ -122,7 +123,7 @@ def animate_on_gpu(
122
  generator = torch.manual_seed(seed)
123
 
124
  if version == "dragnuwa":
125
- return dragnuwaPipe(image, decode_chunk_size=decoding_t, generator=generator, motion_bucket_id=motion_bucket_id, noise_aug_strength=noise_aug_strength, num_frames=25).frames[0]
126
  elif version == "svdxt":
127
  return fps25Pipe(image, decode_chunk_size=decoding_t, generator=generator, motion_bucket_id=motion_bucket_id, noise_aug_strength=noise_aug_strength, num_frames=25).frames[0]
128
  else:
 
109
  gr.update(visible = True)
110
  ]
111
 
112
+ @torch.no_grad()
113
  @spaces.GPU(duration=120)
114
  def animate_on_gpu(
115
  image: Image,
 
123
  generator = torch.manual_seed(seed)
124
 
125
  if version == "dragnuwa":
126
+ return dragnuwaPipe(image, width=1024, height=576, decode_chunk_size=decoding_t, generator=generator, motion_bucket_id=motion_bucket_id, noise_aug_strength=noise_aug_strength, num_frames=25).frames[0]
127
  elif version == "svdxt":
128
  return fps25Pipe(image, decode_chunk_size=decoding_t, generator=generator, motion_bucket_id=motion_bucket_id, noise_aug_strength=noise_aug_strength, num_frames=25).frames[0]
129
  else: