Open xcharleslin opened 1 year ago
Minimum repro:
import torch from min_dalle import MinDalle from concurrent.futures import ThreadPoolExecutor USE_GPU = True def f(text: str, root: str): return MinDalle( models_root=f'./{root}', dtype=torch.float32, device="cuda", is_mega=False, is_reusable=True, ).generate_image( text, seed=-1, grid_size=1, is_seamless=False, temperature=1, top_k=256, supercondition_factor=32, ) # No threading works f("hello", "root1") # Threading does not work tpe = ThreadPoolExecutor() tpe.submit(f, "hello2", "root2").result() # GPU OOMs here
The last line fails with OutOfMemoryError: CUDA out of memory.
OutOfMemoryError: CUDA out of memory.
Minimum repro:
The last line fails with
OutOfMemoryError: CUDA out of memory.
(click for full stack trace)
```python using device cuda downloading tokenizer params intializing TextTokenizer downloading encoder params initializing DalleBartEncoder downloading decoder params initializing DalleBartDecoder downloading detokenizer params initializing VQGanDetokenizer --------------------------------------------------------------------------- OutOfMemoryError Traceback (most recent call last)