yijin928 commited on
Commit
a404b44
·
verified ·
1 Parent(s): 9c11827

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=300)
181
  def generate_video(positive_prompt, num_frames, input_image):
182
 
183
  print("Positive Prompt:", positive_prompt)
@@ -304,7 +304,7 @@ def generate_video(positive_prompt, num_frames, input_image):
304
  unique_id=7214086815220268849,
305
  )
306
  print(vhs_videocombine_154)
307
- saved_path = f"output/{vhs_videocombine_154['ui']['gifs'][0]['fullpath']}"
308
  return saved_path
309
 
310
 
@@ -314,7 +314,7 @@ if __name__ == "__main__":
314
  with gr.Row():
315
  positive_prompt = gr.Textbox(label="Positive Prompt", value="A young Asian man with shoulder-length black hair, wearing a stylish black outfit, playing an acoustic guitar on a dimly lit stage. His full face is visible, showing a calm and focused expression as he strums the guitar. A microphone stand is positioned near him, and a music stand with sheet music is in front of him. The stage lighting casts a soft, warm glow on his face, and the background features an intimate live music setting with visible metal beams and soft blue ambient lighting. The scene captures the artistic mood of a live performance, emphasizing the details of the guitar, the musician’s fingers on the strings, and the relaxed yet passionate vibe of the moment.", lines=2)
316
  with gr.Row():
317
- num_frames = gr.Number(label="Number of Frames", value=60)
318
  with gr.Row():
319
  input_image = gr.Image(label="Input Image", type="filepath")
320
  submit = gr.Button("Submit")
 
177
  # model_management.load_models_gpu(valid_models)
178
 
179
  #Run ComfyUI Workflow
180
+ @spaces.GPU(duration=240)
181
  def generate_video(positive_prompt, num_frames, input_image):
182
 
183
  print("Positive Prompt:", positive_prompt)
 
304
  unique_id=7214086815220268849,
305
  )
306
  print(vhs_videocombine_154)
307
+ saved_path = f"output/{vhs_videocombine_154['ui']['gifs'][0]['filename']}"
308
  return saved_path
309
 
310
 
 
314
  with gr.Row():
315
  positive_prompt = gr.Textbox(label="Positive Prompt", value="A young Asian man with shoulder-length black hair, wearing a stylish black outfit, playing an acoustic guitar on a dimly lit stage. His full face is visible, showing a calm and focused expression as he strums the guitar. A microphone stand is positioned near him, and a music stand with sheet music is in front of him. The stage lighting casts a soft, warm glow on his face, and the background features an intimate live music setting with visible metal beams and soft blue ambient lighting. The scene captures the artistic mood of a live performance, emphasizing the details of the guitar, the musician’s fingers on the strings, and the relaxed yet passionate vibe of the moment.", lines=2)
316
  with gr.Row():
317
+ num_frames = gr.Number(label="Number of Frames", value=10)
318
  with gr.Row():
319
  input_image = gr.Image(label="Input Image", type="filepath")
320
  submit = gr.Button("Submit")