Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "runpod-workers/comfyui-base" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
69 changes: 29 additions & 40 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,50 @@

Thanks for your interest in contributing! This repository builds a compact, production-ready ComfyUI container optimized for RunPod.

## Releases
## Adding a Changeset

This repository uses GitHub Actions to build and publish Docker images to Docker Hub. No local builds are required for contributors.
When your PR includes user-facing changes, add a changeset so the release notes and version bump happen automatically:

Prerequisites (repository secrets set once):
```bash
npx changeset
```

- `DOCKERHUB_USERNAME`
- `DOCKERHUB_TOKEN` (Docker Hub access token)

Create a new release of the image:
You'll be prompted to pick a bump type (`patch`, `minor`, or `major`) and write a short description. This creates a markdown file in `.changeset/` — commit it with your PR.

1. Choose a version (semantic, e.g., `vX.Y.Z`).
2. Create the release by either:
- Pushing a tag: `git tag vX.Y.Z && git push origin vX.Y.Z`, or
- Publishing a GitHub Release with tag `vX.Y.Z`, or
- Manually running the “Release” workflow and providing `version = vX.Y.Z`.
3. The “Release” workflow will build and push both image variants via `docker-bake.hcl`:
- `runpod/comfyui:vX.Y.Z` and `runpod/comfyui:latest`
- `runpod/comfyui:vX.Y.Z-5090` and `runpod/comfyui:latest-5090`
- **patch** — bug fixes, dependency bumps
- **minor** — new features, non-breaking changes
- **major** — breaking changes (new image tag scheme, removed flags, etc.)

Notes:
If your PR is purely internal (CI tweaks, docs, refactoring with no behaviour change), you can skip the changeset.

- Tags are defined in `docker-bake.hcl`. Do not override tags in the workflow.
- Stack details and ports: see `docs/conventions.md`.
## Release Process

Troubleshooting releases:
Releases are fully automated via [changesets](https://github.com/changesets/changesets):

- If the workflow fails on tags, ensure you didn’t try to override `tags` via bake `--set`.
- Confirm Docker Hub secrets exist and have push permissions to `runpod/comfyui`.
1. **PR is merged to `main`** — the Changesets workflow runs. If pending changesets exist, it creates (or updates) a **"chore: version packages"** PR that bumps `package.json` and updates `CHANGELOG.md`.
2. **The "version packages" PR is merged** — the Changesets workflow runs again, detects the new version, and creates a **GitHub Release**.
3. **GitHub Release triggers `release.yml`** — Docker images are built and pushed to Docker Hub via `docker-bake.hcl`.

## Release process
### Docker Image Tags

Releases are tag-driven and/or GitHub Releases. The workflow builds and pushes both variants:
On each release (e.g. `2.0.0`):

- `runpod/comfyui:vX.Y.Z` and `runpod/comfyui:latest`
- `runpod/comfyui:vX.Y.Z-5090` and `runpod/comfyui:latest-5090`
| Tag | Description |
|---|---|
| `runpod/comfyui:2.0.0-cuda12.8` | Pinned release, CUDA 12.8 |
| `runpod/comfyui:2.0.0-cuda13.0` | Pinned release, CUDA 13.0 |
| `runpod/comfyui:cuda12.8` | Always latest CUDA 12.8 build |
| `runpod/comfyui:cuda13.0` | Always latest CUDA 13.0 build |
| `runpod/comfyui:latest` | Always latest CUDA 12.8 (default) |

Steps:
### Emergency Manual Release

1. Ensure repository secrets exist:
- `DOCKERHUB_USERNAME`
- `DOCKERHUB_TOKEN` (Docker Hub access token)
2. Create a version tag or a GitHub Release:
- Tag push: `git tag vX.Y.Z && git push origin vX.Y.Z`
- OR GitHub Release: publish a release with tag `vX.Y.Z` (or use the “Release” workflow’s manual input `version`)
3. The workflow will:
- Build `regular` and `rtx5090` using `docker-bake.hcl`
- Push versioned and `latest` tags for both variants
- Create or use the GitHub Release entry with autogenerated notes
If you need to release without going through changesets, use the **Release** workflow's manual dispatch (`workflow_dispatch`) and provide a version string.

Troubleshooting:
### Prerequisites (repository secrets)

- Do not override `tags` in the workflow; they are defined in `docker-bake.hcl`.
- Use the “Dev Build” workflow to test changes without tagging.
- Check container logs under `/workspace/runpod-slim/*.log` if runtime issues occur.
- `DOCKERHUB_USERNAME`
- `DOCKERHUB_TOKEN` (Docker Hub access token)

## Opening PRs

Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Changesets

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
changesets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm ci

- uses: changesets/action@v1
id: changesets
with:
version: npx changeset version
commit: "chore: version packages"
title: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# When the Version Packages PR was merged, the version in
# package.json is new but no GitHub Release exists yet — create one.
# On normal pushes the version is already released, so this is a no-op.
- name: Create GitHub Release if version is new
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
VERSION=$(node -p "require('./package.json').version")
if gh release view "$VERSION" &>/dev/null; then
echo "Release $VERSION already exists, skipping."
else
echo "Creating release $VERSION..."
gh release create "$VERSION" \
--title "$VERSION" \
--generate-notes
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 2 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*" # Trigger on version tags like v1.0.0, v2.1.0, etc.
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -48,21 +45,11 @@ jobs:

# Determine version based on trigger type
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
# Manual trigger: use input version
VERSION="${{ github.event.inputs.version }}"
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
echo "IS_MANUAL_RELEASE=true" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "release" ]]; then
# GitHub Release published event
VERSION="${{ github.event.release.tag_name }}"
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
echo "IS_MANUAL_RELEASE=false" >> $GITHUB_ENV
else
# Tag trigger: use tag name (remove refs/tags/ prefix)
VERSION=${GITHUB_REF#refs/tags/}
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
echo "IS_MANUAL_RELEASE=false" >> $GITHUB_ENV
VERSION="${{ github.event.release.tag_name }}"
fi
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV

# Export TAG for docker-bake.hcl variable override
echo "TAG=${RELEASE_VERSION}" >> $GITHUB_ENV
Expand Down Expand Up @@ -92,16 +79,6 @@ jobs:
targets: |
regular

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: github.event_name != 'release'
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release Summary
run: |
echo "🚀 Release completed!"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## [Unreleased]
## 1.3.0

### Breaking Changes

Expand Down
Loading