ojaffe commited on
Commit
5ab9cda
·
verified ·
1 Parent(s): 7d8154b

Upload folder using huggingface_hub

Browse files
__pycache__/predict.cpython-311.pyc CHANGED
Binary files a/__pycache__/predict.cpython-311.pyc and b/__pycache__/predict.cpython-311.pyc differ
 
predict.py CHANGED
@@ -190,11 +190,11 @@ def predict_next_frame(ens, context_frames: np.ndarray) -> np.ndarray:
190
  ens.reset_cache()
191
  return result
192
 
193
- # Detect scene transitions in context frames
194
  scene_transition = False
195
  for i in range(len(frames) - 1):
196
  diff = np.abs(frames[i].astype(np.float32) - frames[i + 1].astype(np.float32)).mean()
197
- if diff > 30.0 / 255.0: # frames are normalized to 0-1
198
  scene_transition = True
199
  break
200
 
@@ -211,10 +211,10 @@ def predict_next_frame(ens, context_frames: np.ndarray) -> np.ndarray:
211
  direct_pred = (direct_orig + direct_flipped) / 2.0
212
 
213
  if scene_transition:
214
- # Scene transition: use direct-only (AR produces garbage after scene changes)
215
  predicted = direct_pred
216
  else:
217
- # Normal scene: full AR+direct blend with noise diversity
218
  all_ar_runs = []
219
  for noise_std in [0.0, 1.0/255.0, 2.0/255.0]:
220
  ar_preds_run = []
 
190
  ens.reset_cache()
191
  return result
192
 
193
+ # Detect extreme scene transitions (threshold 80 on 0-255 scale)
194
  scene_transition = False
195
  for i in range(len(frames) - 1):
196
  diff = np.abs(frames[i].astype(np.float32) - frames[i + 1].astype(np.float32)).mean()
197
+ if diff > 80.0 / 255.0:
198
  scene_transition = True
199
  break
200
 
 
211
  direct_pred = (direct_orig + direct_flipped) / 2.0
212
 
213
  if scene_transition:
214
+ # Extreme scene transition: direct-only
215
  predicted = direct_pred
216
  else:
217
+ # Normal: full AR+direct blend with noise diversity
218
  all_ar_runs = []
219
  for noise_std in [0.0, 1.0/255.0, 2.0/255.0]:
220
  ar_preds_run = []