The Costume Photos I Want to Make
Costume Portraits started from a simple idea: let people use their own photo to create a portrait in traditional Chinese costume, complete with a matching scene. I care about the quality of the clothing and the image, and I want the result to keep the person's own features and character.
Connecting Gemini After Many Revisions
The app has gone through several rounds of changes and is now connected to Gemini. Uploading a photo, picking a look, sending it off for generation, and getting the result back are steps that have to be wired up one at a time. The integration is real progress, but one step responding does not mean the whole app is done.
Where Things Actually Got Stuck
In early testing, there were times when the photo upload entry point could not be confirmed, and both the detection conditions and the wait times were things to investigate. Later, generation sometimes did not start on its own, and images did not always make it back into the app. These notes showed me that the state of an external page, and how the waiting is handled, directly decide whether someone can finish what they started.
What This Post Covers
This post is about the many iterations and the Gemini integration. It does not verify fully automatic image generation, returning the result, or downloading and delivering the final image, so these early notes should not be read as a verdict on whether the whole flow works today.
Verifying the Full Flow
A full acceptance check has to confirm each step in turn: the photo can be submitted, generation starts, the result appears, and the final image can be saved. While someone is waiting, or if something fails, they also need to know what is going on. What I want is for people to walk away with their own costume portrait, not just to see a generate button in the interface.
How this is made: these notes come from my own projects and experiments. I use AI assistants (Claude and Codex) heavily for drafting, translation and editing; I choose the topics and decide what gets published. — Michael Chuang
