Nimbus AI is an ultra-premium, 100% on-device video captioning and creative copywriting cockpit that executes entirely inside the userβs web browser. By leveraging local WebGPU-accelerated client-side model execution, Nimbus demonstrates the peak potential of the Gemma 4 ecosystem on modern consumer hardwareβsuch as AMD Ryzenβ’ APUs and Radeonβ’ GPUsβwith zero server costs, absolute privacy, and instant execution.
Our core innovation is bringing Gemma 4 E2B IT (ONNX) directly into the userβs web browser to execute full multi-stage captioning pipelines with zero server overhead, zero cloud latency, and absolute data privacy utilizing WebGPU for hardware-accelerated client-side execution.
We have engineered deep, hardware-level client-side optimizations to deliver an ultra-premium, buttery-smooth user experience that runs entirely serverless.
graph TD
%% Styling Definitions
classDef client fill:#070414,stroke:#38BDF8,stroke-width:2px,color:#FFFFFF;
classDef worker fill:#0B0F30,stroke:#6366F1,stroke-width:2px,color:#FFFFFF;
classDef gpu fill:#090620,stroke:#10B981,stroke-width:2px,color:#FFFFFF;
classDef backend fill:#05030A,stroke:#EF4444,stroke-width:2px,color:#FFFFFF;
classDef flow fill:#1E293B,stroke:#475569,stroke-width:1px,color:#CBD5E1;
subgraph ClientCockpit["π± NIMBUS CLIENT COCKPIT (Browser / App.tsx)"]
A["HTML5 Video / File Drag-and-Drop"] -->|Ingest Stream| B["Canvas Temporal Sampler"]
B -->|Seek Frames & Extract Pixels| C["Frame Image Tensor Compiler"]
subgraph Controls["β‘ AMD Telemetry & Controls"]
D["AMD Power Governor Toggle"] -->|Turbo Mode: 384px | E["Image Normalization Modifiers"]
D -->|Battery Eco Mode: 224px| E
end
E -->|Normalized Tensors| C
end
subgraph WebWorker["π§΅ BACKGROUND WEB WORKER (caption.worker.ts)"]
F["Thread Broker (onmessage)"] -->|Coordinate Commands| G["Model Download Broker"]
G -->|Fetch Model Parameter Shards| H["Hugging Face Hub"]
H -->|Cache & Stream Weights| I["Origin Private File System (OPFS)"]
I -->|Subsequent Fast NVMe Reads| G
G -->|De-serialize Multimodal Inputs| J["Direct AutoProcessor Lower-Level Bindings"]
C -->|Post Message Tensors| F
end
subgraph HardwareExecution["π» WebGPU SHADER PIPELINE"]
K["ONNX Runtime WebGPU Shader Compiler"] -->|Compile Custom GPU Shaders| L["Local WebGPU VRAM Memory"]
J -->|Inject Multimodal Placeholders| M["Direct Gemma 4 E2B IT .generate() Core"]
M -->|Execute Local Shader Kernels| L
end
subgraph PipelineFlow["π DUAL-STAGE PIPELINE EXECUTION"]
N["Stage 1: Factual Grounding"] -->|Temporally sample & analyze frames| O["Free Visual Tensor VRAM"]
O -->|Reallocate WebGPU Text Shaders| P["Stage 2: Creative Copywriting"]
P -->|Compile Multi-Style Descriptions| Q["Telemetry HUD (t/s, Cost saved)"]
end
L -->|Real-Time Inference Loop| N
Q -->|Interactive Output Update| ClientCockpit
%% Class assignments
class ClientCockpit,A,B,C,D,E client;
class WebWorker,F,G,H,I,J worker;
class HardwareExecution,K,L,M gpu;
class PipelineFlow,N,O,P,Q flow;
[!IMPORTANT]
π οΈ Overcoming the Transformers.js VLM Image Serialization Bug (Our Signature USP)
In the official
@huggingface/transformersJS library, the standardpipeline('image-to-text')API is fundamentally broken for modern VLM architectures like Gemma. Under the hood, the library's preprocessor fails to serialize the raw image tensors and text inputs together inside the high-level pipeline wrapper, resulting in empty input arrays, token alignment issues, or invalid tensor shape exceptions.How We Solved It: We bypassed the high-level
pipeline()API entirely. By manually importing and orchestratingAutoProcessor, dynamically generating matched{ type: 'image' }placeholders in the message array, applying the chat template to raw text, and hand-feeding the parsedRawImagearray to compile the multi-modal input tensors directly to the raw model's.generate()method, we unlocked stable, multi-frame VLM execution natively in browser VRAM. This deep-level client-side engineering makes Nimbus AI one of the first production-ready web interfaces to run Gemma VLMs natively on-device.
Instead of running heavy cloud models with ongoing API expenses, Nimbus runs Gemma 4 E2B IT entirely locally. It executes direct GPU shader calculations inside the web browser utilizing ONNX Runtime Web and WebGPU.
caption.worker.ts)Model loading, heavy pipeline compilation, text tokenization, and active tensor generation are entirely offloaded onto a dedicated background Web Worker. This prevents main UI thread lockups and allows our interactive React interface to run at a stutter-free, buttery-smooth 120 FPS.
By setting env.use_opfs = true; inside Hugging Face Transformers.js, we bypass standard browser caching. We read and write cached model weights directly inside the sandboxed SSD private filesystem, enabling near-native NVMe read speeds on subsequent model boots.
To protect system memory and ensure fast inference, our custom canvas sampler performs synchronized, non-blocking temporal frame extraction. It programmatically seeks across the video timeline to extract perfectly balanced representative frames, which are then downscaled and converted to WebGPU-compatible tensors inside the background thread.
Nimbus puts active hardware control in the userβs hands via a tactile toggle:
temperature = 0.7) to produce highly engaging, descriptive, and witty captions.Displays key live metrics as Gemma is running:
To prevent progress bar jumping (caused by parallel sharded download streams on the worker), we implement a thread-safe tracking Map inside the worker that reports a smoothed, monotonically increasing average download percentage for a premium UX.
For the grader/evaluation container run, the project packages an automated evaluation pipeline utilizing the Google Agent Development Kit (ADK) and powered by Gemini 3.5 Flash / Gemini 3.1 Flash Lite (with High Thinking Level enabled).
Evaluation ADK Pipeline (Docker)
βββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββ
β tasks.json β βββββββββββ> β Multi-Style Captioner β βββββββββββ> β results.json β
β (Input task)β β (Google ADK LlmAgent) β β (Graded Out) β
βββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββ
LlmAgent analyzes the video bytes and generates all requested styles (formal, sarcastic, humorous_tech, humorous_non_tech) in a single, highly-optimized structured JSON schema call.ProcessPoolExecutor (with up to 12 processes) to stay within the strict grading environment's time cap, processing all clips in under 3 minutes..
βββ src/ # Evaluator Python Source (Docker Backend)
β βββ main.py # Evaluator Entry: reads tasks.json, outputs results.json
β βββ agent.py # Gemini ADK consolidated Agent nodes & schema definitions
βββ frontend/ # Nimbus Web Source (Local WebGPU Client)
β βββ src/
β β βββ App.tsx # React UI Cockpit, canvas samplers, and telemetry dashboards
β β βββ caption.worker.ts # Background Thread Worker (Hugging Face + WebGPU + OPFS caching)
β β βββ main.tsx # Application Mounting Point
β β βββ index.css # Global design variables mapped into @theme (Tailwind v4)
β βββ package.json # Vite + React dependencies (Lucide React, Transformers.js)
β βββ index.html # Main mounting page
βββ Dockerfile # Grader container definition
βββ requirements.txt # Python dependencies (google-adk, google-genai)
βββ README.md # Project Documentation (You are here!)
To explore our premium local WebGPU captioning client, make sure you are using a browser with WebGPU support enabled (e.g., Chrome or Edge).
# Navigate to the frontend workspace
cd frontend
# Install node dependencies
npm install
# Start the Vite development server locally
npm run dev
Open http://localhost:5173 in your browser. Upload an image or MP4 video, select your preferred APU Governor Mode, and hit Start Local Generation!
The containerized evaluator is designed to run inside a sandboxed grading environment.
# Set your environment variables
cp .env.example .env
# Open .env and insert your GCP location, project settings, and service account key
# Build the graded container
docker build --tag video-captioner:latest .
# Run with local volume mapping
docker run --rm \
-v "$(pwd)/sample/sample_input:/input:ro" \
-v "$(pwd)/sample/sample_output:/output" \
video-captioner:latest
border-glow-sky).π Built with passion for the AMD Developer Hackathon: ACT II. Unlocking the power of local on-device client AI on modern AMD silicon. π
5 commits
TypeScript
55.1%
HTML
22.6%
Python
17.4%
CSS
3.5%
Shell
1.0%
Nimbus AI is an ultra-premium, 100% on-device video captioning and creative copywriting cockpit that executes entirely inside the userβs web browser. By leveraging local WebGPU-accelerated client-side model execution, Nimbus demonstrates the peak potential of the Gemma 4 ecosystem on modern consumer hardwareβsuch as AMD Ryzenβ’ APUs and Radeonβ’ GPUsβwith zero server costs, absolute privacy, and instant execution.
Our core innovation is bringing Gemma 4 E2B IT (ONNX) directly into the userβs web browser to execute full multi-stage captioning pipelines with zero server overhead, zero cloud latency, and absolute data privacy utilizing WebGPU for hardware-accelerated client-side execution.
We have engineered deep, hardware-level client-side optimizations to deliver an ultra-premium, buttery-smooth user experience that runs entirely serverless.
graph TD
%% Styling Definitions
classDef client fill:#070414,stroke:#38BDF8,stroke-width:2px,color:#FFFFFF;
classDef worker fill:#0B0F30,stroke:#6366F1,stroke-width:2px,color:#FFFFFF;
classDef gpu fill:#090620,stroke:#10B981,stroke-width:2px,color:#FFFFFF;
classDef backend fill:#05030A,stroke:#EF4444,stroke-width:2px,color:#FFFFFF;
classDef flow fill:#1E293B,stroke:#475569,stroke-width:1px,color:#CBD5E1;
subgraph ClientCockpit["π± NIMBUS CLIENT COCKPIT (Browser / App.tsx)"]
A["HTML5 Video / File Drag-and-Drop"] -->|Ingest Stream| B["Canvas Temporal Sampler"]
B -->|Seek Frames & Extract Pixels| C["Frame Image Tensor Compiler"]
subgraph Controls["β‘ AMD Telemetry & Controls"]
D["AMD Power Governor Toggle"] -->|Turbo Mode: 384px | E["Image Normalization Modifiers"]
D -->|Battery Eco Mode: 224px| E
end
E -->|Normalized Tensors| C
end
subgraph WebWorker["π§΅ BACKGROUND WEB WORKER (caption.worker.ts)"]
F["Thread Broker (onmessage)"] -->|Coordinate Commands| G["Model Download Broker"]
G -->|Fetch Model Parameter Shards| H["Hugging Face Hub"]
H -->|Cache & Stream Weights| I["Origin Private File System (OPFS)"]
I -->|Subsequent Fast NVMe Reads| G
G -->|De-serialize Multimodal Inputs| J["Direct AutoProcessor Lower-Level Bindings"]
C -->|Post Message Tensors| F
end
subgraph HardwareExecution["π» WebGPU SHADER PIPELINE"]
K["ONNX Runtime WebGPU Shader Compiler"] -->|Compile Custom GPU Shaders| L["Local WebGPU VRAM Memory"]
J -->|Inject Multimodal Placeholders| M["Direct Gemma 4 E2B IT .generate() Core"]
M -->|Execute Local Shader Kernels| L
end
subgraph PipelineFlow["π DUAL-STAGE PIPELINE EXECUTION"]
N["Stage 1: Factual Grounding"] -->|Temporally sample & analyze frames| O["Free Visual Tensor VRAM"]
O -->|Reallocate WebGPU Text Shaders| P["Stage 2: Creative Copywriting"]
P -->|Compile Multi-Style Descriptions| Q["Telemetry HUD (t/s, Cost saved)"]
end
L -->|Real-Time Inference Loop| N
Q -->|Interactive Output Update| ClientCockpit
%% Class assignments
class ClientCockpit,A,B,C,D,E client;
class WebWorker,F,G,H,I,J worker;
class HardwareExecution,K,L,M gpu;
class PipelineFlow,N,O,P,Q flow;
[!IMPORTANT]
π οΈ Overcoming the Transformers.js VLM Image Serialization Bug (Our Signature USP)
In the official
@huggingface/transformersJS library, the standardpipeline('image-to-text')API is fundamentally broken for modern VLM architectures like Gemma. Under the hood, the library's preprocessor fails to serialize the raw image tensors and text inputs together inside the high-level pipeline wrapper, resulting in empty input arrays, token alignment issues, or invalid tensor shape exceptions.How We Solved It: We bypassed the high-level
pipeline()API entirely. By manually importing and orchestratingAutoProcessor, dynamically generating matched{ type: 'image' }placeholders in the message array, applying the chat template to raw text, and hand-feeding the parsedRawImagearray to compile the multi-modal input tensors directly to the raw model's.generate()method, we unlocked stable, multi-frame VLM execution natively in browser VRAM. This deep-level client-side engineering makes Nimbus AI one of the first production-ready web interfaces to run Gemma VLMs natively on-device.
Instead of running heavy cloud models with ongoing API expenses, Nimbus runs Gemma 4 E2B IT entirely locally. It executes direct GPU shader calculations inside the web browser utilizing ONNX Runtime Web and WebGPU.
caption.worker.ts)Model loading, heavy pipeline compilation, text tokenization, and active tensor generation are entirely offloaded onto a dedicated background Web Worker. This prevents main UI thread lockups and allows our interactive React interface to run at a stutter-free, buttery-smooth 120 FPS.
By setting env.use_opfs = true; inside Hugging Face Transformers.js, we bypass standard browser caching. We read and write cached model weights directly inside the sandboxed SSD private filesystem, enabling near-native NVMe read speeds on subsequent model boots.
To protect system memory and ensure fast inference, our custom canvas sampler performs synchronized, non-blocking temporal frame extraction. It programmatically seeks across the video timeline to extract perfectly balanced representative frames, which are then downscaled and converted to WebGPU-compatible tensors inside the background thread.
Nimbus puts active hardware control in the userβs hands via a tactile toggle:
temperature = 0.7) to produce highly engaging, descriptive, and witty captions.Displays key live metrics as Gemma is running:
To prevent progress bar jumping (caused by parallel sharded download streams on the worker), we implement a thread-safe tracking Map inside the worker that reports a smoothed, monotonically increasing average download percentage for a premium UX.
For the grader/evaluation container run, the project packages an automated evaluation pipeline utilizing the Google Agent Development Kit (ADK) and powered by Gemini 3.5 Flash / Gemini 3.1 Flash Lite (with High Thinking Level enabled).
Evaluation ADK Pipeline (Docker)
βββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββ
β tasks.json β βββββββββββ> β Multi-Style Captioner β βββββββββββ> β results.json β
β (Input task)β β (Google ADK LlmAgent) β β (Graded Out) β
βββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββ
LlmAgent analyzes the video bytes and generates all requested styles (formal, sarcastic, humorous_tech, humorous_non_tech) in a single, highly-optimized structured JSON schema call.ProcessPoolExecutor (with up to 12 processes) to stay within the strict grading environment's time cap, processing all clips in under 3 minutes..
βββ src/ # Evaluator Python Source (Docker Backend)
β βββ main.py # Evaluator Entry: reads tasks.json, outputs results.json
β βββ agent.py # Gemini ADK consolidated Agent nodes & schema definitions
βββ frontend/ # Nimbus Web Source (Local WebGPU Client)
β βββ src/
β β βββ App.tsx # React UI Cockpit, canvas samplers, and telemetry dashboards
β β βββ caption.worker.ts # Background Thread Worker (Hugging Face + WebGPU + OPFS caching)
β β βββ main.tsx # Application Mounting Point
β β βββ index.css # Global design variables mapped into @theme (Tailwind v4)
β βββ package.json # Vite + React dependencies (Lucide React, Transformers.js)
β βββ index.html # Main mounting page
βββ Dockerfile # Grader container definition
βββ requirements.txt # Python dependencies (google-adk, google-genai)
βββ README.md # Project Documentation (You are here!)
To explore our premium local WebGPU captioning client, make sure you are using a browser with WebGPU support enabled (e.g., Chrome or Edge).
# Navigate to the frontend workspace
cd frontend
# Install node dependencies
npm install
# Start the Vite development server locally
npm run dev
Open http://localhost:5173 in your browser. Upload an image or MP4 video, select your preferred APU Governor Mode, and hit Start Local Generation!
The containerized evaluator is designed to run inside a sandboxed grading environment.
# Set your environment variables
cp .env.example .env
# Open .env and insert your GCP location, project settings, and service account key
# Build the graded container
docker build --tag video-captioner:latest .
# Run with local volume mapping
docker run --rm \
-v "$(pwd)/sample/sample_input:/input:ro" \
-v "$(pwd)/sample/sample_output:/output" \
video-captioner:latest
border-glow-sky).π Built with passion for the AMD Developer Hackathon: ACT II. Unlocking the power of local on-device client AI on modern AMD silicon. π
5 commits
TypeScript
55.1%
HTML
22.6%
Python
17.4%
CSS
3.5%
Shell
1.0%