Spaces:
Running
on
Zero
Running
on
Zero
one prompt only
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ pipeline.enable_model_cpu_offload()
|
|
24 |
pipeline.enable_vae_slicing()
|
25 |
|
26 |
@spaces.GPU(duration=120)
|
27 |
-
def run(ref_path, ref_style, ref_prompt, prompt1
|
28 |
# DDIM inversion
|
29 |
src_style = f"{ref_style}"
|
30 |
src_prompt = f"{ref_prompt}, {src_style}."
|
@@ -105,8 +105,6 @@ with gr.Blocks(css=css) as demo:
|
|
105 |
with gr.Group():
|
106 |
results = gr.Gallery()
|
107 |
prompt1 = gr.Textbox(label="Prompt1")
|
108 |
-
prompt2 = gr.Textbox(label="Prompt2")
|
109 |
-
prompt3 = gr.Textbox(label="Prompt3")
|
110 |
run_button = gr.Button("Submit")
|
111 |
|
112 |
gr.Examples(
|
@@ -116,14 +114,12 @@ with gr.Blocks(css=css) as demo:
|
|
116 |
"medieval painting",
|
117 |
"Man laying on bed",
|
118 |
"A man working on a laptop",
|
119 |
-
"A man eating pizza",
|
120 |
-
"A woman playing on saxophone"
|
121 |
]
|
122 |
],
|
123 |
fn=run,
|
124 |
inputs = [
|
125 |
ref_path, ref_style, ref_prompt,
|
126 |
-
prompt1
|
127 |
],
|
128 |
outputs=[results],
|
129 |
cache_examples=False
|
@@ -134,7 +130,7 @@ with gr.Blocks(css=css) as demo:
|
|
134 |
fn = run,
|
135 |
inputs = [
|
136 |
ref_path, ref_style, ref_prompt,
|
137 |
-
prompt1
|
138 |
],
|
139 |
outputs = [
|
140 |
results
|
|
|
24 |
pipeline.enable_vae_slicing()
|
25 |
|
26 |
@spaces.GPU(duration=120)
|
27 |
+
def run(ref_path, ref_style, ref_prompt, prompt1):
|
28 |
# DDIM inversion
|
29 |
src_style = f"{ref_style}"
|
30 |
src_prompt = f"{ref_prompt}, {src_style}."
|
|
|
105 |
with gr.Group():
|
106 |
results = gr.Gallery()
|
107 |
prompt1 = gr.Textbox(label="Prompt1")
|
|
|
|
|
108 |
run_button = gr.Button("Submit")
|
109 |
|
110 |
gr.Examples(
|
|
|
114 |
"medieval painting",
|
115 |
"Man laying on bed",
|
116 |
"A man working on a laptop",
|
|
|
|
|
117 |
]
|
118 |
],
|
119 |
fn=run,
|
120 |
inputs = [
|
121 |
ref_path, ref_style, ref_prompt,
|
122 |
+
prompt1
|
123 |
],
|
124 |
outputs=[results],
|
125 |
cache_examples=False
|
|
|
130 |
fn = run,
|
131 |
inputs = [
|
132 |
ref_path, ref_style, ref_prompt,
|
133 |
+
prompt1
|
134 |
],
|
135 |
outputs = [
|
136 |
results
|