cd /news/artificial-intelligence/fix-tensorwritesfailed-for-flux-2-kl… · home topics artificial-intelligence article
[ARTICLE · art-10560] src=gist.github.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Fix "tensorWritesFailed" for Flux.2 Klein 9B models in Draw Things — handles all CivitAI variants (ComfyUI FP8, BF16, F8_E5M2)

This article describes a Python script that fixes the "tensorWritesFailed" import error in Draw Things for Flux.2 Klein 9B models downloaded from CivitAI. The error occurs because Draw Things expects RMSNorm parameters named `key_norm.scale` and `query_norm.scale`, but many fine-tuned and ComfyUI-exported models use `key_norm.weight` and `query_norm.weight`, causing required schema slots to remain empty during validation. The script auto-detects the model variant, renames the norm keys, and optionally dequantizes FP8 weights, outputting a new `-DT.safetensors` file that imports successfully into Draw Things.

read3 min views21 publishedMay 22, 2026

(aka Bemo's Draw Things Klein Fix) Converts Flux.2 Klein 9B (and other Flux2-based) safetensors models so they import correctly into Draw Things. Draw Things' importer throws tensorWritesFailed at ~65% for many Flux.2 Klein models downloaded from CivitAI. The cause: Draw Things expects the RMSNorm parameters to be named key_norm.scale / query_norm.scale (Black Forest Labs' original naming), but most fine-tuned and ComfyUI-exported models use key_norm.weight / query_norm.weight (PyTorch default). The unrecognised keys are silently skipped, then a validation checkpoint at 65% fails because required schema slots are empty. Auto-detects the model variant and applies the appropriate fix: Output is always <original-name>-DT.safetensors alongside the source file.

  • Python 3.8+ numpy — only needed for ComfyUI FP8 models:pip install numpy python3 draw-things-flux2-klein-fix.py path/to/model.safetensors Then import the resulting -DT.safetensors file into Draw Things normally. ⚠️ GRAPHIC NSFW WARNING A significant number of the models listed below can be used to generate explicit sexual content. The links will more often than not take you to pages on CivitAI / CivitAI Red that contain graphic sexual imagery and sometimes video. I did not create these models. Links are provided purely for reference and I do not endorse any of the models or content accessible via the links below. No affiliation: This script is not affiliated with Draw Things, Black Forest Labs, CivitAI, or any of the model creators listed below. No warranty: The script creates a new -DT.safetensors file and does not modify the original. That said, it is provided as-is with no guarantees. Always verify the output imports correctly before deleting your source file. All of the following Flux.2 Klein 9B checkpoint merges have been run through this script and confirmed to import into Draw Things successfully. "Prefix strip only — norm keys already correctly named" means the model used Black Forest Labs' original .scale naming convention. For these models, the original community script (see below) is sufficient on its own. "Prefix strip + norm rename" and "Dequantised FP8→BF16 + norm rename" are additional fixes that only this script performs.
  • ComfyUI FP8 models output approximately 2× the original file size after dequantisation. Vintage Beauties V3 is an unusually large merged model and produces ~33 GB.
  • The script also fixes LoRAs that fail to fuse in Draw Things and MFLUX.
  • Non-Klein architectures (VAEs, text encoders, LLMs) will fail with an error — that is expected, they do not need this fix. The starting point was this community script by kernkraft235 — it strips the model.diffusion_model. key prefix and removes metadata , which is enough to get some models importing into Draw Things. For models whose norm keys are already named .scale (Black Forest Labs' original convention), kernkraft235's script works perfectly and is all you need. For many fine-tuned and ComfyUI-exported models, however, kernkraft235's script ran successfully and produced a converted file — but that file still failed to import into Draw Things. The additional problems are norm keys named .weight rather than .scale , and in some cases FP8 weights that need dequantising before Draw Things can read them. This script handles both on top of kernkraft235's original work. I have no background in Python or ML. This script was built entirely with Claude Code — I described the symptoms, it debugged and wrote the code. I have no idea whether the conversion process affects anything internally, or whether it impacts output quality or prompt adherence — that is beyond my ability to evaluate. What I can tell you is that I have run it on around 20 Flux.2 Klein checkpoint merges, they all import into Draw Things successfully where before they would have failed, and the images they generate do not appear to me to have suffered from the fixing process.
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @draw things 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/fix-tensorwritesfail…] indexed:0 read:3min 2026-05-22 ·