Spaces:
Runtime error
Runtime error
Commit
·
d61123d
1
Parent(s):
7fb327a
enable zerogpu
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import numpy as np
|
|
3 |
import random
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
|
6 |
-
|
7 |
from diffusers import FluxPipeline
|
8 |
import torch
|
9 |
|
@@ -27,7 +27,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
27 |
MAX_IMAGE_SIZE = 1024
|
28 |
|
29 |
|
30 |
-
|
31 |
def generate_images(prompt, seed, steps):
|
32 |
pipe.to("cuda")
|
33 |
pruned_pipe.to("cuda")
|
|
|
3 |
import random
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
|
6 |
+
import spaces # [uncomment to use ZeroGPU]
|
7 |
from diffusers import FluxPipeline
|
8 |
import torch
|
9 |
|
|
|
27 |
MAX_IMAGE_SIZE = 1024
|
28 |
|
29 |
|
30 |
+
@spaces.GPU
|
31 |
def generate_images(prompt, seed, steps):
|
32 |
pipe.to("cuda")
|
33 |
pruned_pipe.to("cuda")
|