Spaces:
Running on Zero
Running on Zero
Commit History
-
Pass VideoMetadata so timestamps match real time Running
The Space's Live Inference was emitting compressed timestamps (e.g. 0.0–1.1s for a 27s clip) because Qwen3-VL's video processor cannot infer fps from raw PIL frames and silently defaults to fps=24. Pass an explicit VideoMetadata describing the 1 fps sampling and set do_sample_frames=False so the time grid matches the real frame rate. Verified locally: 27-frame testvideo now produces 0.0–27.0s timestamps, matching the EasyR1 reference inference pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>8b894ad -
Switch live demo to uAI-NEXUS-MedVLM-1.0b-4B-RL (Qwen3-VL-4B)
Previously the demo loaded UII-AI/Qwen3.5-4B-MedSFT via Qwen3_5ForConditionalGeneration; the new model is Qwen3-VL based, loaded via Qwen3VLForConditionalGeneration. Removed the Qwen3.5 even-frame padding hack and updated the on-page description to truthfully name the running model. Repo is private, so the Space reads it via the HF_TOKEN secret. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>fa251de
-
update
c75723f -
Name the demo's running model (uAI-NEXUS-MedVLM-1.0c-4B-SFT)
Mention the publicly released 1.0a-7B-RL alongside it and add a Model link to the Links section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>18da5b6 -
Update HF model link to uAI-NEXUS-MedVLM-1.0a-7B-RL
Model was renamed from Qwen2.5-VL-7B-MedGRPO. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>00d1dd0 -
update
25f8482 -
update
74185a8 -
update
9fb970b
-
Add Model link to header
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>65fecab -
update demo
a45238e
-
readme
d5e7961
-
Fix: use unified processor() call for text+video tokenization
Separate tokenizer + video_processor calls produced input_ids with only 66 text tokens — missing the expanded <|video_pad|> placeholders needed to match 15552 visual patches, causing generation to hang. Now use processor(text=..., videos=...) which handles placeholder expansion, then strip video_metadata before generate() for Qwen3.5. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>8c5c6e8 -
Fix: load model to CPU, move to CUDA inside @spaces.GPU context
ZeroGPU only provides GPU inside the decorated function. .to('cuda') at load time fails because no GPU exists yet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>4485efe -
Load model with .to('cuda') for ZeroGPU compatibility
ZeroGPU intercepts .to('cuda') and manages GPU allocation transparently. Loading to 'cpu' bypassed this mechanism, causing inference to run on CPU. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>6718a30 -
Add detailed logging to run_inference for debugging
Logs each step: frame collection, model move, tokenization, video processing, generation. Wraps in try/except to surface errors in the UI instead of failing silently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>a5f8edd -
Align inference pipeline with LlamaFactory Qwen3VL flow
Replace qwen_vl_utils.process_vision_info with proper pipeline: - Use video_processor with video_metadata for frame processing - Compute second_per_grid_ts for temporal ROPE positional encoding - Strip video_metadata before generate() (Qwen3.5 compat) - Pass mm_inputs following hf_engine pattern (tensor conversion, device placement) - Remove qwen-vl-utils dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>310f8fe -
Unpack video_kwargs list values to scalars for processor
process_vision_info returns fps as [2.0] but Qwen3VL processor expects a scalar float. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>07c6d29 -
Load model to CPU, move to GPU inside @spaces.GPU context
ZeroGPU only allocates GPU when the decorated function runs, so device_map="auto" fails during initial load. Load to CPU first, then .to(cuda) inside run_inference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>56951a1 -
Add offload_folder for disk weight offloading during model load
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>192f391 -
Add torchvision dependency for Qwen2VLImageProcessor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>414c0d1 -
Add HF_TOKEN debug log for auth troubleshooting
f951e2e -
Large thumbnail cards with both image and button clickable
7c7e7e6 -
Make entire example card clickable using Button with icon
a5e5d20 -
Fix: return PIL Images instead of paths for Gallery update
12cf09a -
Fix live example: use non-interactive Gallery, robust frame parsing
fead60d -
Fix live example loading: use gr.update and factory function for proper state update
f57d572 -
Rename Max Tokens to Max Response Length, hide in accordion
ea74719 -
Replace dropdown with clickable thumbnail cards for live examples
a357a6b -
Add test_idx to all examples for traceability
43c5604 -
Replace live examples with high-performing ones: AVOS DC, CholecT50 DC, Cholec80 CVS
2df7da7 -
Add live example 3: CVS Assessment from Cholec80
899b6d4 -
Replace live example 1 with AVOS TAL (was NurViD)
1da6628 -
Add 2 clickable live examples (TAL, Dense Captioning) for live inference tab
f53c6c9 -
Extract at 1fps, support up to 60 frames (1 min video)
2a77b9c -
Remove unused sample_fps (no effect on PIL image inputs)
daf9f6f -
Fix FLA package name for pip install
8e17a01 -
Remove causal-conv1d (needs nvcc, optional)
8469a73 -
Add flash-linear-attention and causal-conv1d for Qwen3.5, bump transformers>=4.53.3
fd93f5a -
Remove flash-attn, use sdpa attention instead
501b5ff -
Add live inference tab with ZeroGPU support
c8cb1c8 -
update
d6599c2 -
Replace RC examples with bbox-annotated first frames
37f9aac -
Rename to MedGRPO-Demo
742edae -
Fix gradio sdk_version to 5.50.0
30244d5 -
Initial MedVidQA demo: 8 medical video tasks with Qwen3.5-VL predictions
2e5766d -
initial commit
Verified signature91d54f4