Nodes/ComfyUI_LayerStyle_Advance/LayerMask: Load Ben Model(Advance)
ComfyUI Node Runs on cloud

LayerMask: Load Ben Model(Advance)

The loader for BEN, PramaLLC's background-removal challenger

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerMask: Load Ben Model(Advance)
    • ben_model
    model
    device

    This is the loader half of the BEN background-removal pair in LayerStyle Advance - it does one job, load the model weights, and hands the result to the BenUltra node where the actual cutout happens. If you've used any of the pack's other split loader/processor pairs (LoadSAM2Model + SAM2UltraV2, LoadFlorence2Model + Florence2Ultra), this is the same shape: load once, reuse the model object across however many BenUltra calls you want without reloading from disk each time.

    BEN (Background Erase Network, from PramaLLC) is one of several segmentation models that chased BiRefNet's crown in early-to-mid 2025 with its own benchmark claims. Worth knowing going in: those were the model author's own numbers, not an independent comparison, and BEN's community footprint stayed modest - it never became the default the way BiRefNet did. That doesn't make it bad; it means don't assume it's the obvious pick just because it's newer. Test it against whatever you're currently using on your actual hard cases (hair, fur, semi-transparent material) before switching.

    The inputs that matter

    Just two:

    • model - a dropdown populated from whatever BEN weight files you've placed in ComfyUI/models/BEN. The README lists two options as available in the pack, BEN_Base and BEN2_base (the second-generation model), so if the dropdown is empty, that's your first thing to check - nothing's downloaded yet, not a node bug.
    • device - cuda or cpu.

    Output is a single ben_model (type BEN_MODEL) that plugs straight into BenUltra's ben_model input.

    Installing it

    Standard LayerStyle Advance install: ComfyUI Manager → search "ComfyUI Layer Style Advance", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git
    

    then run install_requirements.bat (portable) or install requirements.txt manually, and restart.

    The model itself is a separate download - this node loads files, it doesn't fetch them. Grab the BEN weights from the author's HuggingFace repo (chflame163/ComfyUI_LayerStyle, under ComfyUI/models/BEN) or the linked BaiduNetdisk mirror, and drop the folder into ComfyUI/models/BEN. Same pattern as every other model-backed node in this pack: the README's single combined download link covers everything, or you can cherry-pick just the folders you need.

    Common issues

    Dropdown is empty / node throws on first use. Nothing's in ComfyUI/models/BEN yet. This node doesn't auto-download - place the weights first, then restart or refresh.

    Works, but the pack won't even import. This isn't specific to LoadBenModel, but it's worth knowing: LayerStyle Advance's dependency stack is genuinely picky, and a transformers/tensorflow version clash is a documented way the entire node pack fails to load, not just this node. Running the plugin's repair_dependency.bat (or repair_dependency_aki.bat for the Aki package) fixes most of these. Also double-check you're not running the old, unsplit ComfyUI_LayerStyle alongside this Advance pack - community reports of "always failed to import" on this exact repo turned out to be a leftover combined install; deleting it and reinstalling the correct split packs fixed it.

    Slow first load. BEN's weights aren't huge compared to something like SAM's ViT-H, but if this is your first model-backed node in the pack, confirm you're loading from local disk and not accidentally hitting a network path - device: cuda won't help load time if the bottleneck is disk or network I/O.

    Category😺dzNodes/LayerMask

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBO0 options:
    deviceCOMBO2 options: cuda, cpu

    Outputs (1)

    NameTypeDescription
    ben_modelBEN_MODEL