Update modelling_magiv2.py
Browse files- modelling_magiv2.py +1 -0
modelling_magiv2.py
CHANGED
@@ -40,6 +40,7 @@ class Magiv2Model(PreTrainedModel):
|
|
40 |
images = [np.array(image.convert("RGB")) for image in images]
|
41 |
images = self.processor(images, return_tensors="pt").pixel_values
|
42 |
images = move_to_device_fn(images)
|
|
|
43 |
|
44 |
# temporarily change the mask ratio from default to the one specified
|
45 |
old_mask_ratio = self.crop_embedding_model.embeddings.config.mask_ratio
|
|
|
40 |
images = [np.array(image.convert("RGB")) for image in images]
|
41 |
images = self.processor(images, return_tensors="pt").pixel_values
|
42 |
images = move_to_device_fn(images)
|
43 |
+
images = images.to(self.dtype)
|
44 |
|
45 |
# temporarily change the mask ratio from default to the one specified
|
46 |
old_mask_ratio = self.crop_embedding_model.embeddings.config.mask_ratio
|