Spaces:
Runtime error
Runtime error
add `HF_AUTH_TOKEN`
Browse files- climategan_wrapper.py +2 -0
climategan_wrapper.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
# based on https://huggingface.co/spaces/NimaBoscarino/climategan/blob/main/inferences.py # noqa: E501
|
2 |
# thank you @NimaBoscarino
|
3 |
|
|
|
4 |
import re
|
5 |
from pathlib import Path
|
6 |
from uuid import uuid4
|
@@ -152,6 +153,7 @@ class ClimateGAN:
|
|
152 |
revision="fp16",
|
153 |
torch_dtype=torch.float16,
|
154 |
safety_checker=None,
|
|
|
155 |
).to(self.trainer.device)
|
156 |
self._stable_diffusion_is_setup = True
|
157 |
except Exception as e:
|
|
|
1 |
# based on https://huggingface.co/spaces/NimaBoscarino/climategan/blob/main/inferences.py # noqa: E501
|
2 |
# thank you @NimaBoscarino
|
3 |
|
4 |
+
import os
|
5 |
import re
|
6 |
from pathlib import Path
|
7 |
from uuid import uuid4
|
|
|
153 |
revision="fp16",
|
154 |
torch_dtype=torch.float16,
|
155 |
safety_checker=None,
|
156 |
+
use_auth_token=os.environ.get("HF_AUTH_TOKEN"),
|
157 |
).to(self.trainer.device)
|
158 |
self._stable_diffusion_is_setup = True
|
159 |
except Exception as e:
|