Skip to content

Commit f508404

Browse files
committed
revert more mistral imposed dependencies
1 parent 13bee0d commit f508404

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

convert_hf_to_gguf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,11 +1358,13 @@ def set_gguf_parameters(self):
13581358
self.gguf_writer.add_vision_head_count(self.find_vparam(["num_attention_heads"]))
13591359

13601360
# preprocessor config
1361-
image_mean = DATASET_MEAN if self.is_mistral_format else self.preprocessor_config["image_mean"]
1362-
image_std = DATASET_STD if self.is_mistral_format else self.preprocessor_config["image_std"]
1361+
# image_mean = DATASET_MEAN if self.is_mistral_format else self.preprocessor_config["image_mean"]
1362+
# image_std = DATASET_STD if self.is_mistral_format else self.preprocessor_config["image_std"]
13631363

1364-
self.gguf_writer.add_vision_image_mean(image_mean)
1365-
self.gguf_writer.add_vision_image_std(image_std)
1364+
# self.gguf_writer.add_vision_image_mean(image_mean)
1365+
# self.gguf_writer.add_vision_image_std(image_std)
1366+
self.gguf_writer.add_vision_image_mean(self.preprocessor_config["image_mean"])
1367+
self.gguf_writer.add_vision_image_std(self.preprocessor_config["image_std"])
13661368

13671369
if self.has_audio_encoder:
13681370
self.gguf_writer.add_clip_has_audio_encoder(True)

0 commit comments

Comments
 (0)