Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,10 @@ def infer(init_img, prompt, negative_prompt, seed, randomize_seed, width, height
|
|
41 |
|
42 |
if randomize_seed:
|
43 |
seed = random.randint(0, MAX_SEED)
|
44 |
-
|
|
|
|
|
|
|
45 |
generator = torch.Generator().manual_seed(seed)
|
46 |
|
47 |
image = pipe(
|
@@ -85,7 +88,7 @@ with gr.Blocks(css=css) as demo:
|
|
85 |
|
86 |
|
87 |
with gr.Row():
|
88 |
-
init_img = gr.Image()
|
89 |
|
90 |
with gr.Row():
|
91 |
|
|
|
41 |
|
42 |
if randomize_seed:
|
43 |
seed = random.randint(0, MAX_SEED)
|
44 |
+
|
45 |
+
init_img = Image.open(init_img).convert("RGB")
|
46 |
+
init_image.thumbnail((768, 768))
|
47 |
+
|
48 |
generator = torch.Generator().manual_seed(seed)
|
49 |
|
50 |
image = pipe(
|
|
|
88 |
|
89 |
|
90 |
with gr.Row():
|
91 |
+
init_img = gr.Image(type="pil")
|
92 |
|
93 |
with gr.Row():
|
94 |
|