jbilcke-hf HF staff commited on
Commit
ef4b87c
1 Parent(s): 39710bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -215,6 +215,8 @@ def sample(
215
 
216
  image = decode_data_uri_to_image(input_image_base64)
217
 
 
 
218
  if image.mode == "RGBA":
219
  image = image.convert("RGB")
220
 
@@ -244,8 +246,9 @@ def sample(
244
  # Read the content of the video file and encode it to base64
245
  with open(video_path, "rb") as video_file:
246
  video_base64 = base64.b64encode(video_file.read()).decode('utf-8')
247
-
248
- return video_base64
 
249
 
250
 
251
  with gr.Blocks() as demo:
 
215
 
216
  image = decode_data_uri_to_image(input_image_base64)
217
 
218
+ print(f"seed={seed}\nrandomize_seed={randomize_seed}\nmotion_bucket_id={motion_bucket_id}\nfps_id={fps_id}\nmax_guidance_scale={max_guidance_scale}\nmin_guidance_scale={min_guidance_scale}\nwidth={width}\nheight={height}\nnum_inference_steps={num_inference_steps}\ndecoding_t={decoding_t}")
219
+
220
  if image.mode == "RGBA":
221
  image = image.convert("RGB")
222
 
 
246
  # Read the content of the video file and encode it to base64
247
  with open(video_path, "rb") as video_file:
248
  video_base64 = base64.b64encode(video_file.read()).decode('utf-8')
249
+
250
+ # Prepend the appropriate data URI header with MIME type
251
+ return 'data:video/mp4;base64,' + video_base64
252
 
253
 
254
  with gr.Blocks() as demo: