Spaces:
Sleeping
Sleeping
Conditional K Value
Browse files
app.py
CHANGED
|
@@ -53,8 +53,10 @@ def depth_to_normal(depth):
|
|
| 53 |
# CORE PROCESSING FUNCTION
|
| 54 |
# ===============================
|
| 55 |
def _process_saree_core(base_image: Image.Image, pattern_image: Image.Image, k: int = 5):
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
# Prepare tensor
|
| 60 |
img_resized = img_pil.resize((384, 384))
|
|
|
|
| 53 |
# CORE PROCESSING FUNCTION
|
| 54 |
# ===============================
|
| 55 |
def _process_saree_core(base_image: Image.Image, pattern_image: Image.Image, k: int = 5):
|
| 56 |
+
# Auto-set k for BASE-BOTTOM images
|
| 57 |
+
filename = getattr(base_image, "filename", "") or ""
|
| 58 |
+
if any(name in filename for name in ["BASE-BOTTOM-1.png"]):
|
| 59 |
+
k = 8
|
| 60 |
|
| 61 |
# Prepare tensor
|
| 62 |
img_resized = img_pil.resize((384, 384))
|