Skip to content

Commit 40f4bd2

Browse files
author
Dazhi Zhong
committed
fix tqdm
1 parent b47b8a0 commit 40f4bd2

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Diff for: cfg_sample.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from torchvision import transforms
1515
from torchvision.transforms import functional as TF
1616
from torchvision.utils import save_image
17+
from tqdm.auto import trange
1718

1819
from CLIP import clip
1920
from diffusion import get_model, get_models, sampling, utils, download_model
@@ -27,9 +28,6 @@ def isnotebook():
2728
IS_NOTEBOOK = isnotebook()
2829
if IS_NOTEBOOK:
2930
from IPython import display
30-
from tqdm.notebook import trange
31-
else:
32-
from tqdm import trange
3331

3432

3533
MODULE_DIR = Path(__file__).resolve().parent

Diff for: clip_sample.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from torchvision import transforms
1515
from torchvision.transforms import functional as TF
1616
from torchvision.utils import save_image
17+
from tqdm.auto import trange
1718

1819
from CLIP import clip
1920
from diffusion import get_model, get_models, sampling, utils, download_model
@@ -28,9 +29,6 @@ def isnotebook():
2829
IS_NOTEBOOK = isnotebook()
2930
if IS_NOTEBOOK:
3031
from IPython import display
31-
from tqdm.notebook import trange
32-
else:
33-
from tqdm import trange
3432

3533

3634

0 commit comments

Comments
 (0)