gokaygokay commited on
Commit
10929b7
·
1 Parent(s): 7a21437
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -10,7 +10,15 @@ dtype = torch.bfloat16
10
  file_url = "https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v31.safetensors"
11
  huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
12
 
13
- flux_pipeline = FluxPipeline.from_single_file(file_url, torch_dtype=dtype, token=huggingface_token)
 
 
 
 
 
 
 
 
14
  flux_pipeline.to(device)
15
 
16
  @spaces.GPU()
 
10
  file_url = "https://huggingface.co/lodestones/Chroma/blob/main/chroma-unlocked-v31.safetensors"
11
  huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
12
 
13
+ # Load the pipeline with proper configuration
14
+ flux_pipeline = FluxPipeline.from_single_file(
15
+ file_url,
16
+ torch_dtype=dtype,
17
+ token=huggingface_token,
18
+ use_safetensors=True,
19
+ local_files_only=False,
20
+ config_file="model_index.json"
21
+ )
22
  flux_pipeline.to(device)
23
 
24
  @spaces.GPU()