diff --git a/clip_retrieval/clip_inference/reader.py b/clip_retrieval/clip_inference/reader.py index e49aa4d..f9bc98a 100644 --- a/clip_retrieval/clip_inference/reader.py +++ b/clip_retrieval/clip_inference/reader.py @@ -194,7 +194,7 @@ def collate_fn(batch): shuffle=False, num_workers=num_prepro_workers, pin_memory=True, - prefetch_factor=2, + prefetch_factor=2 if num_prepro_workers>0 else None, collate_fn=collate_fn if input_format == "files" else None, ) return data