Spaces:
Runtime error
Runtime error
Commit Β·
79061d6
1
Parent(s): b29f425
update: delete unused files
Browse files- app.py +0 -4
- short_necklace/necklace_10.png +0 -0
- short_necklace/necklace_13.png +0 -0
- short_necklace/necklace_14.png +0 -3
- short_necklace/necklace_2.png +0 -0
- short_necklace/necklace_3.png +0 -0
- short_necklace/necklace_4.png +0 -3
- short_necklace/necklace_5.png +0 -3
- short_necklace/necklace_6.png +0 -3
- short_necklace/necklace_7.png +0 -0
- short_necklace/necklace_9.png +0 -0
- without_necklace/person_1.png +0 -0
- without_necklace/person_2.png +0 -0
- without_necklace/person_3.png +0 -0
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import cv2
|
| 2 |
import torch
|
| 3 |
import gc
|
| 4 |
-
import os
|
| 5 |
import spaces
|
| 6 |
import gradio as gr
|
| 7 |
import numpy as np
|
|
@@ -12,9 +11,6 @@ from diffusers import StableDiffusionInpaintPipeline
|
|
| 12 |
|
| 13 |
class NecklaceTryOn:
|
| 14 |
def __init__(self):
|
| 15 |
-
self.choker_images = [Image.open(os.path.join("short_necklace", x)) for x in os.listdir("short_necklace")]
|
| 16 |
-
self.person_images = [Image.open(os.path.join("without_necklace", x)) for x in os.listdir("without_necklace")]
|
| 17 |
-
|
| 18 |
self.model_id = "stabilityai/stable-diffusion-2-inpainting"
|
| 19 |
self.pipeline = StableDiffusionInpaintPipeline.from_pretrained(
|
| 20 |
self.model_id, torch_dtype=torch.float16
|
|
|
|
| 1 |
import cv2
|
| 2 |
import torch
|
| 3 |
import gc
|
|
|
|
| 4 |
import spaces
|
| 5 |
import gradio as gr
|
| 6 |
import numpy as np
|
|
|
|
| 11 |
|
| 12 |
class NecklaceTryOn:
|
| 13 |
def __init__(self):
|
|
|
|
|
|
|
|
|
|
| 14 |
self.model_id = "stabilityai/stable-diffusion-2-inpainting"
|
| 15 |
self.pipeline = StableDiffusionInpaintPipeline.from_pretrained(
|
| 16 |
self.model_id, torch_dtype=torch.float16
|
short_necklace/necklace_10.png
DELETED
|
Binary file (859 kB)
|
|
|
short_necklace/necklace_13.png
DELETED
|
Binary file (978 kB)
|
|
|
short_necklace/necklace_14.png
DELETED
Git LFS Details
|
short_necklace/necklace_2.png
DELETED
|
Binary file (869 kB)
|
|
|
short_necklace/necklace_3.png
DELETED
|
Binary file (897 kB)
|
|
|
short_necklace/necklace_4.png
DELETED
Git LFS Details
|
short_necklace/necklace_5.png
DELETED
Git LFS Details
|
short_necklace/necklace_6.png
DELETED
Git LFS Details
|
short_necklace/necklace_7.png
DELETED
|
Binary file (822 kB)
|
|
|
short_necklace/necklace_9.png
DELETED
|
Binary file (841 kB)
|
|
|
without_necklace/person_1.png
DELETED
|
Binary file (988 kB)
|
|
|
without_necklace/person_2.png
DELETED
|
Binary file (986 kB)
|
|
|
without_necklace/person_3.png
DELETED
|
Binary file (955 kB)
|
|
|