From 034da1e5cbb2b5a65fd1289912294748ab3f544a Mon Sep 17 00:00:00 2001 From: hknguyen20 <20nguyen.hk@vinuni.edu.vn> Date: Wed, 31 Jan 2024 13:05:55 +0700 Subject: [PATCH] Update prefetch_factor in clip_inference/reader.py --- clip_retrieval/clip_inference/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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