# Conflicts: # studio/backend/core/inference/diffusion.py # studio/frontend/src/features/images/images-page.tsx
2.8 KiB
2.8 KiB
- Decision: use ComfyUI fp8 +
--fastas the fair “ComfyUI best” baseline because earlier GGUF-only comparisons understated ComfyUI’s optimized path. - Decision: compare Z-Image and FLUX.2-klein using bf16 single-file checkpoints loaded through
UNETLoaderwithweight_dtype=fp8_e4m3fn_fast, because ComfyUI casts to fp8 and this matches its best available dense path. - Decision: final product conclusion is GPU
diffusers+optsplus CPU/Macsd.cpp, becausediffusers+optswins GPU across all 4 models whilesd.cppwins CPU. - Edited
/mnt/disks/unslothai/ubuntu/workspace_81/unsloth/scripts/comfy_bench.py: addedz-image-fp8andflux.2-klein-fp8workflow support using ComfyUI fp8 casting. - Edited
/mnt/disks/unslothai/ubuntu/workspace_81/unsloth/outputs/FINAL_engine_comparison.md: updated final comparison with all 4 ComfyUI best fp8 results and final goal scorecard. - Ran
python3 -c "...HfApi(...).list_repo_files(...)"to find single-file checkpoints. Key output:Comfy-Org/z_image_turbohadsplit_files/diffusion_models/z_image_turbo_bf16.safetensors;Comfy-Org/flux2-kleinhadsplit_files/diffusion_models/flux-2-klein-4b.safetensors;Comfy-Org/FLUX.2-kleinreturnedRepositoryNotFoundError: 404 Client Error. - Ran download command from
/mnt/disks/unslothai/ubuntu/workspace_81usinghf_hub_download; key output:OK z_image_turbo_bf16.safetensors: 12.31 GBandOK flux-2-klein-4b.safetensors: 7.75 GB. - Ran
python -m py_compile scripts/comfy_bench.py && echo "compile OK"; exit OK withcompile OK. - Launched ComfyUI with
CUDA_VISIBLE_DEVICES=7 ComfyUI/.venv/bin/python ComfyUI/main.py --listen 127.0.0.1 --port 8235 --fast; background server started, later stopped. - Ran benchmark command:
python3 -u scripts/comfy_bench.py --port 8235 --gpu 7 --families z-image-fp8,flux.2-klein-fp8 --tag best2_fp8; key output:z-image-fp8OKlat=1.51s vram=75.0GB;flux.2-klein-fp8OKlat=1.00s vram=85.8GB. - Ran server cleanup command using
ps -ef | grep '[C]omfyUI/main.py' | awk '{print $2}' | while read p; do kill "$p"; done; key output:comfy procs: 0. - Final complete best-vs-best table:
z-imageour0.509(int8)vs ComfyUI fp81.51=3.0x;flux.2-kleinour0.269(int8)vs1.00=3.7x;flux.1our0.518(fp8)vs1.00=1.9x;qwen-imageour1.78(int8)vs6.01=3.4x. - Resolved error: initial repo guess
Comfy-Org/FLUX.2-kleinwas missing withRepositoryNotFoundError: 404 Client Error; resolved by usingComfy-Org/flux2-klein. - Completed: all 4 models now have fair ComfyUI best fp8 comparisons against our best results.
- Completed: final conclusion documented that
diffusers+optsbeats ComfyUI GPU best by1.9–3.7x,sd.cppbeats CPU ComfyUI/diffusers by about~1.7x, and accuracy rule is satisfied withLPIPS ≤ 0.17. - Pending: none stated in this span.