Uthar commited on
Commit
0398bb7
1 Parent(s): 9617fa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -65,8 +65,13 @@ async def infer(model_str, prompt, nprompt="", height=0, width=0, steps=0, cfg=0
65
  if steps > 0: kwargs["num_inference_steps"] = steps
66
  if cfg > 0: cfg = kwargs["guidance_scale"] = cfg
67
 
68
- if seed == -1: theSeed = randomize_seed() : kwargs["seed"] = theSeed
69
- else: kwargs["seed"] = seed
 
 
 
 
 
70
  task = asyncio.create_task(asyncio.to_thread(models_load[model_str].fn, prompt=prompt, negative_prompt=nprompt, **kwargs, token=HF_TOKEN))
71
  await asyncio.sleep(0)
72
  try:
 
65
  if steps > 0: kwargs["num_inference_steps"] = steps
66
  if cfg > 0: cfg = kwargs["guidance_scale"] = cfg
67
 
68
+ if seed == -1:
69
+ theSeed = randomize_seed()
70
+ kwargs["seed"] = theSeed
71
+ else:
72
+ kwargs["seed"] = seed
73
+ theSeed = seed
74
+
75
  task = asyncio.create_task(asyncio.to_thread(models_load[model_str].fn, prompt=prompt, negative_prompt=nprompt, **kwargs, token=HF_TOKEN))
76
  await asyncio.sleep(0)
77
  try: