K00B404 commited on
Commit
ca8c248
·
verified ·
1 Parent(s): 3d4a2fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,5 +1,8 @@
1
  import torch
2
-
 
 
 
3
  from diffusers import FluxPipeline, FluxTransformer2DModel, GGUFQuantizationConfig
4
 
5
  ckpt_path = (
@@ -15,6 +18,7 @@ pipe = FluxPipeline.from_pretrained(
15
  "black-forest-labs/FLUX.1-schnell",
16
  transformer=transformer,
17
  torch_dtype=torch.bfloat16,
 
18
  )
19
  pipe.enable_model_cpu_offload()
20
  prompt = "A cat holding a sign that says hello world"
 
1
  import torch
2
+ import os
3
+ from dotenv import load_dotenv,find_dotenv
4
+ load_dotenv(find_dotenv())
5
+ token=os.getenv('HF_TOKEN')
6
  from diffusers import FluxPipeline, FluxTransformer2DModel, GGUFQuantizationConfig
7
 
8
  ckpt_path = (
 
18
  "black-forest-labs/FLUX.1-schnell",
19
  transformer=transformer,
20
  torch_dtype=torch.bfloat16,
21
+ token=token,
22
  )
23
  pipe.enable_model_cpu_offload()
24
  prompt = "A cat holding a sign that says hello world"