Closed johnowhitaker closed 2 years ago
The notebook (https://github.com/google/evojax/blob/main/examples/notebooks/AbstractPainting01.ipynb) does the following to turn the saved frames into a GIF:
import glob import IPython frames = [] imgs = glob.glob("AbstractPainting01_canvas_record.*.png") for file in imgs: new_frame = Image.open(file) frames.append(new_frame) frames[0].save('AbstractPainting01_final.gif', save_all=True, append_images=frames, optimize=True, duration=200, loop=0)
The resulting GIF doesn't show the frames in order, because glob returns results in an arbitrary order (probably whatever order files appear in the filesystem).
Fix: imgs = sorted(glob.glob("AbstractPainting01_canvas_record.*.png"))
imgs = sorted(glob.glob("AbstractPainting01_canvas_record.*.png"))
I'd submit a pull request but I don't have 8 A100s lying around so it'd take a while to re-run the example :)
@johnowhitaker thanks for pointing it out! I'll have a quick fix running on multiple GPUs :-D
fixed!
The notebook (https://github.com/google/evojax/blob/main/examples/notebooks/AbstractPainting01.ipynb) does the following to turn the saved frames into a GIF:
The resulting GIF doesn't show the frames in order, because glob returns results in an arbitrary order (probably whatever order files appear in the filesystem).
Fix:
imgs = sorted(glob.glob("AbstractPainting01_canvas_record.*.png"))
I'd submit a pull request but I don't have 8 A100s lying around so it'd take a while to re-run the example :)