Spaces:
Sleeping
Sleeping
rynmurdock
commited on
Commit
•
383d2cb
1
Parent(s):
ba4c90c
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ from transformers import CLIPVisionModelWithProjection
|
|
55 |
import uuid
|
56 |
import av
|
57 |
|
58 |
-
def
|
59 |
print('Saving')
|
60 |
container = av.open(file_name, mode="w")
|
61 |
|
@@ -79,13 +79,13 @@ def av_write_video(file_name, images, fps=17):
|
|
79 |
container.close()
|
80 |
print('Saved')
|
81 |
|
82 |
-
def write_video(file_name, images, fps=15):
|
83 |
-
print('Saving')
|
84 |
-
writer = imageio.get_writer(file_name, fps=fps)
|
85 |
-
for im in images:
|
86 |
-
writer.append_data(np.array(im))
|
87 |
-
writer.close()
|
88 |
-
print('Saved')
|
89 |
|
90 |
|
91 |
image_encoder = CLIPVisionModelWithProjection.from_pretrained("h94/IP-Adapter", subfolder="sdxl_models/image_encoder", torch_dtype=dtype).to(DEVICE)
|
|
|
55 |
import uuid
|
56 |
import av
|
57 |
|
58 |
+
def write_video(file_name, images, fps=17):
|
59 |
print('Saving')
|
60 |
container = av.open(file_name, mode="w")
|
61 |
|
|
|
79 |
container.close()
|
80 |
print('Saved')
|
81 |
|
82 |
+
#def write_video(file_name, images, fps=15):
|
83 |
+
# print('Saving')
|
84 |
+
# writer = imageio.get_writer(file_name, fps=fps)
|
85 |
+
# for im in images:
|
86 |
+
# writer.append_data(np.array(im))
|
87 |
+
# writer.close()
|
88 |
+
# print('Saved')
|
89 |
|
90 |
|
91 |
image_encoder = CLIPVisionModelWithProjection.from_pretrained("h94/IP-Adapter", subfolder="sdxl_models/image_encoder", torch_dtype=dtype).to(DEVICE)
|