Spaces:
Running
Running
Commit
•
7ab9afa
1
Parent(s):
d8dcbe8
chore: Update inpainting pipeline configuration and parameters
Browse files- configs/inpainting.yaml +12 -37
- scripts/api_utils.py +0 -8
- scripts/config.py +0 -14
configs/inpainting.yaml
CHANGED
@@ -1,37 +1,12 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
roi_scale : 0.5
|
14 |
-
>>>>>>> bb1cf42 (chore: Update inpainting pipeline configuration and parameters)
|
15 |
-
=======
|
16 |
-
roi_scale : 0.9
|
17 |
-
>>>>>>> cceaa9e (chore: Update roi_scale in inpainting.yaml and add gradio UI for SDXL LORA Inpainting)
|
18 |
-
strength : 0.6
|
19 |
-
guidance_scale : 7
|
20 |
-
num_inference_steps : 150
|
21 |
-
output_path : '../outputs'
|
22 |
-
|
23 |
-
=======
|
24 |
-
segmentation_model : 'facebook/sam-vit-large'
|
25 |
-
detection_model : 'yolov8l'
|
26 |
-
model : 'kandinsky-community/kandinsky-2-2-decoder-inpaint'
|
27 |
-
target_width : 1920
|
28 |
-
target_height : 1080
|
29 |
-
prompt : 'product is on the kitchen floor , ultrarealistic lighting , commercial, award , winning photography'
|
30 |
-
negative_prompt : 'low resolution , bad resolution'
|
31 |
-
roi_scale : 0.5
|
32 |
-
strength : 0.7
|
33 |
-
guidance_scale : 7.5
|
34 |
-
num_inference_steps : 600
|
35 |
-
output_path : '../outputs'
|
36 |
-
>>>>>>> a817fb6 (chore: Update .gitignore and add new files for inpainting pipeline)
|
37 |
-
|
|
|
1 |
+
segmentation_model: 'facebook/sam-vit-large'
|
2 |
+
detection_model: 'yolov8l'
|
3 |
+
model: 'kandinsky-community/kandinsky-2-2-decoder-inpaint'
|
4 |
+
target_width: 1920
|
5 |
+
target_height: 1080
|
6 |
+
prompt: 'product is on the kitchen floor , ultrarealistic lighting , commercial, award , winning photography'
|
7 |
+
negative_prompt: 'low resolution , bad resolution'
|
8 |
+
roi_scale: 0.5
|
9 |
+
strength: 0.7
|
10 |
+
guidance_scale: 7.5
|
11 |
+
num_inference_steps: 600
|
12 |
+
output_path: '../outputs'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scripts/api_utils.py
CHANGED
@@ -6,15 +6,11 @@ from PIL import Image, ImageOps
|
|
6 |
from config import SEGMENTATION_MODEL_NAME, DETECTION_MODEL_NAME
|
7 |
from diffusers.utils import load_image
|
8 |
import gc
|
9 |
-
<<<<<<< HEAD:scripts/api_utils.py
|
10 |
from s3_manager import S3ManagerService
|
11 |
import io
|
12 |
from io import BytesIO
|
13 |
import base64
|
14 |
import uuid
|
15 |
-
=======
|
16 |
-
|
17 |
-
>>>>>>> a817fb6 (chore: Update .gitignore and add new files for inpainting pipeline):scripts/utils.py
|
18 |
|
19 |
|
20 |
|
@@ -165,11 +161,7 @@ def pil_to_s3_json(image: Image.Image, file_name) -> dict:
|
|
165 |
|
166 |
|
167 |
if __name__ == "__main__":
|
168 |
-
<<<<<<< HEAD:scripts/api_utils.py
|
169 |
augmenter = ImageAugmentation(target_width=1024, target_height=1024, roi_scale=0.5)
|
170 |
-
=======
|
171 |
-
augmenter = ImageAugmentation(target_width=2560, target_height=1440, roi_scale=0.7)
|
172 |
-
>>>>>>> a817fb6 (chore: Update .gitignore and add new files for inpainting pipeline):scripts/utils.py
|
173 |
image_path = "../sample_data/example3.jpg"
|
174 |
image = Image.open(image_path)
|
175 |
extended_image = augmenter.extend_image(image)
|
|
|
6 |
from config import SEGMENTATION_MODEL_NAME, DETECTION_MODEL_NAME
|
7 |
from diffusers.utils import load_image
|
8 |
import gc
|
|
|
9 |
from s3_manager import S3ManagerService
|
10 |
import io
|
11 |
from io import BytesIO
|
12 |
import base64
|
13 |
import uuid
|
|
|
|
|
|
|
14 |
|
15 |
|
16 |
|
|
|
161 |
|
162 |
|
163 |
if __name__ == "__main__":
|
|
|
164 |
augmenter = ImageAugmentation(target_width=1024, target_height=1024, roi_scale=0.5)
|
|
|
|
|
|
|
165 |
image_path = "../sample_data/example3.jpg"
|
166 |
image = Image.open(image_path)
|
167 |
extended_image = augmenter.extend_image(image)
|
scripts/config.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
<<<<<<< HEAD
|
2 |
|
3 |
MODEL_NAME:str="stabilityai/stable-diffusion-xl-base-1.0"
|
4 |
ADAPTER_NAME:str = "VikramSingh178/sdxl-lora-finetune-product-caption"
|
@@ -73,16 +72,3 @@ class Config:
|
|
73 |
self.debug_loss = False
|
74 |
|
75 |
|
76 |
-
=======
|
77 |
-
LOGS_DIR = '../logs'
|
78 |
-
Dataset_Name = "AlekseyKorshuk/product-photography-all"
|
79 |
-
DATA_DIR = '../data'
|
80 |
-
Project_Name = 'product_placement_api'
|
81 |
-
entity = 'vikramxd'
|
82 |
-
image_dir = '../sample_data'
|
83 |
-
mask_dir = '../masks'
|
84 |
-
controlnet_adapter_model_name= 'lllyasviel/control_v11p_sd15_inpaint'
|
85 |
-
controlnet_base_model_name = "runwayml/stable-diffusion-inpainting"
|
86 |
-
kandinsky_model_name = 'kandinsky-community/kandinsky-2-2-decoder-inpaint'
|
87 |
-
video_model_name = 'stabilityai/stable-video-diffusion-img2vid-xt'
|
88 |
-
>>>>>>> 83cb224 (Update image and video pipelines)
|
|
|
|
|
1 |
|
2 |
MODEL_NAME:str="stabilityai/stable-diffusion-xl-base-1.0"
|
3 |
ADAPTER_NAME:str = "VikramSingh178/sdxl-lora-finetune-product-caption"
|
|
|
72 |
self.debug_loss = False
|
73 |
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|