laminar commited on
Commit
addd44d
1 Parent(s): 573e111

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,13 +6,14 @@ from diffusers import StableDiffusionPipeline
6
  from datasets import load_dataset
7
  from PIL import Image
8
  import re
 
9
 
10
  model_id = "CompVis/stable-diffusion-v1-4"
11
  device = "cuda"
12
 
13
  auth_token = os.environ.get("READ_TOKEN")
14
  #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.
15
- pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True, revision="fp16", torch_dtype=torch.float16)
16
  pipe = pipe.to(device)
17
  #When running locally, you won`t have access to this, so you can remove this part
18
  word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=True)
 
6
  from datasets import load_dataset
7
  from PIL import Image
8
  import re
9
+ import os
10
 
11
  model_id = "CompVis/stable-diffusion-v1-4"
12
  device = "cuda"
13
 
14
  auth_token = os.environ.get("READ_TOKEN")
15
  #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.
16
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=auth_token , revision="fp16", torch_dtype=torch.float16)
17
  pipe = pipe.to(device)
18
  #When running locally, you won`t have access to this, so you can remove this part
19
  word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=True)