primecai commited on
Commit
defd213
·
1 Parent(s): 007257f
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,11 +20,12 @@ def init_pipeline():
20
  torch_dtype=torch.bfloat16,
21
  low_cpu_mem_usage=False,
22
  ignore_mismatched_sizes=True,
 
23
  )
24
  pipe = FluxConditionalPipeline.from_pretrained(
25
- "black-forest-labs/FLUX.1-dev", transformer=transformer, torch_dtype=torch.bfloat16
26
  )
27
- pipe.load_lora_weights(os.path.join(CHECKPOINT, "pytorch_lora_weights.safetensors"))
28
  pipe.to("cuda")
29
 
30
 
 
20
  torch_dtype=torch.bfloat16,
21
  low_cpu_mem_usage=False,
22
  ignore_mismatched_sizes=True,
23
+ use_auth_token=os.getenv("HF_TOKEN"),
24
  )
25
  pipe = FluxConditionalPipeline.from_pretrained(
26
+ "black-forest-labs/FLUX.1-dev", transformer=transformer, torch_dtype=torch.bfloat16, use_auth_token=os.getenv("HF_TOKEN")
27
  )
28
+ pipe.load_lora_weights(os.path.join(CHECKPOINT, "pytorch_lora_weights.safetensors"), use_auth_token=os.getenv("HF_TOKEN"))
29
  pipe.to("cuda")
30
 
31