Spaces:
Running
on
A10G
Running
on
A10G
add auth token
Browse files
app.py
CHANGED
@@ -14,9 +14,11 @@ from matplotlib import pyplot as plt
|
|
14 |
from torchvision import transforms
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
|
|
|
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
|
19 |
-
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", dtype=torch.float16, revision="fp16")
|
20 |
|
21 |
transform = transforms.Compose([
|
22 |
transforms.ToTensor(),
|
|
|
14 |
from torchvision import transforms
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
17 |
+
auth_token = os.environ.get("API_TOKEN") or True
|
18 |
+
|
19 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
20 |
|
21 |
+
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", dtype=torch.float16, revision="fp16", use_auth_token=auth_token)
|
22 |
|
23 |
transform = transforms.Compose([
|
24 |
transforms.ToTensor(),
|