use anyhow::Result;
use rlx_core::config::NomicVisionConfig;
use rlx_core::weight_map::WeightMap;
use rlx_ir::Graph;
use std::collections::HashMap;
pub fn build_vision_graph_sized(
cfg: &NomicVisionConfig,
weights: &mut WeightMap,
batch: usize,
) -> Result<(Graph, HashMap<String, Vec<f32>>, VisionPreprocessWeights)> {
let built = crate::flow::build_nomic_vision_built(cfg, weights, batch)?;
let (graph, params) = rlx_core::flow_util::graph_from_built(built.model)?;
Ok((graph, params, built.preprocess))
}
pub struct VisionPreprocessWeights {
pub proj_w: Vec<f32>,
pub proj_w_cols: usize,
pub proj_b: Vec<f32>,
pub cls_token: Vec<f32>,
pub pos_embed: Vec<f32>,
}