Spaces:
Running
on
Zero
Running
on
Zero
increased the gpu limit, added profile picture in the return
Browse files
app.py
CHANGED
@@ -177,7 +177,7 @@ from nodes import NODE_CLASS_MAPPINGS
|
|
177 |
# model_management.load_models_gpu(valid_models)
|
178 |
|
179 |
#Run ComfyUI Workflow
|
180 |
-
@spaces.GPU(duration=
|
181 |
def generate_video(positive_prompt, num_frames, input_image):
|
182 |
|
183 |
print("Positive Prompt:", positive_prompt)
|
@@ -303,9 +303,13 @@ def generate_video(positive_prompt, num_frames, input_image):
|
|
303 |
images=get_value_at_index(cr_upscale_image_151, 0),
|
304 |
unique_id=7214086815220268849,
|
305 |
)
|
|
|
|
|
|
|
306 |
print(vhs_videocombine_154)
|
307 |
-
|
308 |
-
|
|
|
309 |
|
310 |
|
311 |
if __name__ == "__main__":
|
@@ -319,11 +323,12 @@ if __name__ == "__main__":
|
|
319 |
input_image = gr.Image(label="Input Image", type="filepath")
|
320 |
submit = gr.Button("Submit")
|
321 |
output_video = gr.Video(label="Output Video")
|
|
|
322 |
|
323 |
submit.click(
|
324 |
fn=generate_video,
|
325 |
inputs=[positive_prompt, num_frames, input_image],
|
326 |
-
outputs=[output_video]
|
327 |
)
|
328 |
|
329 |
app.launch(share=True)
|
|
|
177 |
# model_management.load_models_gpu(valid_models)
|
178 |
|
179 |
#Run ComfyUI Workflow
|
180 |
+
@spaces.GPU(duration=800)
|
181 |
def generate_video(positive_prompt, num_frames, input_image):
|
182 |
|
183 |
print("Positive Prompt:", positive_prompt)
|
|
|
303 |
images=get_value_at_index(cr_upscale_image_151, 0),
|
304 |
unique_id=7214086815220268849,
|
305 |
)
|
306 |
+
video_path = f"output/{vhs_videocombine_154['ui']['gifs'][0]['filename']}"
|
307 |
+
image_path = f"output/{vhs_videocombine_154['result'][0][1][0].split('/')[-1]}"
|
308 |
+
|
309 |
print(vhs_videocombine_154)
|
310 |
+
print(video_path, image_path)
|
311 |
+
|
312 |
+
return video_path, image_path
|
313 |
|
314 |
|
315 |
if __name__ == "__main__":
|
|
|
323 |
input_image = gr.Image(label="Input Image", type="filepath")
|
324 |
submit = gr.Button("Submit")
|
325 |
output_video = gr.Video(label="Output Video")
|
326 |
+
output_image = gr.Image(label="Output Image")
|
327 |
|
328 |
submit.click(
|
329 |
fn=generate_video,
|
330 |
inputs=[positive_prompt, num_frames, input_image],
|
331 |
+
outputs=[output_video, output_image]
|
332 |
)
|
333 |
|
334 |
app.launch(share=True)
|