mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 14:07:34 -06:00
Support remote SAM3 inference through a private Metal worker
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
let dir = args.next().ok_or("usage: lightcraft-sam3-worker MODEL_DIR [127.0.0.1:8793]")?;
|
||||
let address = args.next().unwrap_or_else(|| "127.0.0.1:8793".into()).parse()?;
|
||||
let device = candle_core::Device::new_metal(0)?;
|
||||
lightcraft_segment::remote::serve(address, std::path::Path::new(&dir), device)?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user