Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,11 @@ def gen_fn(model_str, prompt, neg_prompt=None):
|
|
42 |
noise = str(randint(0, 9999))
|
43 |
if neg_prompt is None:
|
44 |
neg_prompt = 'negative prompt'
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
|
47 |
def make_me():
|
48 |
with gr.Row():
|
|
|
42 |
noise = str(randint(0, 9999))
|
43 |
if neg_prompt is None:
|
44 |
neg_prompt = 'negative prompt'
|
45 |
+
model_func = models_load[model_str]
|
46 |
+
if hasattr(model_func, 'accepts_negative_prompt') and model_func.accepts_negative_prompt:
|
47 |
+
return model_func(prompt=prompt, noise=noise, negative_prompt=neg_prompt)
|
48 |
+
else:
|
49 |
+
return model_func(prompt=prompt, noise=noise)
|
50 |
|
51 |
def make_me():
|
52 |
with gr.Row():
|