Skip to content

LocalBG v1.0.4

Choose a tag to compare

@urmandalabs urmandalabs released this 28 Feb 15:14
· 3 commits to main since this release
c540162

Major Update

🔄 Model Changes & Improvements

Removed U2Net

  • The U2Net model has been removed from LocalBG.
  • After testing and comparison, Inspyrenet consistently delivered better results.
  • Inspyrenet provides:
    • Cleaner edge refinement
    • Better hair and fine-detail handling
    • More consistent foreground extraction

Additionally, Inspyrenet performs almost as fast as U2Net, making U2Net redundant.


🛠 Improved Error Logging

  • Added significantly improved error logging.
  • Errors are now:
    • More descriptive
    • Easier to debug
    • Better categorized
  • Model loading, GPU issues, file handling, and export problems now provide clearer feedback.

This makes troubleshooting much easier for both users and developers.


✨ New Features

WebP Export Support

  • Added support for WebP export.
  • Previously, only PNG export was available.
  • WebP allows significantly smaller file sizes while maintaining high visual quality.

Alpha Mask Export

  • You can now export the generated alpha mask separately.
  • Useful for advanced editing workflows and external compositing.

Auto Object Center

  • The detected foreground object is now automatically centered in the output image.
  • Improves composition consistency across processed images.

Custom Background Image

  • You can now set a custom background image in addition to solid colors.

Model Caching Improvements

  • Models are now cached correctly.
  • If you change settings that are not related to the model or GPU, the cached model will be reused.
  • This results in significantly faster processing after the first run.

⚡ Improved Compression

A new compression dropdown has been added with the following options:

Option Description
None No compression, original PNG preserved
Lossless (Very High) Metadata stripped + oxipng optimization (no quality loss)
32-bit (High) Converts 16-bit/channel → 8-bit/channel + strip + optimize
256 colors (Medium) Palette quantization to 256 colors + strip + optimize
128 colors (Low) Palette quantization to 128 colors + strip + optimize

🔎 Additional Optimization

  • Alpha Optimization (optimize_alpha=True)
    Allows oxipng to optimize fully transparent pixels for better compression without affecting visual transparency.