Native Rust ML inference nodes for RemoteMedia pipelines, powered by Hugging Face Candle.
- WhisperNode - Speech-to-text transcription
- YoloNode - Object detection in video frames
- PhiNode / LlamaNode - LLM text generation
All nodes integrate with RemoteMedia's StreamingNode trait for seamless pipeline composition.
Add to your Cargo.toml:
[dependencies]
remotemedia-candle-nodes = { git = "https://github.com/RemoteMedia-SDK/candle-nodes.git", features = ["whisper"] }| Feature | Description |
|---|---|
whisper |
Enable Whisper speech-to-text |
yolo |
Enable YOLO object detection |
llm |
Enable Phi and LLaMA text generation |
cuda |
Enable NVIDIA GPU acceleration |
metal |
Enable Apple GPU acceleration |
all-models |
Enable all model families |
use remotemedia_candle_nodes::{WhisperNode, WhisperConfig};
let config = WhisperConfig {
model: WhisperModel::Base,
language: "en".to_string(),
device: "auto".to_string(),
..Default::default()
};
let node = WhisperNode::new("whisper-1", &config)?;
node.initialize().await?;
// Process audio
let result = node.process(audio_data).await?;use remotemedia_candle_nodes::{YoloNode, YoloConfig};
let config = YoloConfig {
model: YoloModel::Yolov8n,
confidence_threshold: 0.5,
device: "auto".to_string(),
..Default::default()
};
let node = YoloNode::new("yolo-1", &config)?;
let detections = node.process(video_frame).await?;use remotemedia_candle_nodes::{PhiNode, PhiConfig};
let config = PhiConfig {
model: PhiModel::Phi2,
llm: LlmConfig {
generation: GenerationConfig {
max_tokens: 256,
temperature: 0.7,
..Default::default()
},
..Default::default()
},
..Default::default()
};
let node = PhiNode::new("phi-1", &config)?;
let response = node.process(RuntimeData::Text(prompt)).await?;Models are automatically downloaded from Hugging Face Hub on first use.
Models are cached in ~/.cache/huggingface/hub/ (or $HF_HOME/hub/).
# List cached models
remotemedia models list
# Download a model for offline use
remotemedia models download openai/whisper-base
# Remove a model
remotemedia models remove openai/whisper-base
# Show cache statistics
remotemedia models statsDevices are selected automatically with fallback:
- CUDA - If
cudafeature enabled and NVIDIA GPU available - Metal - If
metalfeature enabled and on macOS - CPU - Always available as fallback
Override with the device config option:
config.device = "cpu".to_string(); // Force CPU
config.device = "cuda:0".to_string(); // Specific CUDA device
config.device = "auto".to_string(); // Auto-select (default)tiny- 39M params, fastestbase- 74M params (default)small- 244M paramsmedium- 769M paramslarge-v3- 1.5B params, most accurate
yolov8n- 3.2M params, fastest (default)yolov8s- 11.2M paramsyolov8m- 25.9M paramsyolov8l- 43.7M paramsyolov8x- 68.2M params, most accurate
phi-2- 2.7B params (default)phi-3-mini- 3.8B paramsllama-3.2-1b- 1B paramsllama-3.2-3b- 3B params
Same as RemoteMedia SDK.