root commited on
Commit
827beec
·
1 Parent(s): bfde5f8
__pycache__/handler.cpython-310.pyc CHANGED
Binary files a/__pycache__/handler.cpython-310.pyc and b/__pycache__/handler.cpython-310.pyc differ
 
output/gradio/animation_output.mp4 ADDED
Binary file (80 kB). View file
 
output/gradio/temp/animation_output/0001.png ADDED
output/gradio/temp/animation_output/0002.png ADDED
output/gradio/temp/animation_output/0003.png ADDED
output/gradio/temp/animation_output/0004.png ADDED
output/gradio/temp/animation_output/0005.png ADDED
output/gradio/temp/animation_output/0006.png ADDED
output/gradio/temp/animation_output/0007.png ADDED
output/gradio/temp/animation_output/0008.png ADDED
output/gradio/temp/animation_output/0009.png ADDED
output/gradio/temp/animation_output/0010.png ADDED
output/gradio/temp/animation_output/0011.png ADDED
output/gradio/temp/animation_output/0012.png ADDED
src/utils/download_models.py CHANGED
@@ -5,17 +5,20 @@ from huggingface_hub import hf_hub_download
5
 
6
 
7
  def prepare_base_model():
8
- local_dir = "./pretrained_weights/stable-diffusion-v1-5"
 
9
  os.makedirs(local_dir, exist_ok=True)
 
10
  for hub_file in ["unet/config.json", "unet/diffusion_pytorch_model.bin"]:
11
- path = Path(hub_file)
12
- saved_path = local_dir / path
13
  if os.path.exists(saved_path):
14
  continue
 
15
  hf_hub_download(
16
  repo_id="runwayml/stable-diffusion-v1-5",
17
- subfolder=PurePosixPath(path.parent),
18
- filename=PurePosixPath(path.name),
19
  local_dir=local_dir,
20
  )
21
 
 
5
 
6
 
7
  def prepare_base_model():
8
+ base_dir = os.getenv('APP_BASE_DIR', os.path.dirname(os.path.abspath(__file__)))
9
+ local_dir = os.path.join(base_dir, 'pretrained_weights', 'stable-diffusion-v1-5')
10
  os.makedirs(local_dir, exist_ok=True)
11
+
12
  for hub_file in ["unet/config.json", "unet/diffusion_pytorch_model.bin"]:
13
+ # Construct the full path to the file within the local_dir
14
+ saved_path = os.path.join(local_dir, hub_file)
15
  if os.path.exists(saved_path):
16
  continue
17
+
18
  hf_hub_download(
19
  repo_id="runwayml/stable-diffusion-v1-5",
20
+ subfolder=PurePosixPath(Path(hub_file).parent),
21
+ filename=PurePosixPath(Path(hub_file).name),
22
  local_dir=local_dir,
23
  )
24