sky24h commited on
Commit
1e5bf7e
·
1 Parent(s): fae070b

add support to ZeroGPU

Browse files
gradio_cached_examples/19/log.csv DELETED
@@ -1,4 +0,0 @@
1
- output,flag,username,timestamp
2
- "{""video"": {""path"": ""gradio_cached_examples/19/output/d89cb02e15074188f8f6/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727813741.3332028.mp4"", ""url"": ""/file=/tmp/gradio/17794950654f68456a056c68191682fee58f63e5/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727813741.3332028.mp4"", ""size"": null, ""orig_name"": ""A-Tiger,-high-quality_a-cat-with-big-eyes,-deformed_20_1727813741.3332028.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-01 20:15:41.884688
3
- "{""video"": {""path"": ""gradio_cached_examples/19/output/d9fa9e82120d2c0f1786/pointillism-painting-detailed__25_1727813866.2198303.mp4"", ""url"": ""/file=/tmp/gradio/164e0b9a788d053c6e89e46accc931aa4ecc036d/pointillism-painting-detailed__25_1727813866.2198303.mp4"", ""size"": null, ""orig_name"": ""pointillism-painting,-detailed__25_1727813866.2198303.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-01 20:17:46.857907
4
- "{""video"": {""path"": ""gradio_cached_examples/19/output/2be6ecf324aed22bf7b6/Wooden-trucks-drive-on-a-racetrack.__15_1727813992.8895943.mp4"", ""url"": ""/file=/tmp/gradio/76a9de37ebb4bb2027a17530fced1febf5100b0b/Wooden-trucks-drive-on-a-racetrack.__15_1727813992.8895943.mp4"", ""size"": null, ""orig_name"": ""Wooden-trucks-drive-on-a-racetrack.__15_1727813992.8895943.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-01 20:19:53.549070
 
 
 
 
 
gradio_cached_examples/20/log.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ output,flag,username,timestamp
2
+ "{""video"": {""path"": ""gradio_cached_examples/20/output/270a0250bd8be7d24b8e/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727851207.411318.mp4"", ""url"": ""/file=/tmp/gradio/343a689c3b87d1637a7a5db1d27c3a7e30e5aec5dd9216dbf1c196ae5f3a5d91/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727851207.411318.mp4"", ""size"": null, ""orig_name"": ""A-Tiger,-high-quality_a-cat-with-big-eyes,-deformed_20_1727851207.411318.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-02 06:40:08.071531
3
+ "{""video"": {""path"": ""gradio_cached_examples/20/output/9171b17dc40e46849ce9/pointillism-painting-detailed__25_1727851340.2816992.mp4"", ""url"": ""/file=/tmp/gradio/16ff5f8538ad5063688f680ef2fecaafc53a9bc3e13ac07bc3dc5d20107c2760/pointillism-painting-detailed__25_1727851340.2816992.mp4"", ""size"": null, ""orig_name"": ""pointillism-painting,-detailed__25_1727851340.2816992.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-02 06:42:20.935696
4
+ "{""video"": {""path"": ""gradio_cached_examples/20/output/bb9781d73da5da04e1e8/Wooden-trucks-drive-on-a-racetrack.__15_1727851472.9116476.mp4"", ""url"": ""/file=/tmp/gradio/f7bad5d9676a5685ddccb69a0cd1b7a55497af61eb6e3a6585adfb2e3eb38d90/Wooden-trucks-drive-on-a-racetrack.__15_1727851472.9116476.mp4"", ""size"": null, ""orig_name"": ""Wooden-trucks-drive-on-a-racetrack.__15_1727851472.9116476.mp4"", ""mime_type"": null, ""is_stream"": false, ""meta"": {""_type"": ""gradio.FileData""}}, ""subtitles"": null}",,,2024-10-02 06:44:33.570183
gradio_cached_examples/{19/output/d89cb02e15074188f8f6/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727813741.3332028.mp4 → 20/output/270a0250bd8be7d24b8e/A-Tiger-high-quality_a-cat-with-big-eyes-deformed_20_1727851207.411318.mp4} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c3746fd58911320cabcb611c7e311b21bdee0273ea5e9801a715cfd400428d37
3
- size 273838
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:343a689c3b87d1637a7a5db1d27c3a7e30e5aec5dd9216dbf1c196ae5f3a5d91
3
+ size 273039
gradio_cached_examples/{19/output/d9fa9e82120d2c0f1786/pointillism-painting-detailed__25_1727813866.2198303.mp4 → 20/output/9171b17dc40e46849ce9/pointillism-painting-detailed__25_1727851340.2816992.mp4} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0395774a685b6e042d183c1d016771be4a79f1a1782a510e49099267ce24ebe1
3
- size 701932
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16ff5f8538ad5063688f680ef2fecaafc53a9bc3e13ac07bc3dc5d20107c2760
3
+ size 707188
gradio_cached_examples/{19/output/2be6ecf324aed22bf7b6/Wooden-trucks-drive-on-a-racetrack.__15_1727813992.8895943.mp4 → 20/output/bb9781d73da5da04e1e8/Wooden-trucks-drive-on-a-racetrack.__15_1727851472.9116476.mp4} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dc7f6ff21e460e91e5de667278b64b83bc706007b412a8d263709a30e3be8898
3
- size 92054
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7bad5d9676a5685ddccb69a0cd1b7a55497af61eb6e3a6585adfb2e3eb38d90
3
+ size 91378
inference_utils.py CHANGED
@@ -29,8 +29,6 @@ def init_pipeline(device):
29
 
30
  pipe = FlattenPipeline(vae=vae, text_encoder=text_encoder, tokenizer=tokenizer, unet=unet, scheduler=scheduler, inverse_scheduler=inverse)
31
  pipe.enable_vae_slicing()
32
- # xforers is not available in ZeroGPU?
33
- # pipe.enable_xformers_memory_efficient_attention()
34
  pipe.to(device)
35
  return pipe
36
 
@@ -58,6 +56,8 @@ def inference(
58
  ):
59
  generator = torch.Generator(device=device)
60
  generator.manual_seed(seed)
 
 
61
 
62
  # read the source video
63
  video_reader = imageio.get_reader(video_path, "ffmpeg")
 
29
 
30
  pipe = FlattenPipeline(vae=vae, text_encoder=text_encoder, tokenizer=tokenizer, unet=unet, scheduler=scheduler, inverse_scheduler=inverse)
31
  pipe.enable_vae_slicing()
 
 
32
  pipe.to(device)
33
  return pipe
34
 
 
56
  ):
57
  generator = torch.Generator(device=device)
58
  generator.manual_seed(seed)
59
+ # xformers should be used here to support ZeroGPU?
60
+ pipe.enable_xformers_memory_efficient_attention()
61
 
62
  # read the source video
63
  video_reader = imageio.get_reader(video_path, "ffmpeg")