Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,11 @@ def edit(editor, target_prompt):
|
|
36 |
raise gr.Error("Set inputs before editing.")
|
37 |
return editor.edit(target_prompt)
|
38 |
|
39 |
-
examples = [
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
]
|
44 |
|
45 |
# css = """
|
46 |
# #col-container-1 {
|
@@ -67,7 +67,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
67 |
""")
|
68 |
editor_state = gr.State()
|
69 |
|
70 |
-
|
71 |
def set_pipe(input_image, description_prompt, edit_guidance_scale, num_inference_steps=4,
|
72 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
73 |
config = RunConfig(num_inference_steps=num_inference_steps,
|
@@ -78,7 +78,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
78 |
description_prompt, config, device,
|
79 |
[rnri_iterations, rnri_alpha, rnri_lr]), "Input has set!"
|
80 |
|
81 |
-
|
82 |
with gr.Row():
|
83 |
with gr.Column(elem_id="col-container-1"):
|
84 |
with gr.Row():
|
|
|
36 |
raise gr.Error("Set inputs before editing.")
|
37 |
return editor.edit(target_prompt)
|
38 |
|
39 |
+
# examples = [
|
40 |
+
# "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
|
41 |
+
# "An astronaut riding a green horse",
|
42 |
+
# "A delicious ceviche cheesecake slice",
|
43 |
+
# ]
|
44 |
|
45 |
# css = """
|
46 |
# #col-container-1 {
|
|
|
67 |
""")
|
68 |
editor_state = gr.State()
|
69 |
|
70 |
+
@spaces.GPU
|
71 |
def set_pipe(input_image, description_prompt, edit_guidance_scale, num_inference_steps=4,
|
72 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
73 |
config = RunConfig(num_inference_steps=num_inference_steps,
|
|
|
78 |
description_prompt, config, device,
|
79 |
[rnri_iterations, rnri_alpha, rnri_lr]), "Input has set!"
|
80 |
|
81 |
+
gr.Markdown(f"""running on {power_device}""")
|
82 |
with gr.Row():
|
83 |
with gr.Column(elem_id="col-container-1"):
|
84 |
with gr.Row():
|