YuxinWenRick / hard-prompts-made-easy

MIT License
580 stars 54 forks source link

add CLI script, clean up readme, more useful printing #5

Closed bakkot closed 1 year ago

bakkot commented 1 year ago

I've made a couple of tweaks which will hopefully make it easier for people to get started with this project:

I moved the usage example from the readme into its own file and made it read the path to the image or images from the CLI arguments, so it can be run directly without having to know Python.

I've tried to document usage a little bit more, including all of the parameters. I'm not sure what prompt_bs and batch_size do from their descriptions, so I left the descriptions from the existing readme. Can you explain those in more detail?

I changed the default prompt length from 8 to 16 tokens, since the paper says that 16 was the most generalizable.

Lastly, I tweaked the script so it will (optionally) print whenever it finds a new best candidate, instead of printing whichever candidate it is looking at every 100 steps. That's more useful, I think. It still prints a message every 100 steps so you can see how close it's getting to finishing.

YuxinWenRick commented 1 year ago

Hi, thank you so much for such great pull request! I really appreciate your contribution! Love the CLI script!