Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ with gr.Blocks() as demo:
|
|
48 |
controlnet_scale = gr.Number(label="ControlNet Conditioning Scale", value=1.0, interactive=True)
|
49 |
prompt = gr.Text(label="Prompt", value="a photo of a cat", interactive=True)
|
50 |
seed = gr.Number(label="Seed", value=3413, interactive=True)
|
51 |
-
scribble = gr.
|
52 |
btn = gr.Button(value="run")
|
53 |
with gr.Column():
|
54 |
output = gr.Gallery(height=768)
|
@@ -59,7 +59,7 @@ with gr.Blocks() as demo:
|
|
59 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.float16), timer("inference"):
|
60 |
return pipe(
|
61 |
prompt=[prompt]*num_images,
|
62 |
-
image=[scribble]*num_images,
|
63 |
generator=torch.Generator().manual_seed(int(seed)),
|
64 |
num_inference_steps=steps,
|
65 |
guidance_scale=0.,
|
|
|
48 |
controlnet_scale = gr.Number(label="ControlNet Conditioning Scale", value=1.0, interactive=True)
|
49 |
prompt = gr.Text(label="Prompt", value="a photo of a cat", interactive=True)
|
50 |
seed = gr.Number(label="Seed", value=3413, interactive=True)
|
51 |
+
scribble = gr.ImageEditor(height=768, width=768, type="pil")
|
52 |
btn = gr.Button(value="run")
|
53 |
with gr.Column():
|
54 |
output = gr.Gallery(height=768)
|
|
|
59 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.float16), timer("inference"):
|
60 |
return pipe(
|
61 |
prompt=[prompt]*num_images,
|
62 |
+
image=[scribble.resize((512, 512))]*num_images,
|
63 |
generator=torch.Generator().manual_seed(int(seed)),
|
64 |
num_inference_steps=steps,
|
65 |
guidance_scale=0.,
|