Nodes/ComfyUI-NunchakuFluxLoraStacker/hswq_DownloadAndLoadFlorence2Lora
ComfyUI Node

hswq_DownloadAndLoadFlorence2Lora

A one-item dropdown, and that's the entire node

By ussoewwin·Created about a year ago·Updated 15 days ago· 22
hswq_DownloadAndLoadFlorence2Lora
    • lora
    ◄model▾►

    A dropdown with exactly one option. That's the node - and yes, it's intentional, not half-finished.

    hswq_DownloadAndLoadFlorence2Lora downloads a single known PEFT adapter (NikshepShetty/Florence-2-pixelprose) into ComfyUI/models/LLM/Florence-2-pixelprose/ and hands you its local path as a PEFTLORA value. You wire that into either Florence-2 loader, which wraps the base model with peft. One LoRA, one click, no hub browsing.

    What the adapter is for

    It's a LoRA fine-tune of Florence-2 on the PixelProse caption corpus - a very large, synthetically generated image-caption dataset, the kind built to describe a picture in more words than a tag list ever would. The practical intent is better captions for dataset work: if you're auto-captioning a LoRA training set and the stock detailed_caption output reads a bit thin, this is the cheap experiment. It changes how the model talks about an image, not what it can do - it won't add OCR or grounding ability.

    It's also the honest division of labour in this pack: the captioner is the cheap part, and the community practice around Florence-2 has always been to run it alongside a WD14 tagger rather than instead of one. Florence describes scenes a booru tagger can't, but it doesn't emit the known tag vocabulary - so people concatenate the two, or pipe Florence's description through an LLM to reshape it into tags.

    Inputs and outputs

    • model - the enum, choices literally: NikshepShetty/Florence-2-pixelprose. The implementation raises a value error for anything else, so you can't point this node at your own adapter. For that, use peft directly or a different pack.
    • output lora (PEFTLORA) - the local directory path of the downloaded adapter. That's what the loaders pass to PeftModel.from_pretrained, which is why it works offline once it's been fetched once.

    The model itself is not included. You still need a base Florence-2 from hswq_DownloadAndLoadFlorence2Model or hswq_Florence2ModelLoader, and you connect this node's lora output to that loader's optional lora input. The loader is what does the wrapping.

    Installing it

    Part of ussoewwin/ComfyUI-NunchakuFluxLoraStacker - the pack that also holds a Nunchaku FLUX LoRA stacker, a TensorRT CCSR upscaler and the ControlAltAI utility set. Manager: search ComfyUI-NunchakuFluxLoraStacker. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ussoewwin/ComfyUI-NunchakuFluxLoraStacker.git
    pip install -r requirements.txt
    

    Restart. The Florence-2 half of the pack needs transformers>=4.39.0,!=4.50.*, peft, accelerate, timm, matplotlib and pillow - all covered by the requirements file, which you should install in full: the pack's CCSR dependencies are imported at load time and any missing one takes the whole node set down with it. You need network access the first time this node runs (that's when the download happens), plus room in ComfyUI/models/LLM/ for the adapter files.

    If something's off

    The first run hangs with nothing in the UI. It's downloading. The console is where the progress appears.

    An error about the adapter and the base model not fitting. PEFT adapters attach to specific layer shapes, so an adapter and a base model that weren't built for each other fail at load rather than producing bad captions. This adapter is trained for the Florence-2 architecture; if you're pairing it with a large base and something doesn't line up, try the size you know it was trained against.

    A half-downloaded folder. Delete ComfyUI/models/LLM/Florence-2-pixelprose/ and re-queue; the node checks for the directory's existence and skips the download if it's there, so a partial folder will silently persist otherwise.

    You can't select your own LoRA. Correct - one entry by design. This node exists because the author wanted a one-click path to a specific adapter, not a general adapter loader.

    CategoryFlorence2

    Inputs (1)

    NameTypeDefaultDescription
    modelCOMBO1 options: NikshepShetty/Florence-2-pixelprose

    Outputs (1)

    NameTypeDescription
    loraPEFTLORA—