Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
•
c564be9
1
Parent(s):
1051b3b
Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,7 @@ def error_str(error, title="Error"):
|
|
41 |
return f"""#### {title}
|
42 |
{error}""" if error else ""
|
43 |
|
|
|
44 |
def inference(prompt, guidance, steps, seed=0, neg_prompt="", disable_auto_prompt_correction=False):
|
45 |
generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
|
46 |
|
@@ -94,7 +95,7 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,disable_auto_prompt_correctio
|
|
94 |
|
95 |
return prompt,neg_prompt
|
96 |
|
97 |
-
|
98 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
99 |
conditioning, pooled = compel(prompt)
|
100 |
neg_conditioning, neg_pooled = compel(neg_prompt)
|
|
|
41 |
return f"""#### {title}
|
42 |
{error}""" if error else ""
|
43 |
|
44 |
+
@spaces.GPU
|
45 |
def inference(prompt, guidance, steps, seed=0, neg_prompt="", disable_auto_prompt_correction=False):
|
46 |
generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
|
47 |
|
|
|
95 |
|
96 |
return prompt,neg_prompt
|
97 |
|
98 |
+
|
99 |
def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
100 |
conditioning, pooled = compel(prompt)
|
101 |
neg_conditioning, neg_pooled = compel(neg_prompt)
|