Train your own on-brand image model from a Drive folder
Every Monday we check the folder where your design team drops approved brand photos and refresh your own image model so new visuals look like your brand.
Every Monday at 9am, check the Google Drive folder where our design team drops approved brand photos. If enough new images have landed since the last run, fine-tune a Replicate image model on them so everything we generate later stays on brand.
Let me configure: the Google Drive folder id holding approved brand photos, the minimum number of new images required to justify a run, the Replicate base model version to train from, the destination model that receives the trained version, the trigger word that will invoke this style at generation time, and the Slack channel for the report.
Start by listing the folder with Google Drive List Files. Keep only real image files (mimeType starting with image/), and only ones added since the last successful run. Google Workspace file types cannot be downloaded directly, so ignore anything that is not an actual image. Maintain a watermark between runs holding the last run timestamp, the file ids already trained on, and the previous trained version id, so a rerun never re-consumes the same photos.
Then apply the threshold gate before spending anything. If the count of new images is below the configured minimum, stop there. Do not upload, and do not create a training. Post a short Slack message saying the run was skipped, how many new images were found, and how many are needed. A training run costs real money and takes real time, so skipping is the correct outcome, not a failure.
If the threshold is met, download each new image with Google Drive Download File Content, bundle them into a single zip archive, and upload that archive to Replicate with Create File. This upload step is required rather than optional: Drive files are private, so Replicate cannot fetch them by URL. Per the Replicate docs, "Prediction input files are passed as public HTTP URLs or data: URIs; upload private files first via POST /files and reference the returned URL." Use the URL returned by Create File as the training input.
Start the fine-tune with Replicate Create Training against the configured base model version, passing the uploaded archive URL as the training images input and the configured trigger word, with the destination model as the training target.
Then poll for the result. Per the Replicate docs, "Predictions and trainings are async: create returns an id, a status of starting, and a urls object; poll GET /predictions/{id} or GET /trainings/{id} until status is terminal." Call Get Training on a sensible interval until status is terminal, meaning succeeded, failed, or canceled. Trainings routinely take many minutes and sometimes far longer, so tolerate a long wait and treat starting or processing as normal progress rather than a problem.
When the training succeeds, post to the configured Slack channel with Send a Message: the new trained version id, how many images went into it, and a one line note on what changed since the previous run, such as the change in image count versus last time and anything notable about the new photos. Then record the new version id, the trained file ids, and the run timestamp as the watermark for next week.
If the terminal status is failed or canceled instead, post the failure detail to the same Slack channel so someone can act on it. Include the training id and the actual error message Replicate returned rather than a generic failure notice, and leave the previous version id in place as the current model so nothing downstream breaks.
Example output
What does this prompt do?
- Checks your approved brand photo folder in Google Drive every Monday and picks up anything new since the last run.
- Refreshes your own private image model using those photos, so the images you generate later match your brand look instead of generic stock styling.
- Posts a Slack update when the new model is ready, including how many photos went into it and what changed since last time.
- Skips the refresh and tells you why when only a handful of new photos have landed, so you never burn a run on nothing.
What do I need to use this?
- A Google Drive account, and a folder where your design team saves approved brand photos
- A Replicate account, which is where your own image model is trained and kept
- A Slack workspace and a channel for the weekly update
- A starting image model to build on, plus a short keyword that will call up your style whenever you generate images later
How can I customize it?
- Change the schedule. Monday at 9am is only a default, and monthly works just as well for slower-moving photo libraries.
- Set the minimum number of new photos required before a refresh is worth running, so small drops just wait for next week.
- Point it at a different folder, send the update to another Slack channel, or change the keyword that calls up your style.
FAQs
How many new photos do I need before this is worth running?
What happens if only a couple of new photos were added that week?
How long does a refresh take?
Do my brand photos stay private?
What happens if the refresh fails?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.
Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.
Stop generating images that look nothing like your brand.
Turn the photo library you already own into an image model that keeps every new visual on brand.