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
Binary file added web-app/public/images/model-provider/pruna.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions web-app/src/lib/diffusion/__tests__/workflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ describe('workflowsForFamily', () => {
expect(workflowsForFamily('krea-2-turbo')).toEqual(['create'])
expect(workflowsForFamily('flux.3-klein')).toEqual(['create'])
expect(familySupportsWorkflow('flux.3-klein', 'edit')).toBe(false)
expect(workflowsForFamily('minimax-h3-image')).toEqual([
'create',
'reference',
'edit',
])
expect(familySupportsWorkflow('minimax-h3-image', 'transform')).toBe(false)
expect(workflowsForFamily('p-h3-image')).toEqual(
workflowsForFamily('minimax-h3-image')
)
expect(familySupportsWorkflow('krea-2-turbo', 'transform')).toBe(false)
expect(familySupportsWorkflow('z-image', 'edit')).toBe(false)
expect(workflowsForFamily('wan2.2-ti2v-5b')).toEqual(['create'])
Expand Down
4 changes: 4 additions & 0 deletions web-app/src/lib/diffusion/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export function isSourceImagePath(path: string): boolean {
* instruction edits need a model trained on reference images. Qwen Image 2.1
* additionally needs its `--llm_vision` projector at runtime; the plugin
* removes those workflows from loaded capabilities when it is absent.
* MiniMax-H3-Image and P-H3-Image create and edit with one checkpoint each,
* and their catalog encoders carry the vision tower (and P-H3's connector).
*/
export function workflowsForFamily(family: string): ImageWorkflowId[] {
switch (family) {
Expand All @@ -152,6 +154,8 @@ export function workflowsForFamily(family: string): ImageWorkflowId[] {
]
case 'qwen-image-2.1':
case 'qwen-image-2.1-turbo':
case 'minimax-h3-image':
case 'p-h3-image':
return ['create', 'reference', 'edit']
case 'krea-2-turbo':
case 'flux.3-klein':
Expand Down
5 changes: 5 additions & 0 deletions web-app/src/lib/model-logo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ const ICON_KEY_LOGOS: Readonly<Record<string, string>> = {
'openmoss': '/images/model-provider/openmoss.webp',
'acestep': '/images/model-provider/acestep.webp',
'huggingface': '/images/model-provider/huggingface.svg',
// Image model makers without a mark of their own: their Hugging Face
// organization avatar, like the audio makers above.
'pruna': '/images/model-provider/pruna.webp',
}

// Icon key per image/video family id. The catalog is remote and its display
Expand All @@ -172,6 +175,8 @@ export const DIFFUSION_FAMILY_ICON_KEYS: Readonly<
'z-image': 'z-image',
'flux.2-klein': 'bfl',
'flux.3-klein': 'bfl',
'minimax-h3-image': 'minimax',
'p-h3-image': 'pruna',
'flux.1': 'bfl',
'flux.1-uncensored': 'bfl',
'flux.1-abliterated': 'bfl',
Expand Down
2 changes: 2 additions & 0 deletions web-app/src/services/diffusion-catalog-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export const DIFFUSION_FAMILY_IDS: readonly DiffusionFamilyId[] = [
'z-image',
'flux.2-klein',
'flux.3-klein',
'minimax-h3-image',
'p-h3-image',
'flux.1',
'flux.1-uncensored',
'flux.1-abliterated',
Expand Down
29 changes: 29 additions & 0 deletions web-app/src/services/diffusion/__tests__/compatibility.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { describe, expect, it } from 'vitest'
import {
FLUX3_IMAGE_ENGINE_TAG,
MINIMAX_H3_IMAGE_ENGINE_TAG,
MODERN_IMAGE_ENGINE_TAG,
requiredEngineTag,
supportsDiffusionFamily,
Expand All @@ -15,6 +16,10 @@ describe('requiredEngineTag', () => {
])
expect(requiredEngineTag(family), family).toBe(MODERN_IMAGE_ENGINE_TAG)
expect(requiredEngineTag('flux.3-klein')).toBe(FLUX3_IMAGE_ENGINE_TAG)
expect(requiredEngineTag('minimax-h3-image')).toBe(
MINIMAX_H3_IMAGE_ENGINE_TAG
)
expect(requiredEngineTag('p-h3-image')).toBe(MINIMAX_H3_IMAGE_ENGINE_TAG)
for (const family of [
'z-image',
'flux.1',
Expand Down Expand Up @@ -43,6 +48,30 @@ describe('supportsDiffusionFamily', () => {
expect(supportsDiffusionFamily('flux.3-klein', tag), tag).toBe(true)
})

it('holds MiniMax-H3-Image to build 1088, the one that added it upstream', () => {
for (const tag of [
'master-1028-37bc88b-a5f9a63b',
'master-1079-a3c49b1',
'master-1087-f8417d0',
'unknown',
]) {
expect(supportsDiffusionFamily('minimax-h3-image', tag), tag).toBe(false)
// P-H3-Image arrived in 1048 but shares the H3 floor.
expect(supportsDiffusionFamily('p-h3-image', tag), tag).toBe(false)
}
expect(supportsDiffusionFamily('p-h3-image', 'master-1048-3e92bf9')).toBe(
false
)
for (const tag of [
'master-1088-32d516c',
'master-1088-32d516c-a1234567',
'master-1100-abcdef0',
]) {
expect(supportsDiffusionFamily('minimax-h3-image', tag), tag).toBe(true)
expect(supportsDiffusionFamily('p-h3-image', tag), tag).toBe(true)
}
})

it('keeps the 883 floor for Qwen Image 2.1 and Krea 2 Turbo', () => {
expect(supportsDiffusionFamily('krea-2-turbo', 'master-882-abcdef0')).toBe(
false
Expand Down
8 changes: 8 additions & 0 deletions web-app/src/services/diffusion/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
export const MODERN_IMAGE_ENGINE_TAG = 'master-883-137f740'
/** The first upstream build that runs FLUX.3 Image Klein (leejet/stable-diffusion.cpp#2143). */
export const FLUX3_IMAGE_ENGINE_TAG = 'master-968-8cd731e'
/**
* The first upstream build that runs MiniMax-H3-Image (leejet/stable-diffusion.cpp#2324).
* P-H3-Image (#2272) arrived in 1048, but the H3 transformer's buffer-limit
* chunking (#2286, #2292) came later, so it shares this floor with the core.
*/
export const MINIMAX_H3_IMAGE_ENGINE_TAG = 'master-1088-32d516c'

const REQUIRED_ENGINE_TAGS: ReadonlyMap<string, string> = new Map([
['qwen-image-2.1', MODERN_IMAGE_ENGINE_TAG],
['qwen-image-2.1-turbo', MODERN_IMAGE_ENGINE_TAG],
['krea-2-turbo', MODERN_IMAGE_ENGINE_TAG],
['flux.3-klein', FLUX3_IMAGE_ENGINE_TAG],
['minimax-h3-image', MINIMAX_H3_IMAGE_ENGINE_TAG],
['p-h3-image', MINIMAX_H3_IMAGE_ENGINE_TAG],
])

function buildOf(tag: string): number | null {
Expand Down
2 changes: 2 additions & 0 deletions web-app/src/services/diffusion/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export type DiffusionFamilyId =
| 'z-image'
| 'flux.2-klein'
| 'flux.3-klein'
| 'minimax-h3-image'
| 'p-h3-image'
| 'flux.1'
| 'flux.1-uncensored'
| 'flux.1-abliterated'
Expand Down