Merserk's picture
Add files using upload-large-folder tool
879c597 verified
|
Raw
History Blame
5.39 kB

Reproducing the Krea 2 Turbo Format Benchmark

Tested reference environment

  • Windows 11, NVIDIA GeForce RTX 4060 Ti 16 GB, driver 610.74, compute capability 8.9
  • ComfyUI commit 917faef771a2fd2f14f44af94f17da3d0b2803a3
  • Python 3.13.12, PyTorch 2.13.0+cu130, CUDA runtime 13.0
  • comfy-kitchen 0.2.18, transformers 5.13.1, NumPy 2.5.1
  • About 104 GiB for required model files; at least 150 GiB free is recommended for models, captures, analysis caches, and reports

Use the pinned ComfyUI commit for a strict reproduction. A newer ComfyUI build may run the workflow but is a different software condition and must be reported as such.

1. Accept the upstream terms and download models

Review and accept the Krea 2 Community License at https://huggingface.co/krea/Krea-2-Turbo and authenticate if required:

hf auth login
python download_models.py --models-dir ../models --all --accept-krea-license

The downloader uses the exact pinned revisions recorded in provenance/model_manifest.json: Comfy-Org for the original checkpoints and shared components, Winnougan for INT4 ConvRot, and vantagewithai for both GGUF files. It verifies all ten SHA-256 hashes and does not place weights in this dataset repository.

2. Configure ComfyUI

Install the pinned GGUF loader into ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI-GGUF.git
cd ComfyUI-GGUF
git checkout 6ea2651e7df66d7585f6ffee804b20e92fb38b8a
python -m pip install gguf==0.19.0

Change into reproduction/benchmark, copy config_base.example.json to config.json, copy config_extended.example.json to config_extended.json, and set the common paths in config.json:

  • paths.portable_root: root containing ComfyUI/ and, for Windows portable, python_embeded/python.exe
  • paths.models_dir: directory containing all seven downloaded files
  • paths.results_dir: keep results/krea2_formats_v1; the extension imports this immutable base into results/krea2_formats_v2_extended

Copy extra_model_paths.yaml.example to extra_model_paths.yaml, replace the common parent placeholder, and expose custom_nodes/krea2_benchmark through that file. Forward slashes are recommended in YAML on Windows.

For a standard Linux ComfyUI checkout, run the benchmark from the same Python environment as ComfyUI and adapt the launcher paths in config.json. The generated API workflow and analysis stages are platform-neutral; the supplied PowerShell launcher exactly matches the tested Windows portable environment.

3. Install analysis dependencies

The benchmark deliberately reuses ComfyUI's CUDA-enabled PyTorch and installs analysis-only packages into .vendor:

.\install_analysis.ps1

Equivalent shell command:

python -m pip install --target .vendor -r requirements-analysis.txt

4. Execute the campaign

Run the original five-format base campaign first:

.\run_benchmark.ps1 preflight
.\run_benchmark.ps1 weights
.\run_benchmark.ps1 generate
.\run_benchmark.ps1 analyze
.\run_benchmark.ps1 sheets
.\run_benchmark.ps1 report
.\run_benchmark.ps1 verify

Then run the three-format extension and unified eight-format analysis:

.\run_benchmark.ps1 preflight -Config .\config_extended.json
.\run_benchmark.ps1 weights -Config .\config_extended.json
.\run_benchmark.ps1 generate -Config .\config_extended.json
.\run_benchmark.ps1 analyze -Config .\config_extended.json
.\run_benchmark.ps1 sheets -Config .\config_extended.json
.\run_benchmark.ps1 report -Config .\config_extended.json
.\run_benchmark.ps1 verify -Config .\config_extended.json

The base campaign produces 150 scored images. The extension hard-links the immutable base captures, runs five BF16 and INT8 bridge repeats, generates 90 new scored images, and analyzes all 240 rows. Do not compare formats if initial-noise hashes, sampler equivalence, bridge evidence, or either completion audit fails.

5. Rebuild this Hugging Face release

From the dataset repository root after the reproduced campaign has completed:

python scripts/prepare_release.py --benchmark-root reproduction/benchmark --destination ../krea2-benchmark-release
python ../krea2-benchmark-release/scripts/validate_release.py --root ../krea2-benchmark-release --full

The builder refuses an existing destination. Move or remove a previous generated release deliberately before rebuilding.

Metric interpretation

  • LPIPS-Alex is the preregistered primary paired fidelity endpoint; lower is better.
  • DISTS and final-latent relative L2 are secondary fidelity endpoints; lower is better.
  • DINOv2 and image cosine similarity measure semantic/feature preservation; higher is better.
  • Artifact probes measure clipping, gradient behavior, grid boundaries, high-frequency power, flat-region noise, and color change.
  • Weight reconstruction streams each native quantized layout against BF16 and reports element-weighted error, cosine, and SNR.
  • Prompt-alignment and no-reference IQA scores supplement fidelity metrics but do not replace paired BF16 comparisons.
  • GPU speed results are hardware/runtime-specific. MXFP8 and NVFP4 used fallback paths, while GGUF used on-demand dequantized matrix multiplication on the tested SM 8.9 GPU.