Spaces:
Running
on
Zero
Running
on
Zero
Anurag Bhardwaj
commited on
Update app.py
Browse files
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 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|