|
import os |
|
import glob |
|
import argparse |
|
|
|
parser = argparse.ArgumentParser() |
|
parser.add_argument('--gpu', default=0, type=int) |
|
args = parser.parse_args() |
|
|
|
prompts = [ |
|
('strawberry', 'a ripe strawberry'), |
|
('cactus_pot', 'a small saguaro cactus planted in a clay pot'), |
|
('hamburger', 'a delicious hamburger'), |
|
('icecream', 'an icecream'), |
|
('tulip', 'a blue tulip'), |
|
('pineapple', 'a ripe pineapple'), |
|
('goblet', 'a golden goblet'), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
for name, prompt in prompts: |
|
print(f'======== processing {name} ========') |
|
|
|
os.system(f'CUDA_VISIBLE_DEVICES={args.gpu} python main.py --config configs/text.yaml prompt="{prompt}" save_path={name}') |
|
|
|
os.system(f'CUDA_VISIBLE_DEVICES={args.gpu} python main2.py --config configs/text.yaml prompt="{prompt}" save_path={name}') |
|
|
|
mesh_path = os.path.join('logs', f'{name}.obj') |
|
os.makedirs('videos', exist_ok=True) |
|
os.system(f'python -m kiui.render {mesh_path} --save_video videos/{name}.mp4 --wogui') |