Bordoglor commited on
Commit
2b966bc
·
verified ·
1 Parent(s): 44549c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -7,11 +7,17 @@ from diffusers import DiffusionPipeline, StableDiffusionPipeline
7
  from peft import PeftModel, LoraConfig
8
  import torch
9
 
 
 
 
10
  model_repo_id = "stabilityai/sdxl-turbo" # Replace to the model you would like to use
11
 
12
  MAX_SEED = np.iinfo(np.int32).max
13
  MAX_IMAGE_SIZE = 1024
14
 
 
 
 
15
 
16
  # @spaces.GPU #[uncomment to use ZeroGPU]
17
  def infer(
 
7
  from peft import PeftModel, LoraConfig
8
  import torch
9
 
10
+ from huggingface_hub import login
11
+ import os
12
+
13
  model_repo_id = "stabilityai/sdxl-turbo" # Replace to the model you would like to use
14
 
15
  MAX_SEED = np.iinfo(np.int32).max
16
  MAX_IMAGE_SIZE = 1024
17
 
18
+ access_token = os.environ["HUGGING_FACE_HUB_TOKEN"]
19
+ login(token=access_token)
20
+
21
 
22
  # @spaces.GPU #[uncomment to use ZeroGPU]
23
  def infer(