Jeff850 commited on
Commit
b6f0174
1 Parent(s): a219cb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -6,14 +6,18 @@ import random
6
  import time
7
  from PIL import Image
8
  from diffusers import DiffusionPipeline
 
 
 
 
9
 
10
  # Load LoRAs from JSON file
11
  with open('loras.json', 'r') as f:
12
  loras = json.load(f)
13
 
14
- # Initialize the base model
15
  base_model = "black-forest-labs/FLUX.1-dev"
16
- pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
17
 
18
  MAX_SEED = 2**32-1
19
 
 
6
  import time
7
  from PIL import Image
8
  from diffusers import DiffusionPipeline
9
+ import os
10
+
11
+ # Set your Hugging Face token (make sure you've set this in your environment)
12
+ hf_token = os.getenv('waffles')
13
 
14
  # Load LoRAs from JSON file
15
  with open('loras.json', 'r') as f:
16
  loras = json.load(f)
17
 
18
+ # Initialize the base model with authentication
19
  base_model = "black-forest-labs/FLUX.1-dev"
20
+ pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16, use_auth_token=hf_token)
21
 
22
  MAX_SEED = 2**32-1
23