Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -182,7 +182,7 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
|
|
| 182 |
# Extract the images
|
| 183 |
with torch.cuda.amp.autocast():
|
| 184 |
with torch.no_grad():
|
| 185 |
-
prompt = "model is wearing " + garment_des
|
| 186 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
| 187 |
with torch.inference_mode():
|
| 188 |
(
|
|
@@ -197,7 +197,7 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
|
|
| 197 |
negative_prompt=negative_prompt,
|
| 198 |
)
|
| 199 |
|
| 200 |
-
prompt = "a photo of " + garment_des
|
| 201 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
| 202 |
if not isinstance(prompt, List):
|
| 203 |
prompt = [prompt] * 1
|
|
@@ -313,7 +313,6 @@ with image_blocks as demo:
|
|
| 313 |
seed = gr.Number(label="Seed", minimum=-1, maximum=2147483647, step=1, value=42)
|
| 314 |
|
| 315 |
|
| 316 |
-
prompt = prompt + ' draw hand in same position.'
|
| 317 |
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed, category], outputs=[image_out,masked_img], api_name='tryon')
|
| 318 |
|
| 319 |
|
|
|
|
| 182 |
# Extract the images
|
| 183 |
with torch.cuda.amp.autocast():
|
| 184 |
with torch.no_grad():
|
| 185 |
+
prompt = "model is wearing " + garment_des + "Keep hands same, dont change their position"
|
| 186 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
| 187 |
with torch.inference_mode():
|
| 188 |
(
|
|
|
|
| 197 |
negative_prompt=negative_prompt,
|
| 198 |
)
|
| 199 |
|
| 200 |
+
prompt = "a photo of " + garment_des + "Keep hands same, dont change their position"
|
| 201 |
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
| 202 |
if not isinstance(prompt, List):
|
| 203 |
prompt = [prompt] * 1
|
|
|
|
| 313 |
seed = gr.Number(label="Seed", minimum=-1, maximum=2147483647, step=1, value=42)
|
| 314 |
|
| 315 |
|
|
|
|
| 316 |
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed, category], outputs=[image_out,masked_img], api_name='tryon')
|
| 317 |
|
| 318 |
|