You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB
Python

from modelscope.hub.snapshot_download import snapshot_download
import argparse
def process(args):
style = args.style
print('download %s model'%style)
if style == "anime":
model_dir = snapshot_download('damo/cv_unet_person-image-cartoon_compound-models', cache_dir='.')
elif style == "3d":
model_dir = snapshot_download('damo/cv_unet_person-image-cartoon-3d_compound-models', cache_dir='.')
elif style == "handdrawn":
model_dir = snapshot_download('damo/cv_unet_person-image-cartoon-handdrawn_compound-models', cache_dir='.')
elif style == "sketch":
model_dir = snapshot_download('damo/cv_unet_person-image-cartoon-sketch_compound-models', cache_dir='.')
elif style == "artstyle":
model_dir = snapshot_download('damo/cv_unet_person-image-cartoon-artstyle_compound-models', cache_dir='.')
else:
print('no such style %s'% style)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--style', type=str, default='anime')
args = parser.parse_args()
process(args)