Spaces:
Paused
Paused
sijdsohs
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ DEVICE = "cuda"
|
|
13 |
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
15 |
FIXED_DIMENSION = 900
|
16 |
-
|
17 |
FIXED_DIMENSION = (FIXED_DIMENSION // 16) * 16
|
18 |
|
19 |
SYSTEM_PROMPT = r"""This two-panel split-frame image showcases a furniture in as a product shot versus styled in a room.
|
@@ -22,8 +22,8 @@ SYSTEM_PROMPT = r"""This two-panel split-frame image showcases a furniture in as
|
|
22 |
|
23 |
if not torch.cuda.is_available():
|
24 |
|
25 |
-
def _dummy_pipe(image:
|
26 |
-
return {"images": image}
|
27 |
|
28 |
pipe = _dummy_pipe
|
29 |
else:
|
@@ -48,7 +48,7 @@ else:
|
|
48 |
pipe.to(DEVICE)
|
49 |
|
50 |
|
51 |
-
@spaces.GPU
|
52 |
def infer(
|
53 |
furniture_image: Image.Image,
|
54 |
room_image: EditorValue,
|
|
|
13 |
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
15 |
FIXED_DIMENSION = 900
|
16 |
+
FIXED_DIMENSION = 720
|
17 |
FIXED_DIMENSION = (FIXED_DIMENSION // 16) * 16
|
18 |
|
19 |
SYSTEM_PROMPT = r"""This two-panel split-frame image showcases a furniture in as a product shot versus styled in a room.
|
|
|
22 |
|
23 |
if not torch.cuda.is_available():
|
24 |
|
25 |
+
def _dummy_pipe(image: Image.Image, *args, **kwargs): # noqa: ARG001
|
26 |
+
return {"images": [image]}
|
27 |
|
28 |
pipe = _dummy_pipe
|
29 |
else:
|
|
|
48 |
pipe.to(DEVICE)
|
49 |
|
50 |
|
51 |
+
@spaces.GPU(duration=120)
|
52 |
def infer(
|
53 |
furniture_image: Image.Image,
|
54 |
room_image: EditorValue,
|