Breaking changes
- Local servers now bind to
127.0.0.1instead of0.0.0.0.cog serve,cog run -p,cog predict, andcog trainno longer expose the prediction endpoint to your whole network by default. To get the old behavior back, usecog serve --host 0.0.0.0orcog run -p 0.0.0.0:8888—-pnow acceptshost:port. (#2812)
New features
-
Browser playground.
cog playgroundstarts a local, schema-driven web UI for talking to a running model — a Postman-like tool that reads the model's OpenAPI schema and builds the input form for you, with a request inspector and webhook relay. Point it at anything speaking the Cog HTTP API with--target. (#3123) -
cog serve --playground. Serve the model and the playground in one command. The playground gets its own port (--playground-port, default 9000,0picks a free one) and both URLs are printed on startup. (#3154) -
@cog.concurrentdecorator. Configure async runner concurrency on the method that does the work instead of incog.yaml:class Runner(cog.BaseRunner): @cog.concurrent(max=4) async def run(self, prompt: str = cog.Input()) -> str: return await generate(prompt)
The value is extracted statically at build time.
concurrency.maxincog.yamlstill works and still takes precedence, but it now warns on build — remove it when you migrate. (#3089) -
Input validation before build and run.
cog predict,cog run, andcog trainnow validate-iinputs against the model's OpenAPI schema before building the image or starting the container, so a typo fails in a second rather than after a full build. Covers unknown input names, missing required inputs, type mismatches, enum values, numeric bounds, string length, and regex patterns. The schema is generated statically fromcog.yaml; for existing images it's read from theopenapi_schemalabel. (#3097) -
acceptonPathandFileinputs. Declare the MIME types or extensions an input takes —Input(accept="image/*"),Input(accept="audio/wav,audio/mp3"),Input(accept=".safetensors,.bin")— and Cog emits it asx-cog-acceptin the OpenAPI schema so UIs and clients know what to offer. Usingaccepton a non-file type is a build error. (#2863) -
Local wheels and source archives in requirements.
build.python_requirementsnow accepts bare local paths like./dist/mylib-0.1.0-py3-none-any.whlor./packages/localpkg.tar.gz. Paths resolve relative to the requirements file, and only the referenced artifacts get staged into the build..whl,.zip,.tar.gz,.tgz,.tar.bz2, and.tar.xzare supported. (#3095)
Improvements
- Readable logs from local commands.
cog serve,cog run,cog predict, andcog trainnow run the model with console-formatted logs instead of production JSON. Deployed models are unaffected. (#2806) - Download progress for
cog weights.cog weights importandcog weights pullshow live Docker-style progress while they populate the local weight store. (#3087) - Prebuilt base images are documented. New base images page covers what's on Cog's prebuilt base images, how
--use-cog-base-imageworks, and how it interacts with--use-cuda-base-image. (#3088)
Bug fixes
- GPU builds on CUDA base images work again. Builds on
nvidia/cudaimages failed withexternally-managed-environmentbecause uv-managed Python is marked PEP 668 externally managed and uv 0.9.x enforces it. Cog now passes--break-system-packageswherever it installs into a uv-managed Python, not just incog base-image. (#3073) - Explicit
cudnnwith a CUDA minor version now validates. A config pairingcuda: "11.6"withcudnn: "8"was rejected up front even though11.6resolves fine to a patch-level base image likenvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04. Validation now matches versions the same way image selection does. (#3070) - Install one-liners work on Linux arm64.
uname -mreportsaarch64there, but the release asset iscog_Linux_arm64, so the documented curl command andtools/install.shboth 404'd. Both now normalize the architecture. (#3066) - Generated OpenAPI schemas report the real Cog version.
info.versionwas hard-coded to0.1.0; it now carries the version that built the schema. (#3075) cog weights pullis quieter. Directory entries in weight tarballs no longer produceskipping unexpected tar entrylines. (#3076)