Spaces:
Runtime error
Runtime error
Alexander McKinney
commited on
Commit
·
a833338
1
Parent(s):
d71e882
adds token reading
Browse files
app.py
CHANGED
|
@@ -13,6 +13,8 @@ from transformers.models.detr.feature_extraction_detr import rgb_to_id
|
|
| 13 |
|
| 14 |
from diffusers import StableDiffusionInpaintPipeline
|
| 15 |
|
|
|
|
|
|
|
| 16 |
torch.inference_mode()
|
| 17 |
torch.no_grad()
|
| 18 |
|
|
@@ -29,7 +31,8 @@ def load_diffusion_pipeline(model_name: str = 'runwayml/stable-diffusion-inpaint
|
|
| 29 |
return StableDiffusionInpaintPipeline.from_pretrained(
|
| 30 |
model_name,
|
| 31 |
revision='fp16',
|
| 32 |
-
torch_dtype=torch.float16
|
|
|
|
| 33 |
)
|
| 34 |
|
| 35 |
# Device helper
|
|
|
|
| 13 |
|
| 14 |
from diffusers import StableDiffusionInpaintPipeline
|
| 15 |
|
| 16 |
+
auth_token = os.environ.get("READ_TOKEN")
|
| 17 |
+
|
| 18 |
torch.inference_mode()
|
| 19 |
torch.no_grad()
|
| 20 |
|
|
|
|
| 31 |
return StableDiffusionInpaintPipeline.from_pretrained(
|
| 32 |
model_name,
|
| 33 |
revision='fp16',
|
| 34 |
+
torch_dtype=torch.float16,
|
| 35 |
+
use_auth_token=auth_token
|
| 36 |
)
|
| 37 |
|
| 38 |
# Device helper
|