RamAnanth1 commited on
Commit
54ad002
β€’
1 Parent(s): e5f9b65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -15,17 +15,20 @@ from lvdm.utils.common_utils import str2bool
15
  from lvdm.utils.dist_utils import setup_dist, gather_data
16
  from lvdm.utils.saving_utils import npz_to_video_grid, npz_to_imgsheet_5d
17
  from utils import load_model, get_conditions, make_model_input_shape, torch_to_np
 
18
 
19
  config_path = "model_config.yaml"
20
  config = OmegaConf.load(config_path)
21
 
 
 
22
  # # get model & sampler
23
- # model, _, _ = load_model(config, opt.ckpt_path,
24
- # inject_lora=opt.inject_lora,
25
- # lora_scale=opt.lora_scale,
26
- # lora_path=opt.lora_path
27
- # )
28
- # ddim_sampler = DDIMSampler(model) if opt.sample_type == "ddim" else None
29
 
30
  def greet(name):
31
  return "Hello " + name + "!!"
 
15
  from lvdm.utils.dist_utils import setup_dist, gather_data
16
  from lvdm.utils.saving_utils import npz_to_video_grid, npz_to_imgsheet_5d
17
  from utils import load_model, get_conditions, make_model_input_shape, torch_to_np
18
+ from huggingface_hub import hf_hub_url, cached_download
19
 
20
  config_path = "model_config.yaml"
21
  config = OmegaConf.load(config_path)
22
 
23
+ REPO_ID = "RamAnanth1/videocrafter-text2video"
24
+ ckpt_path = cached_download(hf_hub_url(REPO_ID, 'model.ckpt'))
25
  # # get model & sampler
26
+ model, _, _ = load_model(config, ckpt_path,
27
+ inject_lora=opt.inject_lora,
28
+ lora_scale=opt.lora_scale,
29
+ lora_path=opt.lora_path
30
+ )
31
+ ddim_sampler = DDIMSampler(model)
32
 
33
  def greet(name):
34
  return "Hello " + name + "!!"