Spaces:
Runtime error
Runtime error
Commit
·
0d4cf4b
1
Parent(s):
c0a41a5
Update app.py
Browse files
app.py
CHANGED
@@ -164,16 +164,17 @@ def start_tryon(person_img, pose_img, mask_img, cloth_img, garment_des, denoise_
|
|
164 |
if not isinstance(negative_prompt, List):
|
165 |
negative_prompt = [negative_prompt] * 1
|
166 |
with torch.inference_mode():
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
171 |
)= pipe.encode_prompt(
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
|
178 |
# Convert images to tensors for processing
|
179 |
pose_img_tensor = tensor_transfrom(pose_img).unsqueeze(0).to(device, torch.float16)
|
|
|
164 |
if not isinstance(negative_prompt, List):
|
165 |
negative_prompt = [negative_prompt] * 1
|
166 |
with torch.inference_mode():
|
167 |
+
(
|
168 |
+
prompt_embeds_cloth,
|
169 |
+
_,
|
170 |
+
_,
|
171 |
+
_,
|
172 |
)= pipe.encode_prompt(
|
173 |
+
prompt,
|
174 |
+
num_images_per_prompt=1,
|
175 |
+
do_classifier_free_guidance=False,
|
176 |
+
negative_prompt=negative_prompt,
|
177 |
+
)
|
178 |
|
179 |
# Convert images to tensors for processing
|
180 |
pose_img_tensor = tensor_transfrom(pose_img).unsqueeze(0).to(device, torch.float16)
|