luoxiang commited on
Commit
5a0f6e3
1 Parent(s): b88a2d3
Files changed (2) hide show
  1. app.py +1 -1
  2. share_btn.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ model_id = "CompVis/stable-diffusion-v1-4"
17
  #device = "cuda"
18
 
19
  #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.
20
- pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=os.getenv('ACCESS_TOKEN'), torch_dtype=torch.float32)
21
  #pipe = pipe.to(device)
22
  torch.backends.cudnn.benchmark = True
23
 
 
17
  #device = "cuda"
18
 
19
  #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.
20
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token="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", torch_dtype=torch.float32)
21
  #pipe = pipe.to(device)
22
  torch.backends.cudnn.benchmark = True
23
 
share_btn.py CHANGED
@@ -43,8 +43,8 @@ share_js = """async () => {
43
  const res = await fetch(imgEl.src);
44
  const blob = await res.blob();
45
  const imgId = Date.now() % 200;
46
- const fileName = `diffuse-the-rest-${{imgId}}.png`;
47
- return new File([blob], fileName, { type: 'image/png' });
48
  })
49
  );
50
 
 
43
  const res = await fetch(imgEl.src);
44
  const blob = await res.blob();
45
  const imgId = Date.now() % 200;
46
+ const fileName = `diffuse-the-rest-${{imgId}}.jpg`;
47
+ return new File([blob], fileName, { type: 'image/jpeg' });
48
  })
49
  );
50