Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,11 +24,10 @@ def create_img(prompt :str, number_output_requested: int) -> list:
|
|
| 24 |
revision="fp16",
|
| 25 |
torch_dtype=torch.float16,
|
| 26 |
use_auth_token=AUTH_TOKEN)
|
| 27 |
-
|
| 28 |
prompt = [prompt] * number_output_requested
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
output_paths = save_images(images)
|
| 32 |
return output_paths
|
| 33 |
|
| 34 |
diffusers_app = gr.Interface(
|
|
|
|
| 24 |
revision="fp16",
|
| 25 |
torch_dtype=torch.float16,
|
| 26 |
use_auth_token=AUTH_TOKEN)
|
| 27 |
+
generator.to("cpu")
|
| 28 |
prompt = [prompt] * number_output_requested
|
| 29 |
+
images = generator(prompt).images
|
| 30 |
+
output_paths = save_images(images)
|
|
|
|
| 31 |
return output_paths
|
| 32 |
|
| 33 |
diffusers_app = gr.Interface(
|