Spaces:
Runtime error
Runtime error
Update min_dalle/min_dalle.py
Browse files- min_dalle/min_dalle.py +5 -2
min_dalle/min_dalle.py
CHANGED
@@ -251,6 +251,9 @@ class MinDalle:
|
|
251 |
prev_tokens=image_tokens[i],
|
252 |
token_index=token_indices[[i]]
|
253 |
)
|
|
|
|
|
|
|
254 |
|
255 |
|
256 |
with torch.cuda.amp.autocast(dtype=torch.float16):
|
@@ -260,8 +263,8 @@ class MinDalle:
|
|
260 |
is_seamless=is_seamless,
|
261 |
is_verbose=is_verbose
|
262 |
)
|
263 |
-
|
264 |
-
|
265 |
|
266 |
|
267 |
|
|
|
251 |
prev_tokens=image_tokens[i],
|
252 |
token_index=token_indices[[i]]
|
253 |
)
|
254 |
+
|
255 |
+
del attention_state
|
256 |
+
del image_tokens
|
257 |
|
258 |
|
259 |
with torch.cuda.amp.autocast(dtype=torch.float16):
|
|
|
263 |
is_seamless=is_seamless,
|
264 |
is_verbose=is_verbose
|
265 |
)
|
266 |
+
|
267 |
+
|
268 |
|
269 |
|
270 |
|