If you check the flash size in your start up code (ESP.getFlashChipSize()) that should show as 4MByte on ESP-12 modules but I think most ESP-01 only have 1MByte.
If you can spare a pin on the esp-12 variant then you could wire that to 0V. Setting it to Input with internal pull up should then allow you to see that as a 0 on the ESP12 but not on the esp-01