RageshAntony commited on
Commit
d7e3825
·
verified ·
1 Parent(s): 3718c59

added according of settings

Browse files
Files changed (1) hide show
  1. check_app.py +50 -0
check_app.py CHANGED
@@ -1,5 +1,6 @@
1
  import spaces
2
  import torch
 
3
  from inspect import signature
4
  from diffusers import (
5
  FluxPipeline,
@@ -206,6 +207,55 @@ def main():
206
 
207
  prompt_text = gr.Textbox(label="Enter prompt")
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  for model_name, config in MODEL_CONFIGS.items():
210
  with gr.Tab(model_name):
211
  button = gr.Button(f"Run {model_name}")
 
1
  import spaces
2
  import torch
3
+ import random
4
  from inspect import signature
5
  from diffusers import (
6
  FluxPipeline,
 
207
 
208
  prompt_text = gr.Textbox(label="Enter prompt")
209
 
210
+ with gr.Accordion("Advanced Settings", open=False):
211
+ negative_prompt = gr.Text(
212
+ label="Negative prompt",
213
+ max_lines=1,
214
+ placeholder="Enter a negative prompt",
215
+ )
216
+
217
+ seed = gr.Slider(
218
+ label="Seed",
219
+ minimum=0,
220
+ maximum=MAX_SEED,
221
+ step=1,
222
+ value=0,
223
+ )
224
+
225
+ randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
226
+
227
+ with gr.Row():
228
+ width = gr.Slider(
229
+ label="Width",
230
+ minimum=512,
231
+ maximum=MAX_IMAGE_SIZE,
232
+ step=32,
233
+ value=1024,
234
+ )
235
+ height = gr.Slider(
236
+ label="Height",
237
+ minimum=512,
238
+ maximum=MAX_IMAGE_SIZE,
239
+ step=32,
240
+ value=1024,
241
+ )
242
+
243
+ with gr.Row():
244
+ guidance_scale = gr.Slider(
245
+ label="Guidance scale",
246
+ minimum=0.0,
247
+ maximum=7.5,
248
+ step=0.1,
249
+ value=4.5,
250
+ )
251
+ num_inference_steps = gr.Slider(
252
+ label="Number of inference steps",
253
+ minimum=1,
254
+ maximum=50,
255
+ step=1,
256
+ value=40,
257
+ )
258
+
259
  for model_name, config in MODEL_CONFIGS.items():
260
  with gr.Tab(model_name):
261
  button = gr.Button(f"Run {model_name}")