Skip to content

Commit dc30adf

Browse files
committed
closes #273, crash on M1 machines
1 parent 0433b3d commit dc30adf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ldm/simplet2i.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def process_image(image,seed):
279279
self._set_sampler()
280280

281281
tic = time.time()
282-
torch.cuda.torch.cuda.reset_peak_memory_stats()
282+
torch.cuda.reset_peak_memory_stats() if self.device == 'cuda' else None
283283
results = list()
284284

285285
try:

scripts/dream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def main():
8888
tic = time.time()
8989
t2i.load_model()
9090
print(
91-
f'model loaded in', '%4.2fs' % (time.time() - tic)
91+
f'>> model loaded in', '%4.2fs' % (time.time() - tic)
9292
)
9393

9494
if not infile:

0 commit comments

Comments
 (0)