The SDK reserves 5 * 4kByte on top, and you want to have some additional room left for SPIFFS. I'd estimate that the image should not be larger than 428kByte (512 - 5*4 - 64).
You need to see which/how many modules fit into that budget.
We had a similar discussion recently at https://github.com/nodemcu/nodemcu-firm ... -270538659.