Expand description
Qwen3-VL structured-output engine for findit-studio.
Imported as qwen3_vl (the package name is qwen3-vl on
crates.io; Cargo derives the lib name by replacing hyphens
with underscores).
Standalone crate with no findit-proto dependency: the
image-analysis preset produces a typed
image_analysis::ImageAnalysis (re-exported from the
llmtask sibling crate, which hosts the canonical shared
type), whose shape mirrors findit-proto::database::SceneVlmResult
so a downstream consumer can map field-by-field without
re-running inference.
The crate has two layers:
Engine+Task— a generic Qwen3-VL constrained-JSON inference engine. Wrapsmistralrs 0.8; backend selection (metal / cuda / …) is up to the consumer (see the README). Async-only; callers wrap returnedFutures withtokio::time::timeout(..)ortokio::select!for shutdown observation.image_analysis— the only preset that ships today. Owns the prompt, the constrained-JSON schema, the resilient parser, and theimage_analysis::ImageAnalysisoutput type. Detection-array fields (subjects,objects, etc.) are flatVec<SmolStr>; see theimage_analysismodule doc andCHANGELOG.mdfor the rationale on dropping the previousDetection { label, confidence }wrapper.
Cancellation contract: dropping the future returned by Engine::run
is a fast wakeup, not GPU cancellation. mistralrs’s engine loop
runs the in-flight scheduler step to completion in the background; the
response is silently discarded on send. Use tokio::time::timeout(..)
for a deadline.
Re-exports§
pub use crate::engine::Engine;pub use crate::engine::EngineOptions;pub use crate::engine::RequestOptions;pub use crate::error::Error;pub use crate::error::LoadError;pub use crate::image_analysis::ImageAnalysisTask;
Modules§
- engine
- The
EngineandEngineOptionstypes. - error
- Top-level error types for the
qwen3-vlcrate. - image_
analysis - The image-analysis preset:
ImageAnalysisTaskproduces a typedImageAnalysiswith nine fields (scene category, free-form description, five detection lists, shot-type label, search tags). The “scene” wording survives in thescenefield and in the prompt because the upstream use case is video keyframes representing scenes — but the type itself is engine-output for a single image and works for any single-image analysis pipeline.
Structs§
- Image
Analysis - Structured single-image VLM output. Construct via an engine’s
ImageAnalysisTask::parse(theTask::parseimpl) or, for tests/builders,ImageAnalysis::newfollowed bywith_*chains. All fields are private; the accessor surface follows the rest of the crate’sscenesdetect-style getter /with_*/set_*convention.
Enums§
- Dynamic
Image - Re-exported from the
imagecrate for caller convenience —Engine::runconsumesVec<DynamicImage>. A Dynamic Image - Json
Parse Error - Convenience parse-error type for
crate::Taskimplementations whose model output is JSON. Available behind thejsonfeature.
Traits§
- Task
- A structured-output task description.