JMalott commited on
Commit
50d3570
·
1 Parent(s): 96a62e8

Update min_dalle/min_dalle.py

Browse files
Files changed (1) hide show
  1. min_dalle/min_dalle.py +2 -1
min_dalle/min_dalle.py CHANGED
@@ -239,7 +239,8 @@ class MinDalle:
239
  break
240
  st.session_state.bar.progress(i/IMAGE_TOKEN_COUNT)
241
 
242
- torch.cuda.empty_cache()
 
243
  with torch.cuda.amp.autocast(dtype=self.dtype):
244
  image_tokens[i + 1], attention_state = self.decoder.forward(
245
  settings=settings,
 
239
  break
240
  st.session_state.bar.progress(i/IMAGE_TOKEN_COUNT)
241
 
242
+ torch.cuda.empty_cache()
243
+ torch.cpu.empty_cache()
244
  with torch.cuda.amp.autocast(dtype=self.dtype):
245
  image_tokens[i + 1], attention_state = self.decoder.forward(
246
  settings=settings,