mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	mtmd : fix 32-bit narrowing issue in export-lora and mtmd clip (#14503)
* [fix] Fix 32-bit narrowing issue in export-lora and mtmd clip * Update export-lora.cpp * Update clip.cpp * Update export-lora.cpp * format: use space to replace tab
This commit is contained in:
		| @@ -148,7 +148,7 @@ struct lora_merge_ctx { | |||||||
|  |  | ||||||
|         ctx_out = gguf_init_empty(); |         ctx_out = gguf_init_empty(); | ||||||
|         struct ggml_init_params params = { |         struct ggml_init_params params = { | ||||||
|             /*.mem_size   =*/ gguf_get_n_tensors(base_model.ctx_gguf)*ggml_tensor_overhead(), |             /*.mem_size   =*/ static_cast<size_t>(gguf_get_n_tensors(base_model.ctx_gguf)*ggml_tensor_overhead()), | ||||||
|             /*.mem_buffer =*/ NULL, |             /*.mem_buffer =*/ NULL, | ||||||
|             /*.no_alloc   =*/ true, |             /*.no_alloc   =*/ true, | ||||||
|         }; |         }; | ||||||
|   | |||||||
| @@ -2315,7 +2315,7 @@ struct clip_model_loader { | |||||||
|  |  | ||||||
|         // create data context |         // create data context | ||||||
|         struct ggml_init_params params = { |         struct ggml_init_params params = { | ||||||
|             /*.mem_size =*/ (gguf_get_n_tensors(ctx_gguf.get()) + 1) * ggml_tensor_overhead(), |             /*.mem_size =*/ static_cast<size_t>(gguf_get_n_tensors(ctx_gguf.get()) + 1) * ggml_tensor_overhead(), | ||||||
|             /*.mem_buffer =*/ NULL, |             /*.mem_buffer =*/ NULL, | ||||||
|             /*.no_alloc =*/ true, |             /*.no_alloc =*/ true, | ||||||
|         }; |         }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kiwi
					kiwi