Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ from safetensors.torch import load_file, save_file
|
|
27 |
from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler, DDIMScheduler, StableDiffusionXLPipeline, UNet2DConditionModel, AutoencoderKL, UNet3DConditionModel
|
28 |
#import jax
|
29 |
#import jax.numpy as jnp
|
30 |
-
from numba import cuda, njit as cpu, void, int64 as int, float64 as float, boolean as bool
|
31 |
from numba.cuda import jit as gpu, grid
|
32 |
from numba.types import unicode_type as string
|
33 |
from PIL.Image import fromarray as array2image
|
@@ -170,7 +170,7 @@ def generate_random_string(length):
|
|
170 |
characters = str(ascii_letters + digits)
|
171 |
return ''.join(random.choice(characters) for _ in range(length))
|
172 |
|
173 |
-
@gpu(void())
|
174 |
def calc(img,p1,p2,motion):
|
175 |
global out_pipe
|
176 |
global last_motion
|
|
|
27 |
from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler, DDIMScheduler, StableDiffusionXLPipeline, UNet2DConditionModel, AutoencoderKL, UNet3DConditionModel
|
28 |
#import jax
|
29 |
#import jax.numpy as jnp
|
30 |
+
from numba import cuda, njit as cpu, void, int64 as int, float64 as float, boolean as bool, unit8 as rgb
|
31 |
from numba.cuda import jit as gpu, grid
|
32 |
from numba.types import unicode_type as string
|
33 |
from PIL.Image import fromarray as array2image
|
|
|
170 |
characters = str(ascii_letters + digits)
|
171 |
return ''.join(random.choice(characters) for _ in range(length))
|
172 |
|
173 |
+
@gpu(void( rgb[:], string[:], string[:], string[:] ))
|
174 |
def calc(img,p1,p2,motion):
|
175 |
global out_pipe
|
176 |
global last_motion
|