Skip to content

Instantly share code, notes, and snippets.

View async0x42's full-sized avatar

async0x42 async0x42

View GitHub Profile
@async0x42
async0x42 / kimi-vl-a3b-instruct-video-inference-script-cli.py
Created April 11, 2025 14:01 — forked from eek/kimi-vl-a3b-instruct-video-inference-script-cli.py
This script extracts frames from videos and generates descriptions using the Kimi-VL-A3B model. It takes the following arguments: video_path (required): Path to the input video file --max_frames (default=1): Maximum number of frames to extract --save_dir (default="./test-frames"): Directory to save extracted frames --prompt (default="Describe th…
import cv2
import argparse
import torch
import os # Added import
from PIL import Image
from transformers import AutoModelForCausalLM, AutoProcessor
# Function to extract frames from video, save them, and return paths
def extract_frames(video_path, save_dir, target_fps=1, max_frames=1):
"""Extracts up to max_frames from a video file at target FPS, saves them, and returns their paths."""
@async0x42
async0x42 / tailwind-ui-050.css
Created August 18, 2020 02:32
tailwind-ui-050-css
@font-face {
font-family: Inter;
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(../fonts/Inter-Thin.90ea9fcf.woff2) format("woff2"), url(../fonts/Inter-Thin.8fa98ab1.woff) format("woff");
}
@font-face {
font-family: Inter;
font-style: italic;
@async0x42
async0x42 / tailwind-ui-031.css
Created August 18, 2020 02:31
tailwind-ui-031-css
@font-face {
font-family: Inter;
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(../fonts/Inter-Thin.90ea9fcf.woff2) format("woff2"), url(../fonts/Inter-Thin.8fa98ab1.woff) format("woff");
}
@font-face {
font-family: Inter;
font-style: italic;