Anurag Bhardwaj commited on
Commit
aebf6e5
·
verified ·
1 Parent(s): 8e19a81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -8,8 +8,14 @@ def load_pipeline():
8
  lora_repo = "strangerzonehf/Flux-Super-Realism-LoRA"
9
  trigger_word = "Super Realism" # Recommended trigger word
10
 
11
- # Load the base model
12
- pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
 
 
 
 
 
 
13
 
14
  # Load the LoRA weights into the pipeline
15
  pipe.load_lora_weights(lora_repo)
 
8
  lora_repo = "strangerzonehf/Flux-Super-Realism-LoRA"
9
  trigger_word = "Super Realism" # Recommended trigger word
10
 
11
+ # Retrieve your Hugging Face token from an environment variable
12
+ hf_token = os.environ.get("HF_TOKEN")
13
+
14
+ pipe = DiffusionPipeline.from_pretrained(
15
+ "black-forest-labs/FLUX.1-dev",
16
+ torch_dtype=torch.bfloat16,
17
+ use_auth_token=hf_token # Use the token stored in your environment variable
18
+ )
19
 
20
  # Load the LoRA weights into the pipeline
21
  pipe.load_lora_weights(lora_repo)