YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Kelin Motion Control
Minimal batch runner for Kling motion-control animation jobs.
For motion-control 3.0 the REST model_name is kling-v3 on the
/v1/videos/motion-control endpoint. The current API key was verified against
the Beijing endpoint, which is the script default.
Data
The script pairs files by natural filename order:
- Reference images:
/cpfs01/users/buwendong/data/emotion_data/ref_images - Driving videos:
/cpfs01/users/buwendong/data/emotion_data/source
There are currently 100 reference images and 100 driving videos.
API Key
Keep the key out of files:
export KLING_API_KEY='...'
Or pass it through stdin:
printf '%s\n' '...' | python scripts/run_motion_control.py --api-key-stdin ...
Existing Sample Results
The cleaned 3-sample comparison folder is:
runs/sample_compare_3/
inputs/ref_images/
inputs/driving_videos/
outputs/
manifest.csv
manifest.csv records the original source paths and the copied files used for
comparison.
Test 3 Samples
This submits pairs 1-3, downloads the outputs, and copies each input image/video into the result folder:
cd /cpfs01/users/yetinghong/code/kelin
export KLING_API_KEY='...'
python scripts/run_motion_control.py \
--run-name test_3 \
--limit 3 \
--upload-videos \
--oss-prefix oss://cpfs-to-new-cpfs/VideoGen/user_data/yetinghong/kelin/source \
--copy-inputs
Outputs will be under runs/test_3/.
Run All 100
cd /cpfs01/users/yetinghong/code/kelin
export KLING_API_KEY='...'
python scripts/run_motion_control.py \
--run-name full_100 \
--upload-videos \
--oss-prefix oss://cpfs-to-new-cpfs/VideoGen/user_data/yetinghong/kelin/source \
--copy-inputs
Outputs will be under runs/full_100/.
Dry Run
Prepare pair metadata without calling the API:
python scripts/run_motion_control.py --run-name dryrun_check --limit 3 --dry-run --copy-inputs
Existing Video URL Manifest
Kling needs video_url to be reachable by its service. Local /cpfs...mp4
paths cannot be used directly. If videos are already hosted, provide a
CSV/JSON/JSONL manifest keyed by video filename:
video,video_url
000000_000611_6_0.mp4,https://example.com/000000_000611_6_0.mp4
Then run:
python scripts/run_motion_control.py \
--run-name test_3_manifest \
--limit 3 \
--video-url-manifest video_urls.csv \
--copy-inputs