multimodalart HF staff commited on
Commit
4a1f895
1 Parent(s): 6342ca2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ def run(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_lay
27
  negative_prompt = negative_prompt.strip() if negative_prompt and negative_prompt.strip() else None
28
  print(f"Initial seed for prompt `{prompt}`", seed)
29
  if(randomize_seed):
30
- seed = random.randint(0, 999999999999999)
31
 
32
  if not prompt and not negative_prompt:
33
  guidance_scale = 0.0
@@ -62,7 +62,7 @@ with gr.Blocks(css=css, theme=theme) as demo:
62
  pag_scale = gr.Number(label="Pag Scale", value=3.0)
63
  pag_layers = gr.Dropdown(label="Model layers to apply Pag to", info="mid is the one used on the paper, up and down blocks seem unstable", choices=["up", "mid", "down"], multiselect=True, value="mid")
64
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
65
- seed = gr.Slider(minimum=1, maximum=999999999999999, step=1, randomize=True)
66
  gr.Examples(fn=run, examples=[" ", "an insect robot preparing a delicious meal, anime style", "a photo of a group of friends at an amusement park"], inputs=prompt, outputs=[output, seed], cache_examples=True)
67
  gr.on(
68
  triggers=[
 
27
  negative_prompt = negative_prompt.strip() if negative_prompt and negative_prompt.strip() else None
28
  print(f"Initial seed for prompt `{prompt}`", seed)
29
  if(randomize_seed):
30
+ seed = random.randint(0, 9007199254740991)
31
 
32
  if not prompt and not negative_prompt:
33
  guidance_scale = 0.0
 
62
  pag_scale = gr.Number(label="Pag Scale", value=3.0)
63
  pag_layers = gr.Dropdown(label="Model layers to apply Pag to", info="mid is the one used on the paper, up and down blocks seem unstable", choices=["up", "mid", "down"], multiselect=True, value="mid")
64
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
65
+ seed = gr.Slider(minimum=1, maximum=9007199254740991, step=1, randomize=True)
66
  gr.Examples(fn=run, examples=[" ", "an insect robot preparing a delicious meal, anime style", "a photo of a group of friends at an amusement park"], inputs=prompt, outputs=[output, seed], cache_examples=True)
67
  gr.on(
68
  triggers=[