Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ print(f"Absolute path for allowed_paths: {absolute_image_dir}")
|
|
42 |
|
43 |
|
44 |
# --- Function to query the API and return the generated image and download link ---
|
45 |
-
def query(prompt, negative_prompt, steps=
|
46 |
# Renamed `strength` input as it wasn't used in the payload for txt2img
|
47 |
# Removed `sampler` input as it wasn't used in payload
|
48 |
|
@@ -250,8 +250,8 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', css=css) as app:
|
|
250 |
with gr.Row():
|
251 |
width = gr.Slider(label="Width", value=1024, minimum=64, maximum=1216, step=32)
|
252 |
height = gr.Slider(label="Height", value=1024, minimum=64, maximum=1216, step=32)
|
253 |
-
steps = gr.Slider(label="Sampling steps", value=
|
254 |
-
cfg = gr.Slider(label="CFG Scale (guidance_scale)", value=
|
255 |
# Removed 'strength' slider as it wasn't used in query payload
|
256 |
# strength = gr.Slider(label="Strength (Primarily for Img2Img)", value=0.7, minimum=0, maximum=1, step=0.001, info="Note: Strength is mainly used in Image-to-Image generation.")
|
257 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1, info="Set to -1 for random seed")
|
|
|
42 |
|
43 |
|
44 |
# --- Function to query the API and return the generated image and download link ---
|
45 |
+
def query(prompt, negative_prompt, steps=4, cfg_scale=0, seed=-1, width=1024, height=1024):
|
46 |
# Renamed `strength` input as it wasn't used in the payload for txt2img
|
47 |
# Removed `sampler` input as it wasn't used in payload
|
48 |
|
|
|
250 |
with gr.Row():
|
251 |
width = gr.Slider(label="Width", value=1024, minimum=64, maximum=1216, step=32)
|
252 |
height = gr.Slider(label="Height", value=1024, minimum=64, maximum=1216, step=32)
|
253 |
+
steps = gr.Slider(label="Sampling steps", value=4, minimum=1, maximum=30, step=1)
|
254 |
+
cfg = gr.Slider(label="CFG Scale (guidance_scale)", value=0, minimum=0, maximum=20, step=1)
|
255 |
# Removed 'strength' slider as it wasn't used in query payload
|
256 |
# strength = gr.Slider(label="Strength (Primarily for Img2Img)", value=0.7, minimum=0, maximum=1, step=0.001, info="Note: Strength is mainly used in Image-to-Image generation.")
|
257 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1, info="Set to -1 for random seed")
|