Image-Text-to-Text
Transformers
Safetensors
qwen3_vl_moe
robotics
embodied-ai
video-understanding
progress-estimation
reward-modeling
qwen3-vl
conversational
Instructions to use InternRobotics/VLAC-Cut with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InternRobotics/VLAC-Cut with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="InternRobotics/VLAC-Cut") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("InternRobotics/VLAC-Cut") model = AutoModelForMultimodalLM.from_pretrained("InternRobotics/VLAC-Cut", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use InternRobotics/VLAC-Cut with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "InternRobotics/VLAC-Cut" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InternRobotics/VLAC-Cut", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/InternRobotics/VLAC-Cut
- SGLang
How to use InternRobotics/VLAC-Cut with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "InternRobotics/VLAC-Cut" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InternRobotics/VLAC-Cut", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "InternRobotics/VLAC-Cut" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InternRobotics/VLAC-Cut", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use InternRobotics/VLAC-Cut with Docker Model Runner:
docker model run hf.co/InternRobotics/VLAC-Cut
Update quick_start output behavior and trim README args
Browse files- README.md +2 -2
- quick_start/README.md +1 -2
- quick_start/run_example.py +7 -5
README.md
CHANGED
|
@@ -60,9 +60,9 @@ python quick_start/run_example.py \
|
|
| 60 |
- `--task-instruction`: task description, unless `--prompt` is used instead.
|
| 61 |
- `--task-plan`: optional step-by-step plan text for the default `chunk_all` prompt.
|
| 62 |
- `--model-path`: optional. Defaults to the parent directory of `quick_start/`.
|
| 63 |
-
- `--output-jsonl`: optional.
|
| 64 |
- `--prompt`: optional full prompt override.
|
| 65 |
-
- `--sample-hz`
|
| 66 |
|
| 67 |
Render a prediction-only preview video from the JSONL output:
|
| 68 |
|
|
|
|
| 60 |
- `--task-instruction`: task description, unless `--prompt` is used instead.
|
| 61 |
- `--task-plan`: optional step-by-step plan text for the default `chunk_all` prompt.
|
| 62 |
- `--model-path`: optional. Defaults to the parent directory of `quick_start/`.
|
| 63 |
+
- `--output-jsonl`: optional. If omitted, the script prints the prediction only and does not save a JSONL file.
|
| 64 |
- `--prompt`: optional full prompt override.
|
| 65 |
+
- `--sample-hz`: optional inference control. Default: `2.0`.
|
| 66 |
|
| 67 |
Render a prediction-only preview video from the JSONL output:
|
| 68 |
|
quick_start/README.md
CHANGED
|
@@ -36,9 +36,8 @@ Important arguments:
|
|
| 36 |
- `--task-instruction`: optional if `--prompt` is provided. Natural-language task description.
|
| 37 |
- `--task-plan`: optional. Multi-line plan text appended after `--task-instruction` when building the default `chunk_all` prompt.
|
| 38 |
- `--model-path`: optional. Defaults to the parent directory of `quick_start/`.
|
| 39 |
-
- `--output-jsonl`: optional.
|
| 40 |
- `--sample-hz`: optional. Video sampling rate for inference. Default: `2.0`.
|
| 41 |
-
- `--max-new-tokens`: optional. Generation cap. Default: `1024`.
|
| 42 |
- `--prompt`: optional full prompt override. If set, `--task-instruction` and `--task-plan` are ignored.
|
| 43 |
|
| 44 |
Render a preview video:
|
|
|
|
| 36 |
- `--task-instruction`: optional if `--prompt` is provided. Natural-language task description.
|
| 37 |
- `--task-plan`: optional. Multi-line plan text appended after `--task-instruction` when building the default `chunk_all` prompt.
|
| 38 |
- `--model-path`: optional. Defaults to the parent directory of `quick_start/`.
|
| 39 |
+
- `--output-jsonl`: optional. If omitted, the script prints the prediction only and does not save a JSONL file.
|
| 40 |
- `--sample-hz`: optional. Video sampling rate for inference. Default: `2.0`.
|
|
|
|
| 41 |
- `--prompt`: optional full prompt override. If set, `--task-instruction` and `--task-plan` are ignored.
|
| 42 |
|
| 43 |
Render a preview video:
|
quick_start/run_example.py
CHANGED
|
@@ -68,7 +68,7 @@ def parse_args() -> argparse.Namespace:
|
|
| 68 |
"--output-jsonl",
|
| 69 |
type=Path,
|
| 70 |
default=None,
|
| 71 |
-
help="Optional output path.
|
| 72 |
)
|
| 73 |
parser.add_argument(
|
| 74 |
"--max-new-tokens",
|
|
@@ -282,8 +282,9 @@ def main() -> int:
|
|
| 282 |
prompt, prompt_source, task_instruction, task_plan = resolve_prompt(args)
|
| 283 |
video_path = resolve_video_path(args.video_path)
|
| 284 |
video_path_for_output = maybe_relativize_to_model_root(video_path)
|
| 285 |
-
output_path = args.output_jsonl
|
| 286 |
-
output_path
|
|
|
|
| 287 |
|
| 288 |
InferRequest, PtEngine, RequestConfig = load_swift_runtime()
|
| 289 |
engine = PtEngine(
|
|
@@ -341,10 +342,11 @@ def main() -> int:
|
|
| 341 |
"pred_curve_point_progress": pred_point_progress,
|
| 342 |
}
|
| 343 |
)
|
| 344 |
-
output_path
|
|
|
|
| 345 |
|
| 346 |
print(f"video_path={video_path}")
|
| 347 |
-
print(f"output_jsonl={output_path
|
| 348 |
print(f"input_sample_hz={float(args.sample_hz):.4f}")
|
| 349 |
print(f"input_frame_count={len(sampled_indices)}")
|
| 350 |
print(f"pred_keypoint_count={len(pred_point_progress)}")
|
|
|
|
| 68 |
"--output-jsonl",
|
| 69 |
type=Path,
|
| 70 |
default=None,
|
| 71 |
+
help="Optional output path. If omitted, print the response only and do not save a JSONL file.",
|
| 72 |
)
|
| 73 |
parser.add_argument(
|
| 74 |
"--max-new-tokens",
|
|
|
|
| 282 |
prompt, prompt_source, task_instruction, task_plan = resolve_prompt(args)
|
| 283 |
video_path = resolve_video_path(args.video_path)
|
| 284 |
video_path_for_output = maybe_relativize_to_model_root(video_path)
|
| 285 |
+
output_path = args.output_jsonl.resolve() if args.output_jsonl is not None else None
|
| 286 |
+
if output_path is not None:
|
| 287 |
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
| 288 |
|
| 289 |
InferRequest, PtEngine, RequestConfig = load_swift_runtime()
|
| 290 |
engine = PtEngine(
|
|
|
|
| 342 |
"pred_curve_point_progress": pred_point_progress,
|
| 343 |
}
|
| 344 |
)
|
| 345 |
+
if output_path is not None:
|
| 346 |
+
output_path.write_text(json.dumps(output_row, ensure_ascii=False) + "\n", encoding="utf-8")
|
| 347 |
|
| 348 |
print(f"video_path={video_path}")
|
| 349 |
+
print(f"output_jsonl={output_path if output_path is not None else '(not saved)'}")
|
| 350 |
print(f"input_sample_hz={float(args.sample_hz):.4f}")
|
| 351 |
print(f"input_frame_count={len(sampled_indices)}")
|
| 352 |
print(f"pred_keypoint_count={len(pred_point_progress)}")
|