Preserve image-aware sparse QSA for Qwen vision

This commit is contained in:
Georg Bauer committed 2026-10-04 14:03:12 +02:00
1 parent a8cad88100
commit dccf81971f
26 files changed
+1215 -44

No files matched your search

@@ -78,6 +78,9 @@ impl LiveSession {
.as_ref()
.ok_or("Qwen has no committed checkpoint")?;
validate_tokens(&saved.token_ids, identity)?;
if !crate::engine::qwen_vision::compatible(&self.current_images) {
return Err("Qwen vision cache policy differs; rebuild the cache".into());
}
if saved.mtp.is_some() != identity.mtp {
return Err("Qwen checkpoint MTP configuration differs".into());
}
@@ -179,6 +182,9 @@ impl LiveSession {
);
}
validate_tokens(&manifest.tokens, identity)?;
if !crate::engine::qwen_vision::compatible(&manifest.images) {
return Err("Qwen vision cache policy differs; rebuild the cache".into());
}
if !manifest.payload["mtp_history_snapshot"].is_null() != identity.mtp {
return Err("Qwen checkpoint MTP payload differs".into());
}