Skip to content

Commit

Permalink
add prefetch
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarx committed Oct 9, 2022
1 parent eaeec5d commit 48672e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Video_Killed_The_Radio_Star_Defusion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@
"from subprocess import Popen, PIPE\n",
"\n",
"from omegaconf import OmegaConf\n",
"from prefetch import background\n",
"from tqdm.autonotebook import tqdm\n",
"\n",
"from vktrs.tsp import (\n",
Expand Down Expand Up @@ -1087,6 +1088,7 @@
"#####################################\n",
"\n",
"# helper function for readability\n",
"@background(max_prefetch=-1)\n",
"def process_sequence(idx):\n",
" im_paths = get_image_sequence(idx, root)\n",
" images = [Image.open(fp) for fp in im_paths]\n",
Expand Down

0 comments on commit 48672e6

Please sign in to comment.