anzorq commited on
Commit
342c62c
1 Parent(s): 633e1e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ def inference(model, prompt, img, strength, guidance, steps, seed):
48
  else:
49
  return text_inference(model, prompt, guidance, steps, generator)
50
 
51
- def text_inference(model, prompt, guidance, steps, generator):
52
 
53
  global current_model
54
  global pipe
@@ -162,7 +162,7 @@ with gr.Blocks(css=css) as demo:
162
  [models[4], "portrait of a beautiful alyx vance half life", 10, 50],
163
  [models[5], "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7, 45],
164
  [models[4], "fantasy portrait painting, digital art", 4, 30],
165
- ], [model, prompt, guidance, steps, None], image_out, text_inference, cache_examples=torch.cuda.is_available())
166
  gr.HTML('''
167
  <div>
168
  <p>Model by <a href="https://huggingface.co/nitrosocke" target="_blank">@nitrosocke</a> ❤️</p>
 
48
  else:
49
  return text_inference(model, prompt, guidance, steps, generator)
50
 
51
+ def text_inference(model, prompt, guidance, steps, generator=None):
52
 
53
  global current_model
54
  global pipe
 
162
  [models[4], "portrait of a beautiful alyx vance half life", 10, 50],
163
  [models[5], "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7, 45],
164
  [models[4], "fantasy portrait painting, digital art", 4, 30],
165
+ ], [model, prompt, guidance, steps], image_out, text_inference, cache_examples=torch.cuda.is_available())
166
  gr.HTML('''
167
  <div>
168
  <p>Model by <a href="https://huggingface.co/nitrosocke" target="_blank">@nitrosocke</a> ❤️</p>