Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
|
43 |
|
44 |
def inference(model, img, strength, prompt, guidance, steps, seed):
|
45 |
|
46 |
-
generator = torch.manual_seed(seed) if seed != 0 else None
|
47 |
|
48 |
if img is not None:
|
49 |
return img_inference(model, prompt, img, strength, guidance, steps, generator)
|
@@ -164,7 +164,7 @@ with gr.Blocks(css=css) as demo:
|
|
164 |
[models[4], "portrait of a beautiful alyx vance half life", 10, 50],
|
165 |
[models[5], "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7, 45],
|
166 |
[models[4], "fantasy portrait painting, digital art", 4, 30],
|
167 |
-
], [model, prompt, guidance, steps], image_out, text_inference, cache_examples=
|
168 |
gr.Markdown('''
|
169 |
Models by [@nitrosocke](https://huggingface.co/nitrosocke), [@Helixngc7293](https://twitter.com/DGSpitzer) and others. ❤️<br>
|
170 |
Space by: [![Twitter Follow](https://img.shields.io/twitter/follow/hahahahohohe?label=%40anzorq&style=social)](https://twitter.com/hahahahohohe)
|
|
|
43 |
|
44 |
def inference(model, img, strength, prompt, guidance, steps, seed):
|
45 |
|
46 |
+
generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
|
47 |
|
48 |
if img is not None:
|
49 |
return img_inference(model, prompt, img, strength, guidance, steps, generator)
|
|
|
164 |
[models[4], "portrait of a beautiful alyx vance half life", 10, 50],
|
165 |
[models[5], "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7, 45],
|
166 |
[models[4], "fantasy portrait painting, digital art", 4, 30],
|
167 |
+
], [model, prompt, guidance, steps], image_out, text_inference, cache_examples=torch.cuda.is_available())
|
168 |
gr.Markdown('''
|
169 |
Models by [@nitrosocke](https://huggingface.co/nitrosocke), [@Helixngc7293](https://twitter.com/DGSpitzer) and others. ❤️<br>
|
170 |
Space by: [![Twitter Follow](https://img.shields.io/twitter/follow/hahahahohohe?label=%40anzorq&style=social)](https://twitter.com/hahahahohohe)
|