MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / clip_image_encode

Function clip_image_encode

examples/llava/clip.cpp:836–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

834}
835
836bool clip_image_encode(const clip_ctx * ctx, const int n_threads, clip_image_f32 * img, float * vec) {
837 if (!ctx->has_vision_encoder) {
838 printf("This gguf file seems to have no vision encoder\n");
839 return false;
840 }
841
842 clip_image_f32_batch imgs{};
843 imgs.size = 1;
844 imgs.data = img;
845 return clip_image_batch_encode(ctx, n_threads, &imgs, vec);
846}
847
848bool clip_image_batch_encode(const clip_ctx * ctx, const int n_threads, const clip_image_f32_batch * imgs, float * vec) {
849

Callers 2

encode_image_with_clipFunction · 0.70
process_imagesMethod · 0.50

Calls 2

printfFunction · 0.85
clip_image_batch_encodeFunction · 0.70

Tested by

no test coverage detected