aburzio-nv commited on
Commit
6b8eaf4
·
verified ·
1 Parent(s): 78cf133

Raise hosted upload and inference frame cap to 128

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. src/dvlt/scripts/gradio_demo.py +6 -5
README.md CHANGED
@@ -30,7 +30,7 @@ private. Visibility is a Space setting, not controlled by this README.
30
  ## Uploads and temporary results
31
 
32
  Live inference accepts JPEG, PNG or WebP images and supported video files,
33
- up to 32 images or sampled video frames, at most
34
  16 megapixels per frame. Uploads are limited to 100 MB per file at the
35
  HTTP upload boundary and 256 MiB total per submitted collection. Videos
36
  are limited to 900 decoded frames and sampled at 0.5–10 FPS.
 
30
  ## Uploads and temporary results
31
 
32
  Live inference accepts JPEG, PNG or WebP images and supported video files,
33
+ up to 128 images or sampled video frames, at most
34
  16 megapixels per frame. Uploads are limited to 100 MB per file at the
35
  HTTP upload boundary and 256 MiB total per submitted collection. Videos
36
  are limited to 900 decoded frames and sampled at 0.5–10 FPS.
src/dvlt/scripts/gradio_demo.py CHANGED
@@ -79,6 +79,7 @@ from dvlt.viz.scene_rerun import visualize_scene
79
 
80
 
81
  logger = get_logger(__name__)
 
82
 
83
 
84
  EXTRA_CLI_ARGS = [
@@ -460,7 +461,7 @@ def build_app(
460
  state["selected_idx"] = None
461
  try:
462
  frames = _load_files_to_frames(
463
- files, video_fps=video_fps, max_frames=32 if hosted else None
464
  ) if files else []
465
  except (ValueError, OSError, Image.DecompressionBombError) as exc:
466
  raise gr.Error(str(exc)) from exc
@@ -523,8 +524,8 @@ def build_app(
523
  frames = state.get("frames") or []
524
  if not frames:
525
  raise gr.Error("Upload at least one image or video.")
526
- if hosted and len(frames) > 32:
527
- raise gr.Error("Use at most 32 images or sampled video frames for live inference.")
528
  entry = registry[state["active_label"]]
529
  # Loop-count changes and prediction must be atomic across visitors.
530
  with inference_lock:
@@ -637,7 +638,7 @@ def build_app(
637
  gr.HTML(DEMO_HEADER, elem_id="dv-header")
638
  if hosted:
639
  gr.Markdown(
640
- "Upload up to 32 images or sampled video frames (16 megapixels per frame; "
641
  "100 MB per file, 256 MiB total; videos limited to 900 decoded frames). "
642
  "Uploads and results use temporary server storage and are scheduled for deletion "
643
  "after one hour. Download results before they expire. "
@@ -695,7 +696,7 @@ def build_app(
695
  label="Video sampling FPS",
696
  info=(
697
  "Frames extracted per second, independent of the recording FPS. "
698
- "32-frame limit: about 16 seconds at 2 FPS or 32 seconds at 1 FPS."
699
  if hosted else "Changing this resamples uploaded videos."
700
  ),
701
  )
 
79
 
80
 
81
  logger = get_logger(__name__)
82
+ HOSTED_MAX_FRAMES = 128
83
 
84
 
85
  EXTRA_CLI_ARGS = [
 
461
  state["selected_idx"] = None
462
  try:
463
  frames = _load_files_to_frames(
464
+ files, video_fps=video_fps, max_frames=HOSTED_MAX_FRAMES if hosted else None
465
  ) if files else []
466
  except (ValueError, OSError, Image.DecompressionBombError) as exc:
467
  raise gr.Error(str(exc)) from exc
 
524
  frames = state.get("frames") or []
525
  if not frames:
526
  raise gr.Error("Upload at least one image or video.")
527
+ if hosted and len(frames) > HOSTED_MAX_FRAMES:
528
+ raise gr.Error(f"Use at most {HOSTED_MAX_FRAMES} images or sampled video frames for live inference.")
529
  entry = registry[state["active_label"]]
530
  # Loop-count changes and prediction must be atomic across visitors.
531
  with inference_lock:
 
638
  gr.HTML(DEMO_HEADER, elem_id="dv-header")
639
  if hosted:
640
  gr.Markdown(
641
+ f"Upload up to {HOSTED_MAX_FRAMES} images or sampled video frames (16 megapixels per frame; "
642
  "100 MB per file, 256 MiB total; videos limited to 900 decoded frames). "
643
  "Uploads and results use temporary server storage and are scheduled for deletion "
644
  "after one hour. Download results before they expire. "
 
696
  label="Video sampling FPS",
697
  info=(
698
  "Frames extracted per second, independent of the recording FPS. "
699
+ f"{HOSTED_MAX_FRAMES}-frame limit; the separate 900 decoded-frame limit also applies."
700
  if hosted else "Changing this resamples uploaded videos."
701
  ),
702
  )