Starting with a garment photo
I created Clothify to generate an image of someone wearing a garment from an existing product photo. Discord provides the entry point: users submit an image, choose the garment, person, build and viewing angle, then receive the result in the conversation.
I designed menus, buttons and additional text input so users can make these choices without handling API parameters. Interactions belong to the person who submitted the request, and a job identifier makes the work traceable. The garment type also accepts a description when the predefined menu is not sufficient.
Separating requests from generation
The Python bot saves the file and a request in PostgreSQL. A database notification wakes the n8n workflow, which prepares the parameters, builds the prompt, calls the model through OpenRouter and saves the returned image. The bot then checks processing state to deliver the result in Discord.
I chose notification-based triggering for the start and straightforward polling for delivery. The database distinguishes completed generation from completed delivery. The bot relies on that data contract; image API details stay in n8n. Changing models can therefore be handled in the generation workflow, without rewriting the Discord interaction.
Connecting user choices to the image
The selected angle becomes a camera instruction. The prompt asks the model to preserve the garment, fabric and logos, frame below the face and remove interface elements surrounding a source screenshot. These instructions guide generation; surfaces absent from the source photo still require interpretation by the model.
I worked on problems at the boundaries between components. A fixed camera instruction could contradict the selected view. A late state update could mark a completed job as processing again and prevent delivery. I corrected prompt construction and transition ordering, then unified shared-volume paths so the bot and n8n refer to the same files across their environments.
Keeping the integration changeable
Business settings are separated from environment configuration. n8n exports are versioned with the code so the generation logic is available for rebuilding the service. The project documentation explains these contracts and the model-switching procedure.
The video shows the Discord bot. The portfolio demo offers two garments in four saved views that can be explored for free. Its access-code generation calls the image model directly, separately from the Discord, PostgreSQL and n8n workflow. I kept that distinction so visitors can inspect the examples without starting another generation.