clementchadebec commited on
Commit
be2b781
1 Parent(s): bb5d5a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -9,9 +9,16 @@ from peft import PeftModel
9
  import os
10
  from huggingface_hub import snapshot_download
11
 
12
- auth_token = os.getenv('HUGGINFACE_TOKEN')
13
-
14
- model_path = "stabilityai/stable-diffusion-3-medium-diffusers"
 
 
 
 
 
 
 
15
 
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  IS_SPACE = os.environ.get("SPACE_ID", None) is not None
 
9
  import os
10
  from huggingface_hub import snapshot_download
11
 
12
+ huggingface_token = os.getenv("HUGGINFACE_TOKEN")
13
+
14
+ model_path = snapshot_download(
15
+ repo_id="stabilityai/stable-diffusion-3-medium",
16
+ revision="refs/pr/26",
17
+ repo_type="model",
18
+ ignore_patterns=["*.md", "*..gitattributes"],
19
+ local_dir="stable-diffusion-3-medium",
20
+ token=huggingface_token, # type a new token-id.
21
+ )
22
 
23
  device = "cuda" if torch.cuda.is_available() else "cpu"
24
  IS_SPACE = os.environ.get("SPACE_ID", None) is not None