need this script optimized, it's for automatically cropping images in a specific way. basically it crops a central object (an old coin, a stamp, a trading card, etc), then applies a subtle background blur.
it's currently really quite slow. need to get it down to like a second or two at most.
or maybe some tips on how to write prompts to improve this script? kinda long, at 250 lines. AI's have been breaking it when i try. they can't grasp the whole thing.
pics are pretty large. 6000x4000 px
⬇️⬇️⬇️⬇️⬇️⬇️