Skip to content

Commit fe01688

Browse files
jianwensongfracape
authored andcommitted
[fix] input_augmentation_bypass for remote inference
1 parent 2242f8a commit fe01688

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compressai_vision/datasets/image.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,13 @@ def __init__(self, root, dataset_name, imgs_folder, **kwargs):
263263

264264
if self.input_agumentation_bypass:
265265
emptyAugList = AugmentationList([])
266-
self._org_mapper_func.augmentations = emptyAugList
267266
mapper.augmentations = emptyAugList
268267

268+
if hasattr(self._org_mapper_func, "_obj"):
269+
self._org_mapper_func._obj.augmentations = emptyAugList
270+
else:
271+
self._org_mapper_func.augmentations = emptyAugList
272+
269273
self.mapDataset = MapDataset(_dataset, mapper)
270274

271275
metaData = MetadataCatalog.get(dataset_name)

0 commit comments

Comments
 (0)