Skip to content
Closed
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
12 changes: 0 additions & 12 deletions apps/website/e2e/canonical-redirects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ test.describe('canonical redirects', () => {
)
})

test('builds a model alias redirect with its canonical URL', () => {
const redirectPage = readFileSync(
'dist/p/supported-models/t5xxl-fp8-e4m3fn-scaled/index.html',
'utf8'
)

expect(redirectPage).toContain('url=/p/supported-models/t5xxl-fp16/')
expect(redirectPage).toContain(
'rel="canonical" href="https://comfy.org/p/supported-models/t5xxl-fp16/"'
)
})

test('builds each model page at /hub/models and no page at its old address', () => {
expect(
readFileSync(
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/flux-3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const RUN_OPTIONS_HEADING = t('flux3.runOptions.heading', {}, { locale: 'en' })
const CTA_HEADING = t('flux3.cta.heading', {}, { locale: 'en' })
const FAQ_COUNT = flux3Page.faq?.items.length ?? 0
const CARD_COUNT = flux3Page.gallery?.cards.length ?? 0
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop

test.describe('Flux 3 page @smoke', () => {
test.beforeEach(async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/gemini-omni.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const STEPS_CTA = t('geminiOmni.steps.secondaryCta', {}, { locale: 'en' })
const REVIEWS_HEADING = t('geminiOmni.reviews.heading', {}, { locale: 'en' })
const HIGHLIGHT_CTA = t('geminiOmni.reviews.highlightCta', {}, { locale: 'en' })
const COPY_PROMPT = t('modelLaunch.copyPrompt', {}, { locale: 'en' })
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const MCP_ROUTE = getRoutes('en').mcp
const FIRST_REVIEW = creatorReviews[0]

Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/ltx-2.5.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PATH = '/ltx-2.5'
const ZH_PATH = '/zh-CN/ltx-2.5'
const HERO_TITLE = t('ltx.hero.title', {}, { locale: 'en' })
const MODELS_HEADING = t('ltx.models.heading', {}, { locale: 'en' })
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const REVIEWS_HEADING = t('ltx.reviews.heading', {}, { locale: 'en' })
const HIGHLIGHT_CTA = t('ltx.reviews.highlightCta', {}, { locale: 'en' })
const MCP_ROUTE = getRoutes('en').mcp
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/minimax-h3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const HERO_TITLE =
t('minimax.hero.titleModel', {}, { locale: 'en' }) +
t('minimax.hero.titleRest', {}, { locale: 'en' })
const MODELS_HEADING = t('minimax.models.heading', {}, { locale: 'en' })
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const CTA_HEADING = t('minimax.cta.heading', {}, { locale: 'en' })
const CTA_PRIMARY = t('minimax.cta.primaryCta', {}, { locale: 'en' })
const CLOUD_URL = externalLinks.cloud
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/seedance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { waitForIsland } from './fixtures/islands'
const PATH = '/seedance-2.5'
const HERO_TITLE = t('seedance.hero.title', {}, { locale: 'en' })
const MODELS_HEADING = t('seedance.models.heading', {}, { locale: 'en' })
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const STEPS_HEADING = t('seedance.steps.heading', {}, { locale: 'en' })
const STEPS_SECONDARY = t('seedance.steps.secondaryCta', {}, { locale: 'en' })
const STEPS_PRIMARY = t('seedance.steps.primaryCta', {}, { locale: 'en' })
Expand Down
36 changes: 0 additions & 36 deletions apps/website/e2e/supported-models.spec.ts

This file was deleted.

7 changes: 5 additions & 2 deletions apps/website/e2e/wan-3.0.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HERO_SECONDARY_CTA = t('wan3.hero.secondaryCta')
const FAQ_HEADING = t('wan3.faq.heading')
const RUN_OPTIONS_HEADING = t('wan3.runOptions.heading')
const REVIEWS_HEADING = t('wan3.reviews.heading')
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const WAN3_TEMPLATE = 'https://cloud.comfy.org/?template=api_wan3_0_t2v'

// Counts are the launch requirement rather than a snapshot of the config:
Expand Down Expand Up @@ -182,7 +182,10 @@ test.describe('Wan 3.0 launch page — zh-CN', () => {
.getByRole('link', {
name: t('models.breadcrumb.models', {}, { locale: 'zh-CN' })
})
await expect(modelsCrumb).toHaveAttribute('href', getRoutes('zh-CN').models)
await expect(modelsCrumb).toHaveAttribute(
'href',
getRoutes('zh-CN').workshop
)

const footerLink = page
.locator('footer')
Expand Down
2 changes: 1 addition & 1 deletion apps/website/e2e/wan-animate-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PATH = '/wan-animate-2'
const ZH_PATH = '/zh-CN/wan-animate-2'
const HERO_TITLE = t('wanAnimate2.hero.title', {}, { locale: 'en' })
const HERO_PRIMARY = t('wanAnimate2.hero.primaryCta', {}, { locale: 'en' })
const MODELS_ROUTE = getRoutes('en').models
const MODELS_ROUTE = getRoutes('en').workshop
const STEPS_HEADING = t('wanAnimate2.steps.heading', {}, { locale: 'en' })
const REVIEWS_HEADING = t('wanAnimate2.reviews.heading', {}, { locale: 'en' })
const HIGHLIGHT_CTA = t(
Expand Down
8 changes: 3 additions & 5 deletions apps/website/public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ What people build with it: VFX shot work (clean plates, sky replacement, de-agin

Studios, brands, and schools building with Comfy include Series Entertainment, Moment Factory, Ubisoft La Forge, Groove Jones, Svedka with Silverside AI, and the Open Story Movement. Carnegie Mellon, USC, NTU, and UAL's Creative Computing Institute teach with ComfyUI. Use cases concentrate in VFX and animation, advertising and creative studios, gaming, and eCommerce and fashion.

Languages: comfy.org is published in English and Simplified Chinese, with a Japanese home page at https://comfy.org/ja/. Nearly every page has a twin under /zh-CN/ (for example https://comfy.org/zh-CN/cli/); the affiliate pages, the enterprise MSA, the terms of service, and the supported-models directory are English only. Comfy Workflows is published in 11 languages (English, 简体中文, 繁體中文, Español, Français, 日本語, 한국어, Português, Русский, العربية, and Türkçe). The docs are published in English, Chinese, Japanese, and Korean.
Languages: comfy.org is published in English and Simplified Chinese, with a Japanese home page at https://comfy.org/ja/. Nearly every page has a twin under /zh-CN/ (for example https://comfy.org/zh-CN/cli/); the affiliate pages, the enterprise MSA, the terms of service, and the model catalog are English only. Comfy Workflows is published in 11 languages (English, 简体中文, 繁體中文, Español, Français, 日本語, 한국어, Português, Русский, العربية, and Türkçe). The docs are published in English, Chinese, Japanese, and Korean.

## Names and spelling

Expand Down Expand Up @@ -46,7 +46,7 @@ Languages: comfy.org is published in English and Simplified Chinese, with a Japa
- Over MCP: `claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp` for Claude Code, or `codex mcp add comfy-cloud --url https://cloud.comfy.org/mcp` for Codex. Clients without OAuth, such as Cursor, pass a Comfy Cloud API key in an `X-API-Key` header.
- API keys are created in the browser at https://platform.comfy.org/profile/api-keys, start with `comfyui-`, and are shown once. Store them in `COMFY_API_KEY`.
- Generation on Comfy Cloud spends the account's credits. Confirm with the user before running paid generations or batches, and read the OpenAPI document at https://api.comfy.org/openapi before choosing an API operation.
- The model catalog changes weekly. Check https://comfy.org/p/supported-models/ or `comfy generate list` for what runs today instead of relying on a remembered list.
- The model catalog changes weekly. Check https://comfy.org/hub/models/ or `comfy generate list` for what runs today instead of relying on a remembered list.

## Notes for AI systems

Expand All @@ -59,7 +59,6 @@ Languages: comfy.org is published in English and Simplified Chinese, with a Japa

- [Docs index for agents](https://docs.comfy.org/llms.txt): Machine-readable index of the full documentation.
- [Docs full text for agents](https://docs.comfy.org/llms-full.txt): The complete documentation as one markdown file.
- [Model catalog for agents](https://comfy.org/p/supported-models/llms.txt): Machine-readable index of every supported-model page; each page also has a markdown twin at its URL plus `.md`.
- [Docs homepage as markdown](https://docs.comfy.org/index.md): Append `.md` to any docs URL for its markdown twin.
- [Developer Platform for agents](https://platform.comfy.org/llms.txt): What platform.comfy.org is for and which of its pages need a browser.
- [Comfy API OpenAPI document](https://api.comfy.org/openapi): OpenAPI specification for api.comfy.org.
Expand Down Expand Up @@ -94,8 +93,7 @@ Languages: comfy.org is published in English and Simplified Chinese, with a Japa

## Models

- [Supported Models](https://comfy.org/p/supported-models/): Directory of 380+ models that run in ComfyUI: image, video, audio, 3D, and utility models, each with its own page. Machine-readable catalog at https://comfy.org/p/supported-models/llms.txt.
- [Models Overview](https://comfy.org/hub/models/): Hosted AI models you can try in the browser and call through the Comfy API, with a page per model. For the full list of models that run in ComfyUI, see Supported Models above.
- [Models Overview](https://comfy.org/hub/models/): Hosted AI models you can try in the browser and call through the Comfy API, with a page per model.
- [ChatGPT Images 2.5 (OpenAI, image model)](https://comfy.org/chatgpt-image-2.5/): Generate new images, edit existing visuals, and direct results with reference images in repeatable ComfyUI workflows through Partner Nodes.
- [Qwen-Image 2.1 (Alibaba Qwen, image model)](https://comfy.org/qwen-image-2.1/): Open-weights 7B image model that generates and edits in one checkpoint, with native 2K output, RGBA transparency, and accurate English and Chinese text rendering.
- [Flux 3 (Black Forest Labs, video model)](https://comfy.org/flux-3/): Multimodal model: video with native audio, up to 20 seconds per generation, from text, image, video, or keyframes.
Expand Down
2 changes: 1 addition & 1 deletion apps/website/scripts/generate-model-url-map.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('model URL map', () => {
matchesRoute(pattern, `/hub/models/${slug}/`)
)
)
expect(patterns).toContain('/p/supported-models/[slug]')
expect(patterns).toContain('/learning/[slug]')
expect(collisions).toEqual([])
})
})
Expand Down
75 changes: 75 additions & 0 deletions apps/website/scripts/generate-supported-model-urls.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { describe, expect, it } from 'vitest'

import { compileSupportedModelUrls } from './generate-supported-model-urls'

const hubPages = [
{ newSlug: 'wan-2-7-image-to-video', name: 'Wan 2.7 Image-to-Video' },
{ newSlug: 'wan-2-7-video-edit', name: 'Wan 2.7 Video Edit' },
{ newSlug: 'wan-2-7-text-to-video', name: 'Wan 2.7 Text-to-Video' },
{ newSlug: 'seedance-2-0-text-to-video', name: 'Seedance 2.0 Text-to-Video' },
{
newSlug: 'seedance-2-0-fast-text-to-video',
name: 'Seedance 2.0 Fast Text-to-Video'
},
{
newSlug: 'kling-2-6-pro-text-to-video-with-audio',
name: 'Kling 2.6 Pro Text-to-Video with Audio'
},
{
newSlug: 'elevenlabs-text-to-dialogue',
name: 'ElevenLabs Text-to-Dialogue'
},
{ newSlug: 'nano-banana-image-edit', name: 'Nano Banana Image Edit' },
{ newSlug: 'nano-banana-text-to-image', name: 'Nano Banana Text-to-Image' }
]
const providers = ['ElevenLabs', 'Kling']

const hubSlugFor = (displayName: string) =>
compileSupportedModelUrls(
[{ slug: 'page', displayName }],
hubPages,
providers
)[0][1]

describe('compileSupportedModelUrls', () => {
it.for([
['Wan 2.7', 'wan-2-7-text-to-video'],
['Nano Banana', 'nano-banana-text-to-image'],
['Seedance 2.0', 'seedance-2-0-text-to-video'],
['Seedance 2', 'seedance-2-0-text-to-video'],
['Kling 2.6', undefined],
['ElevenLabs', undefined],
['Wan', undefined],
['Wan 2.7 Turbo', undefined],
['wan2.7-vae-bf16', undefined]
] as const)('sends "%s" to %s', ([displayName, hubSlug]) => {
expect(hubSlugFor(displayName)).toBe(hubSlug)
})

it('resolves an alias through its canonical page', () => {
expect(
compileSupportedModelUrls(
[
{ slug: 'wan-27', canonicalSlug: 'wan2-7', displayName: 'Wan 27' },
{ slug: 'wan2-7', displayName: 'Wan 2.7' }
],
hubPages,
providers
)
).toEqual([
['wan-27', 'wan-2-7-text-to-video'],
['wan2-7', 'wan-2-7-text-to-video']
])
})

it('keeps frozen rows and slugs no longer in the data', () => {
expect(
compileSupportedModelUrls(
[{ slug: 'wan2-7', displayName: 'Wan 2.7' }],
hubPages,
providers,
[['wan2-7'], ['retired-page']]
)
).toEqual([['retired-page'], ['wan2-7']])
})
})
134 changes: 134 additions & 0 deletions apps/website/scripts/generate-supported-model-urls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import { writeFile } from 'node:fs/promises'
import { join } from 'node:path'

import { websiteRoot } from '@website/paths'
import { modelPageUrls } from '@/config/model-urls'
import { models } from '@/config/models'
import type { SupportedModelUrl } from '@/config/supported-model-urls'
import { supportedModelUrls } from '@/config/supported-model-urls'
import { workshopModels } from '@/config/workshop-browse-content'
import { modelUrlSlug } from './generate-model-url-map'
import { isDirectExecution } from './script-entry-point'

interface SupportedModel {
readonly slug: string
readonly canonicalSlug?: string
readonly displayName: string
}

interface HubPage {
readonly newSlug: string
readonly name: string
}

/** Earlier wins when one model has several task pages. */
const TASKS_BY_PRIORITY = [
'text-to-image',
'text-to-vector',
'text-to-video',
'reference-to-video',
'text-to-speech',
'text-to-dialogue',
'image-to-video',
'first-last-frame',
'video-continuation',
'image-edit',
'video-edit',
'video-to-video',
'audio-to-video'
] as const

const taskOf = (slug: string) =>
TASKS_BY_PRIORITY.find((task) => slug.endsWith(`-${task}`))

const sameVersion = (slug: string) => slug.replace(/(\d)-0(?=-|$)/g, '$1')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium — /(\d)-0(?=-|$)/g strips -0 after any digit anywhere in the key, not just a trailing .0, so a three-part version collapses onto a different model: a supported model named Model 2.0.1 keys as model-2-1 and matches the Hub page for Model 2.1. Anchor the replacement to the end of the key, and/or throw when two supported models resolve to the same key, so a bad match surfaces instead of shipping as a permanent 308 that browsers cache and cannot be retracted. Raised by 3 of 8 reviewers (gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max edge-case).


const modelKey = (name: string) => sameVersion(modelUrlSlug(name))

function hubModelKey({ name }: HubPage): string {
const slug = modelUrlSlug(name)
const task = taskOf(slug)
return sameVersion(task ? slug.slice(0, -task.length - 1) : slug)
}

const taskRank = (page: HubPage) => {
const task = taskOf(modelUrlSlug(page.name))
return task ? TASKS_BY_PRIORITY.indexOf(task) : -1
}

/**
* The Hub page for the same model, or undefined when there is none. A Hub
* page matches only when its name minus the task is the model's name, so a
* provider page (ElevenLabs) or another version (Kling 2.6 vs Kling 2.6 Pro)
* never matches.
*/
function supportedModelHubSlug(
name: string,
hubPages: readonly HubPage[],
providers: ReadonlySet<string>
): string | undefined {
const key = modelKey(name)
if (providers.has(key)) return undefined
return hubPages
.filter((page) => hubModelKey(page) === key)
.sort(
(a, b) =>
taskRank(a) - taskRank(b) || a.newSlug.localeCompare(b.newSlug, 'en')
)
.at(0)?.newSlug
}

/** `frozen` rows keep their target; only slugs new to the table are matched. */
export function compileSupportedModelUrls(
supportedModels: readonly SupportedModel[],
hubPages: readonly HubPage[],
providerNames: readonly string[],
frozen: readonly SupportedModelUrl[] = []
): SupportedModelUrl[] {
const providers = new Set(providerNames.map(modelKey))
const bySlug = new Map(supportedModels.map((model) => [model.slug, model]))
const rows = new Map(frozen.map((row) => [row[0], row]))
for (const model of supportedModels) {
if (rows.has(model.slug)) continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low — Roughly 370 of the 380 generated rows are bare [slug] entries that 308 to the generic catalogue, and this continue means a frozen slug is skipped forever — a matching /hub/models/<slug> page launching later never upgrades the row. Nothing surfaces that drift: this PR adds no package.json script to run the generator, no drift report of the kind the sibling generate-model-url-map.ts prints, and the new test never asserts the committed supported-model-urls.ts equals renderSupportedModelUrlsModule(compileSupportedModelUrls(models, modelPageUrls, …)), so redirects.test.ts cannot catch staleness either (it derives expectations from the same table). Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).

const canonical = bySlug.get(model.canonicalSlug ?? model.slug) ?? model
const hubSlug = supportedModelHubSlug(
canonical.displayName,
hubPages,
providers
)
rows.set(model.slug, hubSlug ? [model.slug, hubSlug] : [model.slug])
}
return [...rows.values()].sort((a, b) => a[0].localeCompare(b[0], 'en'))
}

function renderSupportedModelUrlsModule(
rows: readonly SupportedModelUrl[]
): string {
const line = (row: SupportedModelUrl) =>
` [${row.map((value) => `'${value}'`).join(', ')}]`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium — Each value is interpolated into a single-quoted TypeScript literal with no escaping, so a slug containing ', \, or a newline writes a syntactically broken — or, worst case, code-injecting — src/config/supported-model-urls.ts, which redirects.ts imports and the build then executes in Node. hubSlug is validated upstream but model.slug is not (models.ts checks only uniqueness and canonical targets, and the slugifier that produces these names from external template filenames lets quotes through); reuse the sibling generator's stringLiteral() helper and reject slugs that do not match its slug pattern. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case).

return `// Generated by scripts/generate-supported-model-urls.ts. Rows are frozen.
// Every published /p/supported-models/<slug> page, with the /hub/models/<slug>
// page for the same model. A row without one redirects to /hub/models/.
export type SupportedModelUrl = readonly [slug: string, hubSlug?: string]

export const supportedModelUrls: readonly SupportedModelUrl[] = [
${rows.map(line).join(',\n')}
]
`
}

if (isDirectExecution(process.argv[1], import.meta.filename)) {
const rows = compileSupportedModelUrls(
models,
modelPageUrls,
workshopModels.flatMap(({ provider }) => (provider ? [provider] : [])),
supportedModelUrls
)
await writeFile(
join(websiteRoot, 'src/config/supported-model-urls.ts'),
renderSupportedModelUrlsModule(rows)
)
console.warn(
`${rows.length} pages, ${rows.filter((row) => row[1]).length} with a Hub page`
)
}
4 changes: 0 additions & 4 deletions apps/website/src/components/common/SiteFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ const topColumns: { title: string; links: FooterLink[] }[] = [
label: t('footer.modelCatalogue'),
href: routes.workshop
},
{
label: t('nav.supportedModels'),
href: routes.models
},
{
label: t('footer.minimaxH3'),
href: routes.minimax
Expand Down
Loading
Loading