moondream icon indicating copy to clipboard operation
moondream copied to clipboard

Bug in finetune_region.py after latest update

Open dawnfinzi opened this issue 8 months ago • 2 comments

Love the model update! I think there's a small bug in finetune_region.py introduced with the addition of the log-scale size encoding. Now that we have https://github.com/vikhyat/moondream/blob/f74a1219f666a946f1a5904f7a4299485239fa42/moondream/finetune/finetune_region.py#L204, the additional extend here https://github.com/vikhyat/moondream/blob/f74a1219f666a946f1a5904f7a4299485239fa42/moondream/finetune/finetune_region.py#L205-L210 is unnecessary and results in a TypeError (only integer tensors of a single element can be converted to an index) when the loss is called.

dawnfinzi avatar Apr 08 '25 04:04 dawnfinzi

Thanks for reporting, tagging @EthanReid to take a look.

vikhyat avatar Apr 11 '25 06:04 vikhyat

@dawnfinzi Thank you for pointing this out! Sorry for the delay, the fix can be found here: https://github.com/vikhyat/moondream/pull/277

EthanReid avatar May 06 '25 00:05 EthanReid