The Core i5-3317m does not exist, I assume you are referring to the Core i5-3320m.
The primary difference is low clockspeed in the i5-3317u which means lower power consumption and lower performance. If you need to maximize the battery life, then go for the i5-3317u. If the laptop is going to be plugged in most of the time and battery life is less of a concern then go with the i5-3320m.
Additionally, the Intel HD 4000 has lower clockspeed in the i5-3317u compared to the i5-3220m to save power. This will decrease performance of any Photoshop effect that uses the GPU.