Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
•
2137fdf
1
Parent(s):
82f75ce
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from torch import autocast
|
|
11 |
from safetensors import safe_open
|
12 |
from compel import Compel, ReturnedEmbeddingsType
|
13 |
from safetensors.torch import load_file
|
14 |
-
|
15 |
|
16 |
model_id = "aipicasso/emix-0-4-turbo"
|
17 |
auth_token=os.environ["ACCESS_TOKEN"]
|
@@ -55,7 +55,7 @@ def error_str(error, title="Error"):
|
|
55 |
return f"""#### {title}
|
56 |
{error}""" if error else ""
|
57 |
|
58 |
-
|
59 |
def inference(prompt, guidance, steps, seed=0, neg_prompt="", disable_auto_prompt_correction=False):
|
60 |
global pipe
|
61 |
|
@@ -110,7 +110,7 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,disable_auto_prompt_correctio
|
|
110 |
|
111 |
return prompt,neg_prompt
|
112 |
|
113 |
-
|
114 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
115 |
conditioning, pooled = compel([prompt, neg_prompt])
|
116 |
|
|
|
11 |
from safetensors import safe_open
|
12 |
from compel import Compel, ReturnedEmbeddingsType
|
13 |
from safetensors.torch import load_file
|
14 |
+
import spaces
|
15 |
|
16 |
model_id = "aipicasso/emix-0-4-turbo"
|
17 |
auth_token=os.environ["ACCESS_TOKEN"]
|
|
|
55 |
return f"""#### {title}
|
56 |
{error}""" if error else ""
|
57 |
|
58 |
+
@spaces.GPU
|
59 |
def inference(prompt, guidance, steps, seed=0, neg_prompt="", disable_auto_prompt_correction=False):
|
60 |
global pipe
|
61 |
|
|
|
110 |
|
111 |
return prompt,neg_prompt
|
112 |
|
113 |
+
#
|
114 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
115 |
conditioning, pooled = compel([prompt, neg_prompt])
|
116 |
|