mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 22:42:24 -06:00
S2.64: SAM 2.1 Small, Base+ and Large, each checked against PyTorch
Hiera configs and size detection from the weights, registry entries pinned to commits with verified SHA-256, the loader picks the size by checksum. The GPU encoder submits once per block so Large fits in memory, and uploads no longer panic on a lost device. Reference tests run per size on the CPU and GPU. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
066bb2d031
commit
2acd0ca1a8
@@ -336,7 +336,7 @@ fn load_file(path: &Path, id: &str) -> std::result::Result<Loaded, String> {
|
||||
let bytes = std::fs::read(path).map_err(|e| format!("cannot read {}: {e}", path.display()))?;
|
||||
// SAM 2 runs on candle and is native only; every other model loads through the registry.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
if id == seg::SAM2_TINY.id {
|
||||
if effectcraft_sam2::mask::SIZES.iter().any(|m| m.id == id) {
|
||||
return effectcraft_sam2::mask::load(&bytes).map(|m| Loaded::Mask(m));
|
||||
}
|
||||
seg::load(id, &bytes)
|
||||
|
||||
Reference in New Issue
Block a user