spsancti commited on
Commit
58ac6f1
1 Parent(s): 68eb428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,8 +8,9 @@ from PIL import Image, ImageOps
8
  # Load pipeline once
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
  checkpoint = "Deci/DeciDiffusion-v2-0"
 
11
 
12
- pipe = StableDiffusionPipeline.from_pretrained(checkpoint, custom_pipeline=checkpoint, torch_dtype=torch.float32)
13
  pipe.unet = pipe.unet.from_pretrained(checkpoint, subfolder='flexible_unet', torch_dtype=torch.float32)
14
  pipe = pipe.to(device)
15
 
 
8
  # Load pipeline once
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
  checkpoint = "Deci/DeciDiffusion-v2-0"
11
+ auth_token = os.environ.get("HF_ACCESS_TOKEN") or True
12
 
13
+ pipe = StableDiffusionPipeline.from_pretrained(checkpoint, custom_pipeline=checkpoint, torch_dtype=torch.float32, use_auth_token=auth_token)
14
  pipe.unet = pipe.unet.from_pretrained(checkpoint, subfolder='flexible_unet', torch_dtype=torch.float32)
15
  pipe = pipe.to(device)
16