Author: Rune

Workflow Source: https://openart.ai/workflows/runebinder/easy flux inpaint florence sam2 segs detailer/WbgLBFA3MmdDwuXy4g92

Index 0 Error: Some people have encountered the "nothing in index 0" error, and today I ran into the same issue. Whether Florence's large model was chosen, it worked well when generating an image, and then I swapped to a different image, which is when the error occurred. Changed the model to base, and it went well. Tried some other versions of Florence, and the error appeared again. Changed the image, went back to large size, no error. It seems that some versions of Florence fail to pick up the prompts that need to be masked and provide empty data to the coordinate node, resulting in the error.
So, if you are indeed affected, try the base fluid that is least affected, or try changing your mask prompts. If neither of these works, the worst-case scenario is to switch to manual masking and then try auto again on the next image you want to inpaint.
Update 4: Added an inverted mask node. If you place a person into the Florence prompt box for auto-masking and enable the reverse mask node, you can use it to inpaint the background.
Update 3: Added a pair of LoRAModelLoaderOnly nodes.
Update 2: Added a ModelSamplingFlux node, not quite sure how I missed it. Also, replaced the Load and Resize Image node with a standard load image node and added an image swap node to the Manual mask group. A few times I switched to that but forgot to add the image to the Florence group's load image, so the result was not what I expected. It seems silly to load the same image twice, so I swapped it with the switch mask. If you are using Florence and SAM2 for auto-masking, set both to true; if you need to manually mask something, set them to false.