Iteratively edits an image with OpenAI’s gpt-image-1, feeding each result back as the next input. Optionally applies a yellow‑tint color correction between steps. Each run writes outputs into a fresh UUID directory.
- Python 3.10+ recommended
- Install:
pip install openai(addopencv-python numpyif using--correct) - Set key:
export OPENAI_API_KEY=... - Run:
python main.py -i example.jpg -p "Your prompt" -n 3 [-r 2] [--correct]python main.py -i IMAGE -p PROMPT -n N [-r RETRIES] [--correct]-i, --imagebase image path-p, --prompttext prompt-n, --niteration count-r, --retriesauto‑retry on failure (otherwise prompts)--correctsave and use color‑corrected frames between steps
- Creates
<uuid>/generated/01.png, 02.png, ... - With
--correctalso writes<uuid>/corrected/01.png, ...and uses corrected frames for the next iteration
make_movies_from_stills.py: turns PNG sequences (01.png,02.png, ...) into MP4s via ffmpeg in all subdirectories of the current workdir. Example:python make_movies_from_stills.py
MIT