Tonic commited on
Commit
0ad3cbd
1 Parent(s): b948a13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -19,10 +19,6 @@ title = '''# 👋🏻Welcome to Tonic's🌟🎥StableVideo XT-1-1
19
  Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community 👻 [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to 🌟 [SciTonic](https://github.com/Tonic-AI/scitonic) 🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
20
  '''
21
 
22
- downloaded_safetensors_path = "svd_xt_1_1.safetensors"
23
- if not os.path.exists(downloaded_safetensors_path):
24
- raise FileNotFoundError(f"The file {downloaded_safetensors_path} was not found.")
25
-
26
  original_model_id = "stabilityai/stable-video-diffusion-img2vid-xt"
27
  pipe = StableVideoDiffusionPipeline.from_pretrained(
28
  original_model_id,
@@ -30,7 +26,11 @@ pipe = StableVideoDiffusionPipeline.from_pretrained(
30
  variant="fp16",
31
  )
32
 
33
- cache_dir = os.path.join(os.path.expanduser("~"), ".cache/huggingface/diffusers")
 
 
 
 
34
  model_cache_dir = os.path.join(cache_dir, original_model_id.replace("/", "--"))
35
  original_safetensors_path = os.path.join(model_cache_dir, "svd_xt.safetensors")
36
  os.replace(downloaded_safetensors_path, original_safetensors_path)
 
19
  Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's🛠️community 👻 [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/GWpVpekp) On 🤗Huggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to 🌟 [SciTonic](https://github.com/Tonic-AI/scitonic) 🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
20
  '''
21
 
 
 
 
 
22
  original_model_id = "stabilityai/stable-video-diffusion-img2vid-xt"
23
  pipe = StableVideoDiffusionPipeline.from_pretrained(
24
  original_model_id,
 
26
  variant="fp16",
27
  )
28
 
29
+ downloaded_safetensors_path = "./svd_xt_1_1.safetensors"
30
+ if not os.path.exists(downloaded_safetensors_path):
31
+ raise FileNotFoundError(f"The file {downloaded_safetensors_path} was not found.")
32
+
33
+ cache_dir = os.path.join(os.path.expanduser("~"), "./cache/")
34
  model_cache_dir = os.path.join(cache_dir, original_model_id.replace("/", "--"))
35
  original_safetensors_path = os.path.join(model_cache_dir, "svd_xt.safetensors")
36
  os.replace(downloaded_safetensors_path, original_safetensors_path)