Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,7 @@ def run(
|
|
95 |
num_steps=25,
|
96 |
guidance_scale=5,
|
97 |
adapter_conditioning_scale=0.8,
|
|
|
98 |
seed=0,
|
99 |
) -> PIL.Image.Image:
|
100 |
image = image.convert("RGB").resize((1024, 1024))
|
@@ -112,6 +113,7 @@ def run(
|
|
112 |
generator=generator,
|
113 |
guidance_scale=guidance_scale,
|
114 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
|
|
115 |
).images[0]
|
116 |
return out
|
117 |
|
@@ -126,10 +128,9 @@ with gr.Blocks() as demo:
|
|
126 |
type="pil",
|
127 |
image_mode="1",
|
128 |
invert_colors=True,
|
129 |
-
|
130 |
brush_radius=4,
|
131 |
-
height=
|
132 |
-
width=1024,
|
133 |
)
|
134 |
prompt = gr.Textbox(label="Prompt")
|
135 |
run_button = gr.Button("Run")
|
@@ -157,11 +158,18 @@ with gr.Blocks() as demo:
|
|
157 |
value=5,
|
158 |
)
|
159 |
adapter_conditioning_scale = gr.Slider(
|
160 |
-
label="Adapter Conditioning
|
161 |
minimum=0.5,
|
162 |
maximum=1,
|
163 |
step=0.1,
|
164 |
-
value=.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
)
|
166 |
seed = gr.Slider(
|
167 |
label="Seed",
|
@@ -182,6 +190,7 @@ with gr.Blocks() as demo:
|
|
182 |
num_steps,
|
183 |
guidance_scale,
|
184 |
adapter_conditioning_scale,
|
|
|
185 |
seed,
|
186 |
]
|
187 |
prompt.submit(
|
|
|
95 |
num_steps=25,
|
96 |
guidance_scale=5,
|
97 |
adapter_conditioning_scale=0.8,
|
98 |
+
cond_tau=0.8,
|
99 |
seed=0,
|
100 |
) -> PIL.Image.Image:
|
101 |
image = image.convert("RGB").resize((1024, 1024))
|
|
|
113 |
generator=generator,
|
114 |
guidance_scale=guidance_scale,
|
115 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
116 |
+
cond_tau=cond_tau,
|
117 |
).images[0]
|
118 |
return out
|
119 |
|
|
|
128 |
type="pil",
|
129 |
image_mode="1",
|
130 |
invert_colors=True,
|
131 |
+
shape=(1024, 1024),
|
132 |
brush_radius=4,
|
133 |
+
height=600,
|
|
|
134 |
)
|
135 |
prompt = gr.Textbox(label="Prompt")
|
136 |
run_button = gr.Button("Run")
|
|
|
158 |
value=5,
|
159 |
)
|
160 |
adapter_conditioning_scale = gr.Slider(
|
161 |
+
label="Adapter Conditioning Scale",
|
162 |
minimum=0.5,
|
163 |
maximum=1,
|
164 |
step=0.1,
|
165 |
+
value=.8,
|
166 |
+
)
|
167 |
+
cond_tau = gr.Slider(
|
168 |
+
label="Fraction of timesteps for which adapter should be applied",
|
169 |
+
minimum=0.5,
|
170 |
+
maximum=1,
|
171 |
+
step=0.1,
|
172 |
+
value=.8,
|
173 |
)
|
174 |
seed = gr.Slider(
|
175 |
label="Seed",
|
|
|
190 |
num_steps,
|
191 |
guidance_scale,
|
192 |
adapter_conditioning_scale,
|
193 |
+
cond_tau,
|
194 |
seed,
|
195 |
]
|
196 |
prompt.submit(
|