zeke / aimg

🧑‍🎨 A Node.js CLI for generating AI images with Replicate and saving them to disk.
19 stars 0 forks source link

feat: support all image generation models on Replicate #2

Closed zeke closed 2 months ago

zeke commented 2 months ago

Replicate has some "official" models that you can run without a version string, like stability-ai/stable-diffusion-3 and black-forest-labs/flux-schnell, but for other "community" models you need to specify a fully qualified string that includes the version of the model, eg. {owner}/{model}:{sha}

This PR updates aimg to automatically handle cases when the Replicate API barfs on a shorthand model identifier. It fetches a version, then re-runs the prompt with the full version string.