abreza commited on
Commit
579ff22
1 Parent(s): 0121705

fix UnboundLocalError

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -94,14 +94,16 @@ def generate_video(source_image, driven_audio, preprocess='crop', still_mode=Fal
94
  raise AttributeError("No face is detected")
95
 
96
  # Determine reference coefficients
 
97
  if use_ref_video:
98
- ref_pose_coeff_path, ref_eyeblink_coeff_path = None, None
99
  if ref_info == 'pose':
100
  ref_pose_coeff_path = ref_video_coeff_path
101
  elif ref_info == 'blink':
102
  ref_eyeblink_coeff_path = ref_video_coeff_path
103
  elif ref_info == 'pose+blink':
104
  ref_pose_coeff_path = ref_eyeblink_coeff_path = ref_video_coeff_path
 
 
105
 
106
  # Generate coefficients from audio or reference video
107
  if use_ref_video and ref_info == 'all':
 
94
  raise AttributeError("No face is detected")
95
 
96
  # Determine reference coefficients
97
+ ref_pose_coeff_path, ref_eyeblink_coeff_path = None, None
98
  if use_ref_video:
 
99
  if ref_info == 'pose':
100
  ref_pose_coeff_path = ref_video_coeff_path
101
  elif ref_info == 'blink':
102
  ref_eyeblink_coeff_path = ref_video_coeff_path
103
  elif ref_info == 'pose+blink':
104
  ref_pose_coeff_path = ref_eyeblink_coeff_path = ref_video_coeff_path
105
+ elif ref_info == 'all':
106
+ ref_pose_coeff_path = ref_eyeblink_coeff_path = None
107
 
108
  # Generate coefficients from audio or reference video
109
  if use_ref_video and ref_info == 'all':