Spaces:
Runtime error
Runtime error
Update run/gradio_ootd.py
Browse files- run/gradio_ootd.py +1 -5
run/gradio_ootd.py
CHANGED
|
@@ -15,10 +15,6 @@ from preprocess.humanparsing.run_parsing import Parsing
|
|
| 15 |
from ootd.inference_ootd_hd import OOTDiffusionHD
|
| 16 |
from ootd.inference_ootd_dc import OOTDiffusionDC
|
| 17 |
|
| 18 |
-
from huggingface_hub import hf_hub_download
|
| 19 |
-
|
| 20 |
-
hf_hub_download(repo_id="levihsu/OOTDiffusion", filename="checkpoints", local_dir="./")
|
| 21 |
-
|
| 22 |
|
| 23 |
openpose_model_hd = OpenPose(0)
|
| 24 |
parsing_model_hd = Parsing(0)
|
|
@@ -32,13 +28,13 @@ ootd_model_dc = OOTDiffusionDC(1)
|
|
| 32 |
category_dict = ['upperbody', 'lowerbody', 'dress']
|
| 33 |
category_dict_utils = ['upper_body', 'lower_body', 'dresses']
|
| 34 |
|
| 35 |
-
|
| 36 |
example_path = os.path.join(os.path.dirname(__file__), 'examples')
|
| 37 |
model_hd = os.path.join(example_path, 'model/model_1.png')
|
| 38 |
garment_hd = os.path.join(example_path, 'garment/03244_00.jpg')
|
| 39 |
model_dc = os.path.join(example_path, 'model/model_8.png')
|
| 40 |
garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')
|
| 41 |
|
|
|
|
| 42 |
def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
|
| 43 |
model_type = 'hd'
|
| 44 |
category = 0 # 0:upperbody; 1:lowerbody; 2:dress
|
|
|
|
| 15 |
from ootd.inference_ootd_hd import OOTDiffusionHD
|
| 16 |
from ootd.inference_ootd_dc import OOTDiffusionDC
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
openpose_model_hd = OpenPose(0)
|
| 20 |
parsing_model_hd = Parsing(0)
|
|
|
|
| 28 |
category_dict = ['upperbody', 'lowerbody', 'dress']
|
| 29 |
category_dict_utils = ['upper_body', 'lower_body', 'dresses']
|
| 30 |
|
|
|
|
| 31 |
example_path = os.path.join(os.path.dirname(__file__), 'examples')
|
| 32 |
model_hd = os.path.join(example_path, 'model/model_1.png')
|
| 33 |
garment_hd = os.path.join(example_path, 'garment/03244_00.jpg')
|
| 34 |
model_dc = os.path.join(example_path, 'model/model_8.png')
|
| 35 |
garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')
|
| 36 |
|
| 37 | |
| 38 |
def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
|
| 39 |
model_type = 'hd'
|
| 40 |
category = 0 # 0:upperbody; 1:lowerbody; 2:dress
|