Skip to content

v0.4.3 — no more holes: BiRefNet matte by default (+ v0.4.x quality & crash fixes)

Choose a tag to compare

@pwilkin pwilkin released this 16 Jul 23:46
· 67 commits to main since this release

The "holes and patchy skin" release. Everything reported on issue #1 after v0.2.1 traced to five distinct root causes — all fixed here. Output quality is now at statistical parity with the reference pipeline (multi-seed, matched-conditioning A/B on the surface-noise metric, in mean and tail).

v0.4.3 — BiRefNet background removal by default

  • The old default white-threshold matte read specular highlights (near-white pixels, min(RGB) ≥ 232) as background, punching holes into the alpha right where the object shines — and the flow, conditioned on "nothing there", generated real holes at those spots (helmet crest, axe edge). Reproducible at fixed seed; cracked by @Slion's observation that bright specular areas are at risk of holes.
  • --bg-removal now defaults to auto: a pre-matted image keeps its own alpha; otherwise BiRefNet runs whenever birefnet.gguf is present in the models dir; the plain threshold matte remains available explicitly (--bg-removal threshold) and as a warned fallback.

v0.4.2 — Windows "no output" hotfix

  • v0.4.1's hole filling broke a per-voxel/per-vertex correspondence in the final write stage: an out-of-bounds read that crashed silently on Windows right after [7/7] write (Linux happened to survive it). Anyone on v0.4.1 should update.

v0.4.1 — exporter & postprocess quality fixes

  • Welded shading normals: vertex normals were computed after the xatlas UV split, so every chart boundary rendered as a shading crease and each chart as its own facet — the "patchy/orange-peel skin" in clay renders. Normals are now welded by position (what the reference does); seam-twin deviation dropped from ~30° to 0.006°.
  • Hole filling ported (CuMesh fill_holes, max_hole_perimeter=3e-2): runs on the decoded mesh before the remesh, like the reference.
  • Watertight output: the UV bake dropped one copy of every duplicate face, opening ~1000 boundary edges on an otherwise closed mesh (and sometimes keeping the inward-facing copy → backface-culled "holes"). Final meshes now export with 0 boundary edges (reference: ~34).

v0.4.0 — FlashAttention precision fix (the big one)

  • Three of ggml's four CUDA/HIP FA kernels silently ignored GGML_PREC_F32 and accumulated in F16, biasing the shape and texture latents (~120σ off). This was the root cause of the patchy skin, melted studs, and the turret's dull metal. Fixed upstream in our ggml fork (pwilkin/ggml, also on NVIDIA Turing+); FA is on by default again.
  • Plus: >2³¹-element overflow fixes for res-1024 scale, chunked c2s/ConvNeXt decode (−40% peak memory), and — all thanks to @Slion — the CUDA PAD grid-limit fix, the Windows build fixes, the GLB metadata extras, and the tireless quality reports on #1 that drove this whole release line.

v0.3.0 — GPU QEM decimation

  • Faithful CuMesh QEM edge-collapse port (CPU + CUDA/HIP + Vulkan compute), replacing the meshopt/FQMS stand-in: adaptive, low-sliver triangulation, single-component output, ~18× faster than the CPU path.

Note on remaining "holes in thin parts": the model builds helmets as hollow shells over a hallucinated interior head (the reference does the exact same — it's a training-data convention). Whether a paper-thin crest-to-dome contact fuses is decided per seed, in both implementations. With the new matte this is rare; if it happens, reroll the seed.