seawolf2357 commited on
Commit
d5c6079
·
verified ·
1 Parent(s): 2a71849

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -33,7 +33,6 @@ def download_model():
33
  hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/dynamicrafter_1024_v1/', force_download=True)
34
 
35
 
36
-
37
  download_model()
38
  ckpt_path='checkpoints/dynamicrafter_1024_v1/model.ckpt'
39
  config_file='configs/inference_1024_v1.0.yaml'
@@ -47,7 +46,6 @@ model.eval()
47
  model = model.cuda()
48
 
49
 
50
-
51
  @spaces.GPU(duration=300)
52
  def infer(image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, video_length=2):
53
  resolution = (576, 1024)
@@ -69,8 +67,6 @@ def infer(image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, video
69
  h, w = resolution[0] // 8, resolution[1] // 8
70
  noise_shape = [batch_size, channels, frames, h, w]
71
 
72
-
73
-
74
  # text cond
75
  with torch.no_grad(), torch.cuda.amp.autocast():
76
  text_emb = model.get_learned_conditioning([prompt])
 
33
  hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/dynamicrafter_1024_v1/', force_download=True)
34
 
35
 
 
36
  download_model()
37
  ckpt_path='checkpoints/dynamicrafter_1024_v1/model.ckpt'
38
  config_file='configs/inference_1024_v1.0.yaml'
 
46
  model = model.cuda()
47
 
48
 
 
49
  @spaces.GPU(duration=300)
50
  def infer(image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, video_length=2):
51
  resolution = (576, 1024)
 
67
  h, w = resolution[0] // 8, resolution[1] // 8
68
  noise_shape = [batch_size, channels, frames, h, w]
69
 
 
 
70
  # text cond
71
  with torch.no_grad(), torch.cuda.amp.autocast():
72
  text_emb = model.get_learned_conditioning([prompt])