Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
| 77 |
image_bytes = response.content
|
| 78 |
image = Image.open(io.BytesIO(image_bytes))
|
| 79 |
print(f'\033[1mGeneration {key} completed!\033[0m ({prompt})')
|
| 80 |
-
return image
|
| 81 |
except Exception as e:
|
| 82 |
print(f"Error when trying to open the image: {e}")
|
| 83 |
return None
|
|
@@ -194,10 +194,7 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
| 194 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
| 195 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1) # Setting the seed to -1 will make it random
|
| 196 |
method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ 2S a Karras", "DPM2 a Karras", "DPM2 Karras", "DPM++ SDE Karras", "DEIS", "LMS", "DPM Adaptive", "DPM++ 2M", "DPM2 Ancestral", "DPM++ S", "DPM++ SDE", "DDPM", "DPM Fast", "dpmpp_2s_ancestral", "Euler", "Euler CFG PP", "Euler a", "Euler Ancestral", "Euler+beta", "Heun", "Heun PP2", "DDIM", "LMS Karras", "PLMS", "UniPC", "UniPC BH2"])
|
| 197 |
-
|
| 198 |
-
with gr.Row():
|
| 199 |
-
with gr.Accordion("🫘Seed", open=False):
|
| 200 |
-
seed_output = gr.Textbox(label="Seed Used", elem_id="seed-output")
|
| 201 |
|
| 202 |
# Add a button to trigger the image generation
|
| 203 |
with gr.Row():
|
|
|
|
| 77 |
image_bytes = response.content
|
| 78 |
image = Image.open(io.BytesIO(image_bytes))
|
| 79 |
print(f'\033[1mGeneration {key} completed!\033[0m ({prompt})')
|
| 80 |
+
return image
|
| 81 |
except Exception as e:
|
| 82 |
print(f"Error when trying to open the image: {e}")
|
| 83 |
return None
|
|
|
|
| 194 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
| 195 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1) # Setting the seed to -1 will make it random
|
| 196 |
method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ 2S a Karras", "DPM2 a Karras", "DPM2 Karras", "DPM++ SDE Karras", "DEIS", "LMS", "DPM Adaptive", "DPM++ 2M", "DPM2 Ancestral", "DPM++ S", "DPM++ SDE", "DDPM", "DPM Fast", "dpmpp_2s_ancestral", "Euler", "Euler CFG PP", "Euler a", "Euler Ancestral", "Euler+beta", "Heun", "Heun PP2", "DDIM", "LMS Karras", "PLMS", "UniPC", "UniPC BH2"])
|
| 197 |
+
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
# Add a button to trigger the image generation
|
| 200 |
with gr.Row():
|