added torch_gc() which calls both cuda.empty_cache() and cuda.ipc_collect() called before and after generation
Grid file named with seed and prompt, output as jpg