Fetch hosted prebuilt NF4 artifacts for flux2 and zimage - #58
Merged
Conversation
download_flux2_klein() and download_zimage_turbo() gain prebuilt = TRUE: when the resolved precision is nf4 and no local artifact exists, the artifact is fetched from the cornball-ai/<model>-R HuggingFace dataset (hard-linked out of the hfhub cache) instead of downloading the 7.8 GB / 24.6 GB source and quantizing locally. Any fetch failure falls back to the source + quantize path unchanged. Only the two redistributable models are hosted; flux1 (gated) and ltx (license) build locally as before. Also updates the stale Klein 13 s README timing to the 0.2.2 measured 9.1 s (fp8).
Every model download is consent-gated by contract (NEWS 0.2.0); the prebuilt fetch was bypassing the gate. Ask before any network fetch, skip the ask when the artifact is already fully hub-cached, and fall through to the source path (with its own larger ask) on decline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverses 0.2.2's no-hosting decision, narrowly, per the rationale now in NEWS: the CRAN safetensors cannot read any of the multi-GB upstream sources (fix merged upstream as mlverse/safetensors#14, unreleased), so a stock CRAN install cannot build a quantized artifact at all. Hosting the two redistributable models (Apache-2.0, ungated) gives
install.packages("diffuseR")something to generate with right away.download_flux2_klein()/download_zimage_turbo()gainprebuilt = TRUE: when the resolved precision is nf4 and no local artifact exists, fetch fromcornball-ai/flux2-R/cornball-ai/zimage-R(dataset repos, same naming convention as the sd21/sdxl TorchScript era), hard-linking out of the hfhub cache. Any fetch failure falls back to the source+quantize path unchanged.Merge after the artifacts are live on HF (the code is safe either way: unreachable repos fall back to a local build).