Spaces:
Paused
Paused
Update to use spaces.GPU
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
import random
|
| 4 |
-
|
| 5 |
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
import torch
|
|
@@ -22,7 +22,7 @@ gender_dict = {"ID_0": "male"}
|
|
| 22 |
MAX_SEED = np.iinfo(np.int32).max
|
| 23 |
MAX_IMAGE_SIZE = 512
|
| 24 |
|
| 25 |
-
|
| 26 |
def infer(
|
| 27 |
background,
|
| 28 |
pose,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
import random
|
| 4 |
+
import spaces # Uncomment if using ZeroGPU
|
| 5 |
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
import torch
|
|
|
|
| 22 |
MAX_SEED = np.iinfo(np.int32).max
|
| 23 |
MAX_IMAGE_SIZE = 512
|
| 24 |
|
| 25 |
+
@spaces.GPU # Uncomment if using ZeroGPU
|
| 26 |
def infer(
|
| 27 |
background,
|
| 28 |
pose,
|