Spaces:
Sleeping
Sleeping
rynmurdock
commited on
Commit
•
c173485
1
Parent(s):
23ed04a
Update app.py
Browse files
app.py
CHANGED
@@ -135,7 +135,7 @@ def generate(in_im_embs):
|
|
135 |
im_emb, _ = pipe.encode_image(
|
136 |
output.frames[0][len(output.frames[0])//2], DEVICE, 1, output_hidden_state
|
137 |
)
|
138 |
-
im_emb = im_emb.detach().to('cpu')
|
139 |
|
140 |
nsfw = maybe_nsfw(output.frames[0][len(output.frames[0])//2])
|
141 |
|
@@ -467,7 +467,7 @@ def encode_space(x):
|
|
467 |
im_emb, _ = pipe.encode_image(
|
468 |
image, DEVICE, 1, output_hidden_state
|
469 |
)
|
470 |
-
return im_emb.detach().to('cpu')
|
471 |
|
472 |
# prep our calibration prompts
|
473 |
for im in [
|
|
|
135 |
im_emb, _ = pipe.encode_image(
|
136 |
output.frames[0][len(output.frames[0])//2], DEVICE, 1, output_hidden_state
|
137 |
)
|
138 |
+
im_emb = im_emb.detach().to('cpu').to(torch.float32)
|
139 |
|
140 |
nsfw = maybe_nsfw(output.frames[0][len(output.frames[0])//2])
|
141 |
|
|
|
467 |
im_emb, _ = pipe.encode_image(
|
468 |
image, DEVICE, 1, output_hidden_state
|
469 |
)
|
470 |
+
return im_emb.detach().to('cpu').to(torch.float32)
|
471 |
|
472 |
# prep our calibration prompts
|
473 |
for im in [
|