Spaces:
Runtime error
Runtime error
Update min_dalle/min_dalle.py
Browse files- min_dalle/min_dalle.py +3 -1
min_dalle/min_dalle.py
CHANGED
|
@@ -242,7 +242,7 @@ class MinDalle:
|
|
| 242 |
|
| 243 |
torch.cuda.empty_cache()
|
| 244 |
|
| 245 |
-
time.sleep(0.5)
|
| 246 |
|
| 247 |
with torch.cuda.amp.autocast(dtype=self.dtype):
|
| 248 |
image_tokens[i + 1], attention_state = self.decoder.forward(
|
|
@@ -253,6 +253,8 @@ class MinDalle:
|
|
| 253 |
prev_tokens=image_tokens[i],
|
| 254 |
token_index=token_indices[[i]]
|
| 255 |
)
|
|
|
|
|
|
|
| 256 |
|
| 257 |
with torch.cuda.amp.autocast(dtype=torch.float16):
|
| 258 |
if ((i + 1) % 16 == 0 and progressive_outputs) or i + 1 == 256:
|
|
|
|
| 242 |
|
| 243 |
torch.cuda.empty_cache()
|
| 244 |
|
| 245 |
+
#time.sleep(0.5)
|
| 246 |
|
| 247 |
with torch.cuda.amp.autocast(dtype=self.dtype):
|
| 248 |
image_tokens[i + 1], attention_state = self.decoder.forward(
|
|
|
|
| 253 |
prev_tokens=image_tokens[i],
|
| 254 |
token_index=token_indices[[i]]
|
| 255 |
)
|
| 256 |
+
|
| 257 |
+
torch.cuda.empty_cache()
|
| 258 |
|
| 259 |
with torch.cuda.amp.autocast(dtype=torch.float16):
|
| 260 |
if ((i + 1) % 16 == 0 and progressive_outputs) or i + 1 == 256:
|