Update app.py
Browse files
app.py
CHANGED
@@ -66,6 +66,8 @@ UNet_Encoder = UNet2DConditionModel_ref.from_pretrained(base_path, subfolder="un
|
|
66 |
parsing_model = Parsing(0)
|
67 |
openpose_model = OpenPose(0)
|
68 |
|
|
|
|
|
69 |
# Préparation du pipeline Tryon
|
70 |
pipe = TryonPipeline.from_pretrained(
|
71 |
base_path,
|
@@ -132,7 +134,6 @@ def save_image(img):
|
|
132 |
img.save(unique_name, format="WEBP", lossless=True)
|
133 |
return unique_name
|
134 |
|
135 |
-
@spaces.GPU
|
136 |
def start_tryon(dict, garm_img, garment_des, is_checked, is_checked_crop, denoise_steps, seed, categorie = 'upper_body'):
|
137 |
device = "cuda"
|
138 |
openpose_model.preprocessor.body_estimation.model.to(device)
|
@@ -339,7 +340,6 @@ def get_image(image_id):
|
|
339 |
|
340 |
|
341 |
|
342 |
-
@spaces.GPU
|
343 |
def generate_mask(human_img, categorie='upper_body'):
|
344 |
device = "cuda"
|
345 |
openpose_model.preprocessor.body_estimation.model.to(device)
|
|
|
66 |
parsing_model = Parsing(0)
|
67 |
openpose_model = OpenPose(0)
|
68 |
|
69 |
+
@spaces.GPU
|
70 |
+
|
71 |
# Préparation du pipeline Tryon
|
72 |
pipe = TryonPipeline.from_pretrained(
|
73 |
base_path,
|
|
|
134 |
img.save(unique_name, format="WEBP", lossless=True)
|
135 |
return unique_name
|
136 |
|
|
|
137 |
def start_tryon(dict, garm_img, garment_des, is_checked, is_checked_crop, denoise_steps, seed, categorie = 'upper_body'):
|
138 |
device = "cuda"
|
139 |
openpose_model.preprocessor.body_estimation.model.to(device)
|
|
|
340 |
|
341 |
|
342 |
|
|
|
343 |
def generate_mask(human_img, categorie='upper_body'):
|
344 |
device = "cuda"
|
345 |
openpose_model.preprocessor.body_estimation.model.to(device)
|