Spaces:
Running
on
Zero
Running
on
Zero
Update src/flux/util.py
Browse files- src/flux/util.py +6 -1
src/flux/util.py
CHANGED
@@ -306,7 +306,12 @@ def load_flow_model(name: str, device: str | torch.device = "cuda", hf_download:
|
|
306 |
and configs[name].repo_flow is not None
|
307 |
and hf_download
|
308 |
):
|
309 |
-
ckpt_path = hf_hub_download(configs[name].repo_id, configs[name].repo_flow)
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
with torch.device("meta" if ckpt_path is not None else device):
|
312 |
model = Flux(configs[name].params).to(torch.bfloat16)
|
|
|
306 |
and configs[name].repo_flow is not None
|
307 |
and hf_download
|
308 |
):
|
309 |
+
# ckpt_path = hf_hub_download(configs[name].repo_id, configs[name].repo_flow)
|
310 |
+
ckpt_path = hf_hub_download(
|
311 |
+
repo_id="Boese0601/ByteMorpher",
|
312 |
+
filename="dit.safetensors",
|
313 |
+
use_auth_token=os.getenv("HF_TOKEN")
|
314 |
+
)
|
315 |
|
316 |
with torch.device("meta" if ckpt_path is not None else device):
|
317 |
model = Flux(configs[name].params).to(torch.bfloat16)
|