Spaces:
Running
on
Zero
Running
on
Zero
Only generate 2
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ else:
|
|
48 |
pipe.to(DEVICE)
|
49 |
|
50 |
|
51 |
-
@spaces.GPU(duration=
|
52 |
def infer(
|
53 |
furniture_image: Image.Image,
|
54 |
room_image: EditorValue,
|
@@ -135,7 +135,7 @@ def infer(
|
|
135 |
width=FIXED_DIMENSION * 2,
|
136 |
num_inference_steps=num_inference_steps,
|
137 |
guidance_scale=guidance_scale,
|
138 |
-
num_images_per_prompt=
|
139 |
generator=torch.Generator("cpu").manual_seed(seed),
|
140 |
)["images"]
|
141 |
|
@@ -171,7 +171,7 @@ with gr.Blocks(css=css) as demo:
|
|
171 |
type="pil",
|
172 |
sources=["upload"],
|
173 |
image_mode="RGB",
|
174 |
-
height=
|
175 |
)
|
176 |
room_image = gr.ImageEditor(
|
177 |
label="Room Image - Draw mask for inpainting",
|
@@ -181,7 +181,7 @@ with gr.Blocks(css=css) as demo:
|
|
181 |
layers=False,
|
182 |
crop_size="1:1",
|
183 |
brush=gr.Brush(colors=["#FFFFFF"], color_mode="fixed"),
|
184 |
-
height=
|
185 |
)
|
186 |
prompt = gr.Text(
|
187 |
label="Prompt",
|
@@ -197,7 +197,7 @@ with gr.Blocks(css=css) as demo:
|
|
197 |
format="png",
|
198 |
show_label=False,
|
199 |
columns=2,
|
200 |
-
height=
|
201 |
)
|
202 |
|
203 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
48 |
pipe.to(DEVICE)
|
49 |
|
50 |
|
51 |
+
@spaces.GPU(duration=150)
|
52 |
def infer(
|
53 |
furniture_image: Image.Image,
|
54 |
room_image: EditorValue,
|
|
|
135 |
width=FIXED_DIMENSION * 2,
|
136 |
num_inference_steps=num_inference_steps,
|
137 |
guidance_scale=guidance_scale,
|
138 |
+
num_images_per_prompt=2,
|
139 |
generator=torch.Generator("cpu").manual_seed(seed),
|
140 |
)["images"]
|
141 |
|
|
|
171 |
type="pil",
|
172 |
sources=["upload"],
|
173 |
image_mode="RGB",
|
174 |
+
height=400,
|
175 |
)
|
176 |
room_image = gr.ImageEditor(
|
177 |
label="Room Image - Draw mask for inpainting",
|
|
|
181 |
layers=False,
|
182 |
crop_size="1:1",
|
183 |
brush=gr.Brush(colors=["#FFFFFF"], color_mode="fixed"),
|
184 |
+
height=400,
|
185 |
)
|
186 |
prompt = gr.Text(
|
187 |
label="Prompt",
|
|
|
197 |
format="png",
|
198 |
show_label=False,
|
199 |
columns=2,
|
200 |
+
height=700,
|
201 |
)
|
202 |
|
203 |
with gr.Accordion("Advanced Settings", open=False):
|