by vunderba · 1y ago · 0 comments
I'd recommend several possible methods to fix this:
1. Set a MIN_ORIGINAL_IMAGE as a percentage - though it'll have to be a perceptual check since Nano degrades the original image. When it falls below this value, reset the counter.
2. Setup an intermediary LLM to determine if the user's instructions are "malicious"
3. Add system instructions to Nano Banana that coerce user prompts to only allow them to fill in a "portion" of the original image
Imo seeing the janky api made me realize that a lot of the magic is still there even when it goes awful.