Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,12 +18,12 @@ device = "cpu"
|
|
18 |
auth_token = os.getenv("auth_token")
|
19 |
|
20 |
#If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
|
21 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=
|
22 |
pipe = pipe.to(device)
|
23 |
torch.backends.cudnn.benchmark = True
|
24 |
|
25 |
#When running locally, you won`t have access to this, so you can remove this part
|
26 |
-
word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=
|
27 |
word_list = word_list_dataset["train"]['text']
|
28 |
|
29 |
is_gpu_busy = False
|
18 |
auth_token = os.getenv("auth_token")
|
19 |
|
20 |
#If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
|
21 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=auth_token, revision="fp16", torch_dtype=torch.float16)
|
22 |
pipe = pipe.to(device)
|
23 |
torch.backends.cudnn.benchmark = True
|
24 |
|
25 |
#When running locally, you won`t have access to this, so you can remove this part
|
26 |
+
word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=auth_token)
|
27 |
word_list = word_list_dataset["train"]['text']
|
28 |
|
29 |
is_gpu_busy = False
|