fffiloni commited on
Commit
ed7df29
1 Parent(s): f882ba8

Update webgui.py

Browse files
Files changed (1) hide show
  1. webgui.py +4 -2
webgui.py CHANGED
@@ -170,9 +170,11 @@ def process_video(uploaded_img, uploaded_audio, width, height, length, seed, fac
170
  # Calculate the new height with the same aspect ratio
171
  new_height = int(original_height * (new_width / original_width))
172
 
173
- # Round the new height to the nearest multiple of 8
174
- new_height = round(new_height // 8) * 8
 
175
 
 
176
  # Resize the image to the calculated dimensions
177
  face_image = cv2.resize(face_img, (new_width, new_height))
178
 
 
170
  # Calculate the new height with the same aspect ratio
171
  new_height = int(original_height * (new_width / original_width))
172
 
173
+ # Ensure both width and height are divisible by 8
174
+ new_width = (target_width // 8) * 8 # Force target width to be divisible by 8
175
+ new_height = (new_height // 8) * 8 # Floor the height to the nearest multiple of 8
176
 
177
+
178
  # Resize the image to the calculated dimensions
179
  face_image = cv2.resize(face_img, (new_width, new_height))
180