AYYasaswini commited on
Commit
8ea8f5e
·
verified ·
1 Parent(s): c77b086

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -782,13 +782,13 @@ for i, t in tqdm(enumerate(scheduler.timesteps), total=len(scheduler.timesteps))
782
  im.save(f'steps/{i:04}.jpeg')
783
 
784
  # Make and show the progress video (change width to 1024 for full res)
785
- !ffmpeg -v 1 -y -f image2 -framerate 12 -i steps/%04d.jpeg -c:v libx264 -preset slow -qp 18 -pix_fmt yuv420p out.mp4
786
- mp4 = open('out.mp4','rb').read()
787
- data_url = "data:video/mp4;base64," + b64encode(mp4).decode()
788
- HTML("""
789
- <video width=600 controls>
790
- <source src="%s" type="video/mp4">
791
- </video>
792
  """ % data_url)
793
 
794
  """The version on the right shows the predicted 'final output' (x0) at each step, and this is what is usually used for progress videos etc. The version on the left is the 'next step'. I found it interesteing to compare the two - watching the progress videos only you'd think drastic changes are happening expecially at early stages, but since the changes made per-step are relatively small the actual process is much more gradual.
 
782
  im.save(f'steps/{i:04}.jpeg')
783
 
784
  # Make and show the progress video (change width to 1024 for full res)
785
+ #!ffmpeg -v 1 -y -f image2 -framerate 12 -i steps/%04d.jpeg -c:v libx264 -preset slow -qp 18 -pix_fmt yuv420p out.mp4
786
+ #mp4 = open('out.mp4','rb').read()
787
+ #data_url = "data:video/mp4;base64," + b64encode(mp4).decode()
788
+ #HTML("""
789
+ #<video width=600 controls>
790
+ # <source src="%s" type="video/mp4">
791
+ #</video>
792
  """ % data_url)
793
 
794
  """The version on the right shows the predicted 'final output' (x0) at each step, and this is what is usually used for progress videos etc. The version on the left is the 'next step'. I found it interesteing to compare the two - watching the progress videos only you'd think drastic changes are happening expecially at early stages, but since the changes made per-step are relatively small the actual process is much more gradual.