fix(provider): resolve FLUX.2 Klein pipeline by s3_name, not legacy cache path#51
Conversation
…ache path
`download_ckpt_model_from_cdn` matched the image-model pipeline against
`cache_dir.contains("flux_2_klein_{4,9}b_q8p")`, but `cmd_models` writes
image models to `~/.darkbloom/models/<s3_name>` (e.g. `flux-klein-4b-q8`),
so the match always fell through to the None arm and printed
"Unknown image model" after the tarball fallback 404'd.
Match against `base_url` (which carries the s3_name) in addition to
`cache_dir`, accepting both dashed (new) and underscored (legacy HF
cache) forms. Verified locally by downloading FLUX.2 Klein 4B end-to-end
from the R2 CDN via `darkbloom models`.
Fixes Layr-Labs#23
|
@lukevenediger is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
Hermes Agent ReviewVerdict: Minor suggestions
|
Summary
download_ckpt_model_from_cdnmatched the FLUX.2 Klein pipeline againstcache_dir.contains("flux_2_klein_{4,9}b_q8p"), butcmd_modelswrites image models to~/.darkbloom/models/<s3_name>(e.g.flux-klein-4b-q8). The match always fell through to theNonearm, so users saw⚠ Unknown image modelafter the tarball fallback 404'd.base_url(carriess3_name) andcache_dir, accepting both dashed (klein-4b/klein-9b) and underscored (klein_4b/klein_9b) forms so the legacy~/.cache/huggingface/hub/models--flux_2_klein_4b_q8p.ckpt/...layout still resolves.Fixes #23.
Test plan
darkbloom models→1(Download) →1(FLUX.2 Klein 4B): VAE completes, diffusion model begins streaming from R2 (flux-klein-4b-q8) at ~70+ MB/s on Apple M4 Pro.200 OKforflux_2_klein_4b_q8p.ckpt,flux_2_vae_f16.ckpt,qwen_3_4b_q8p.ckpt.klein_4b/klein_9bbranch).