Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,10 +23,10 @@ import jax
|
|
| 23 |
import jax.numpy as jnp
|
| 24 |
|
| 25 |
last_motion=None
|
| 26 |
-
fps=
|
| 27 |
-
time=
|
| 28 |
-
width=
|
| 29 |
-
height=
|
| 30 |
device = "cuda"
|
| 31 |
dtype = torch.float16
|
| 32 |
result=[]
|
|
@@ -34,8 +34,8 @@ step = 30
|
|
| 34 |
accu=7.5
|
| 35 |
#repo = "ByteDance/AnimateDiff-Lightning"
|
| 36 |
#ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
| 37 |
-
|
| 38 |
-
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
| 39 |
#vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to(device, dtype=dtype)
|
| 40 |
#unet = UNet2DConditionModel.from_config("emilianJR/epiCRealism",subfolder="unet").to(device, dtype).load_state_dict(load_file(hf_hub_download("emilianJR/epiCRealism", "unet/diffusion_pytorch_model.safetensors"), device=device), strict=False)
|
| 41 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
|
@@ -130,7 +130,7 @@ def generate_random_string(length):
|
|
| 130 |
characters = string.ascii_letters + string.digits
|
| 131 |
return ''.join(random.choice(characters) for _ in range(length))
|
| 132 |
|
| 133 |
-
@spaces.GPU(duration=
|
| 134 |
def Piper(image,positive,negative,motion):
|
| 135 |
global last_motion
|
| 136 |
global ip_loaded
|
|
|
|
| 23 |
import jax.numpy as jnp
|
| 24 |
|
| 25 |
last_motion=None
|
| 26 |
+
fps=14
|
| 27 |
+
time=1
|
| 28 |
+
width=448
|
| 29 |
+
height=448
|
| 30 |
device = "cuda"
|
| 31 |
dtype = torch.float16
|
| 32 |
result=[]
|
|
|
|
| 34 |
accu=7.5
|
| 35 |
#repo = "ByteDance/AnimateDiff-Lightning"
|
| 36 |
#ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
| 37 |
+
base = "emilianJR/epiCRealism"
|
| 38 |
+
#base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
| 39 |
#vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to(device, dtype=dtype)
|
| 40 |
#unet = UNet2DConditionModel.from_config("emilianJR/epiCRealism",subfolder="unet").to(device, dtype).load_state_dict(load_file(hf_hub_download("emilianJR/epiCRealism", "unet/diffusion_pytorch_model.safetensors"), device=device), strict=False)
|
| 41 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
|
|
|
| 130 |
characters = string.ascii_letters + string.digits
|
| 131 |
return ''.join(random.choice(characters) for _ in range(length))
|
| 132 |
|
| 133 |
+
@spaces.GPU(duration=85)
|
| 134 |
def Piper(image,positive,negative,motion):
|
| 135 |
global last_motion
|
| 136 |
global ip_loaded
|