Nodes/ComfyUI-Florence2/Florence2ModelLoader
ComfyUI Node Runs on cloud

Florence2ModelLoader

Load a Florence-2 model you already downloaded

By kijai·Created 2 years ago·Updated 3 months ago· 1,729
Florence2ModelLoader
  • lora
  • florence2_model
model
precision
convert_to_safetensorsfalse

Every Florence-2 workflow needs a loader, because Florence2Run won't fetch its own weights - it takes a model handle and runs it. This node is the "I already have the files" loader. It scans ComfyUI/models/LLM, lists whatever Florence-2 models are sitting there, and hands one out as an FL2MODEL you plug into the run node.

There are two loaders in this pack and it's worth knowing which is which. DownloadAndLoadFlorence2Model (the one the README talks about) reaches out to Hugging Face and downloads a model into models/LLM the first time you run it - zero setup, but it needs a connection and a moment to pull gigabytes. Florence2ModelLoader is the local counterpart: it only shows models that are already on disk. Use it when you've placed the weights yourself, when you're offline, or when you want a finetune the auto-downloader doesn't list.

The pack is from kijai, which is a name worth trusting. He's the author behind WanVideoWrapper - the thing basically the entire community uses to run Wan video in ComfyUI - plus a long list of other model wrappers. When kijai ports a model into ComfyUI, it tends to become the default way people run it, and Florence-2 is no exception.

How it works

Nothing exotic. On execution the node reads your models/LLM folder, loads the selected model at the precision you picked, optionally merges a LoRA adapter, and returns the loaded model object. Florence-2 ships in a few flavors - base and large, each with a plain and an -ft (finetuned) variant, plus community finetunes like MiaoshouAI's PromptGen or CogFlorence for richer captions. They all load through this same node; the folder decides what's on the menu.

The inputs and outputs that matter

Two required inputs, both dropdowns:

  • model - the Florence-2 model to load, populated from ComfyUI/models/LLM. If this list is empty, that's your problem right there: you haven't downloaded a model yet. Either run DownloadAndLoadFlorence2Model once to fetch one, or drop a model folder (e.g. microsoft/Florence-2-large) into models/LLM by hand and refresh.
  • precision - fp16, bf16, or fp32. For a beginner: fp16 is the sensible default (fast, low VRAM, and Florence-2 is a small model so quality barely moves). Pick bf16 if you're on a newer card and hit numerical weirdness; fp32 is full precision you almost never need for this - it just doubles the memory for no visible gain.

Two optional inputs. lora (type PEFTLORA) accepts an adapter from DownloadAndLoadFlorence2Lora and applies it on top of the base model - that's how you run a captioning finetune without downloading a whole separate merged checkpoint. convert_to_safetensors re-saves the model in the safetensors format; the official Florence-2 weights ship as pickle .bin files, and flipping this on gives you the safer, memory-mappable format on disk. It's a one-time convenience, not something you toggle every run.

The single output is florence2_model (FL2MODEL). It goes straight into the florence2_model input on Florence2Run, and that's the whole wiring: loader → run.

Common issues

The empty dropdown is the number-one gotcha, and it's really a "no model on disk" message wearing a disguise. The number-two issue is install-level and shared with the whole pack: the requirements need transformers >= 4.38.0, and if you cloned the repo without running pip install -r requirements.txt (or your environment pins an older transformers for some other node), the loader can fail on import before you ever see the dropdown. Check the ComfyUI startup console - a transformers version complaint or a missing-dependency traceback shows up there. If you'd rather skip the folder-wrangling entirely, use the auto-downloading loader for your first run and switch to this one later.

CategoryFlorence2

Inputs (4)

NameTypeDefaultDescription
modelCOMBOmodels are expected to be in Comfyui/models/LLM folder
precisionCOMBO3 options: fp16, bf16, fp32
loraoptPEFTLORA
convert_to_safetensorsoptBOOLEANfalseSome of the older model weights are not saved in .safetensors format, which seem to cause longer loading times, this option converts the .bin weights to .safetensors

Outputs (1)

NameTypeDescription
florence2_modelFL2MODEL