alfredplpl
commited on
Commit
·
263cee5
1
Parent(s):
ff91787
Update app.py
Browse files
app.py
CHANGED
@@ -39,10 +39,10 @@ def inference(prompt, guidance, steps, width=512, height=512, seed=0, img=None,
|
|
39 |
prompt = f"{prefix} {prompt}" if auto_prefix else prompt
|
40 |
|
41 |
try:
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
except Exception as e:
|
47 |
return None, error_str(e)
|
48 |
|
|
|
39 |
prompt = f"{prefix} {prompt}" if auto_prefix else prompt
|
40 |
|
41 |
try:
|
42 |
+
if img is not None:
|
43 |
+
return img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator), None
|
44 |
+
else:
|
45 |
+
return txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator), None
|
46 |
except Exception as e:
|
47 |
return None, error_str(e)
|
48 |
|