Skip to content

Commit 58fa062

Browse files
authored
Merge pull request #88 from EvolvingLMMs-Lab/anxiangsir-patch-1
Update merge_model.py
2 parents 008e108 + 0a709b6 commit 58fa062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ds/merge_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ def validate_vit_consistency(model, vit_path, img_path):
260260
sample_image = Image.open(BytesIO(response.content)).convert("RGB")
261261
sample_image = sample_image.resize((560, 560))
262262

263-
rice_model = MLCDVisionModel.from_pretrained(vit_path, device_map={"": f"cuda:{CUDA_DEVICE}"}, dtype=torch.float32)
264-
processor = CLIPImageProcessor.from_pretrained(vit_path, device_map={"": f"cuda:{CUDA_DEVICE}"}, dtype=torch.float32, use_fast=True)
263+
rice_model = MLCDVisionModel.from_pretrained(vit_path, device_map={"": f"cuda:{CUDA_DEVICE}"})
264+
processor = CLIPImageProcessor.from_pretrained(vit_path, device_map={"": f"cuda:{CUDA_DEVICE}"}, use_fast=True)
265265
rice_inputs = processor.preprocess(images=sample_image, return_tensors="pt").to(dtype=model.dtype, device=rice_model.device)
266266

267267
rice_model = rice_model.eval()

0 commit comments

Comments
 (0)