Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -114,8 +114,8 @@ pipe.unet.fuse_qkv_projections()
|
|
114 |
#pipe.enable_free_init(method="gaussian", use_fast_sampling=True)
|
115 |
|
116 |
pipe.to(device=DEVICE)
|
117 |
-
pipe.unet = torch.compile(pipe.unet)
|
118 |
-
pipe.vae = torch.compile(pipe.vae)
|
119 |
|
120 |
@spaces.GPU(duration=20)
|
121 |
def generate_gpu(in_im_embs):
|
@@ -131,12 +131,7 @@ def generate_gpu(in_im_embs):
|
|
131 |
im_emb = im_emb.detach().to('cpu').to(torch.float32)
|
132 |
return output, im_emb
|
133 |
|
134 |
-
im_embs = torch.zeros(1, 1, 1, 1280, device=DEVICE, dtype=dtype)
|
135 |
-
generate_gpu(im_embs)
|
136 |
-
generate_gpu(im_embs)
|
137 |
-
|
138 |
def generate(in_im_embs):
|
139 |
-
|
140 |
output, im_emb = generate_gpu(in_im_embs)
|
141 |
nsfw = maybe_nsfw(output.frames[0][len(output.frames[0])//2])
|
142 |
|
|
|
114 |
#pipe.enable_free_init(method="gaussian", use_fast_sampling=True)
|
115 |
|
116 |
pipe.to(device=DEVICE)
|
117 |
+
#pipe.unet = torch.compile(pipe.unet)
|
118 |
+
#pipe.vae = torch.compile(pipe.vae)
|
119 |
|
120 |
@spaces.GPU(duration=20)
|
121 |
def generate_gpu(in_im_embs):
|
|
|
131 |
im_emb = im_emb.detach().to('cpu').to(torch.float32)
|
132 |
return output, im_emb
|
133 |
|
|
|
|
|
|
|
|
|
134 |
def generate(in_im_embs):
|
|
|
135 |
output, im_emb = generate_gpu(in_im_embs)
|
136 |
nsfw = maybe_nsfw(output.frames[0][len(output.frames[0])//2])
|
137 |
|