| 1074 | } |
| 1075 | |
| 1076 | int clip_n_patches(const struct clip_ctx * ctx) { |
| 1077 | auto & params = ctx->vision_model.hparams; |
| 1078 | |
| 1079 | return (params.image_size / params.patch_size) * (params.image_size / params.patch_size); |
| 1080 | } |
| 1081 | |
| 1082 | size_t clip_embd_nbytes(const struct clip_ctx * ctx) { |
| 1083 | return clip_n_patches(ctx) * clip_n_mmproj_embd(ctx) * sizeof(float); |
no outgoing calls
no test coverage detected