MobileCLIP models S1 and S2 (#2454)

* Allow loading images with given std and mean

* OpenCLIP text encoder component

* Two MobileCLIP models

* Clippy fixes.

---------

Co-authored-by: Laurent <laurent.mazare@gmail.com>
This commit is contained in:
Jani Monoses
2024-08-29 16:38:58 +03:00
committed by GitHub
parent 29e25c458d
commit 86613c00e2
8 changed files with 608 additions and 10 deletions

View File

@ -72,8 +72,9 @@ pub fn main() -> anyhow::Result<()> {
let device = candle_examples::device(args.cpu)?;
let image = candle_examples::imagenet::load_image(args.image, args.which.resolution())?
.to_device(&device)?;
let image =
candle_examples::imagenet::load_image(args.image, args.which.resolution() as usize)?
.to_device(&device)?;
println!("loaded image {image:?}");
let model_file = match args.model {