Spaces:
Build error
Build error
Update run/gradio_ootd.py
Browse files9 unmodified lines1011121314151619 unmodified lines363738394041215 unmodified lines2572582592609 unmodified linesPROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()sys.path.insert(0, str(PROJECT_ROOT))import timefrom preprocess.openpose.run_openpose import OpenPosefrom preprocess.humanparsing.run_parsing import Parsingfrom ootd.inference_ootd_hd import OOTDiffusionHD19 unmodified linesmodel_dc = os.path.join(example_path, 'model/model_8.png')garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):model_type = 'hd'category = 0 # 0:upperbody; 1:lowerbody; 2:dress215 unmodified linesips_dc = [vton_img_dc, garm_img_dc, category_dc, n_samples_dc, n_steps_dc, image_scale_dc, seed_dc]run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])block.launch(server_name='0.0.0.0', server_port=7865)9 unmodified lines10111213141519 unmodified lines35363738394041424344215 unmodified lines2602612622639 unmodified linesPROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()sys.path.insert(0, str(PROJECT_ROOT))from preprocess.openpose.run_openpose import OpenPosefrom preprocess.humanparsing.run_parsing import Parsingfrom ootd.inference_ootd_hd import OOTDiffusionHD19 unmodified linesmodel_dc = os.path.join(example_path, 'model/model_8.png')garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')import spaces@spaces.GPUdef process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):model_type = 'hd'category = 0 # 0:upperbody; 1:lowerbody; 2:dress215 unmodified linesips_dc = [vton_img_dc, garm_img_dc, category_dc, n_samples_dc, n_steps_dc, image_scale_dc, seed_dc]run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])block.launch()
run/gradio_ootd.py+5-2