fantasyfish/dreamgaussian
0
1import os2import glob3import argparse4 5parser = argparse.ArgumentParser()6parser.add_argument('--gpu', default=0, type=int)7args = parser.parse_args()8 9prompts = [10 ('strawberry', 'a ripe strawberry'),11 ('cactus_pot', 'a small saguaro cactus planted in a clay pot'),12 ('hamburger', 'a delicious hamburger'),13 ('icecream', 'an icecream'),14 ('tulip', 'a blue tulip'),15 ('pineapple', 'a ripe pineapple'),16 ('goblet', 'a golden goblet'),17 # ('squitopus', 'a squirrel-octopus hybrid'),18 # ('astronaut', 'Michelangelo style statue of an astronaut'),19 # ('teddy_bear', 'a teddy bear'),20 # ('corgi_nurse', 'a plush toy of a corgi nurse'),21 # ('teapot', 'a blue and white porcelain teapot'),22 # ('skull', "a human skull"),23 # ('penguin', 'a penguin'),24 # ('campfire', 'a campfire'),25 # ('donut', 'a donut with pink icing'),26 # ('cupcake', 'a birthday cupcake'),27 # ('pie', 'shepherds pie'),28 # ('cone', 'a traffic cone'),29 # ('schoolbus', 'a schoolbus'),30 # ('avocado_chair', 'a chair that looks like an avocado'),31 # ('glasses', 'a pair of sunglasses')32 # ('potion', 'a bottle of green potion'),33 # ('chalice', 'a delicate chalice'),34]35 36for name, prompt in prompts:37 print(f'======== processing {name} ========')38 # first stage39 os.system(f'CUDA_VISIBLE_DEVICES={args.gpu} python main.py --config configs/text.yaml prompt="{prompt}" save_path={name}')40 # second stage41 os.system(f'CUDA_VISIBLE_DEVICES={args.gpu} python main2.py --config configs/text.yaml prompt="{prompt}" save_path={name}')42 # export video43 mesh_path = os.path.join('logs', f'{name}.obj')44 os.makedirs('videos', exist_ok=True)45 os.system(f'python -m kiui.render {mesh_path} --save_video videos/{name}.mp4 --wogui')