aleafy commited on
Commit
6448202
·
1 Parent(s): 6dc7213
Files changed (2) hide show
  1. app.py +1 -1
  2. misc_utils/train_utils.py +0 -3
app.py CHANGED
@@ -30,7 +30,7 @@ from tqdm import tqdm
30
  os.makedirs('models', exist_ok=True)
31
  model_path = "models/relvid_mm_sd15_fbc_unet.pth"
32
 
33
- if not os.path.exists(filename):
34
  download_url_to_file(url='https://huggingface.co/aleafy/RelightVid/resolve/main/relvid_mm_sd15_fbc_unet.pth', dst=model_path)
35
 
36
  # if not os.path.exists(filename):
 
30
  os.makedirs('models', exist_ok=True)
31
  model_path = "models/relvid_mm_sd15_fbc_unet.pth"
32
 
33
+ if not os.path.exists(model_path):
34
  download_url_to_file(url='https://huggingface.co/aleafy/RelightVid/resolve/main/relvid_mm_sd15_fbc_unet.pth', dst=model_path)
35
 
36
  # if not os.path.exists(filename):
misc_utils/train_utils.py CHANGED
@@ -29,13 +29,10 @@ def get_models(args):
29
 
30
  def get_text_model(args):
31
  base_path = None
32
- train_net = None
33
  if args.get('diffusion'):
34
  if args.diffusion.params.get('base_path'):# 这边有base path的情况下已经load参数了
35
  base_path = args.diffusion.params.base_path
36
- train_net = args.diffusion.params.get('unet_init_weights')
37
  if args.get('text_model'):
38
- args.text_model.params.base_path = base_path
39
  text_model = instantiate_from_config(args.text_model)
40
  return text_model
41
  return None
 
29
 
30
  def get_text_model(args):
31
  base_path = None
 
32
  if args.get('diffusion'):
33
  if args.diffusion.params.get('base_path'):# 这边有base path的情况下已经load参数了
34
  base_path = args.diffusion.params.base_path
 
35
  if args.get('text_model'):
 
36
  text_model = instantiate_from_config(args.text_model)
37
  return text_model
38
  return None