[backport 1.27] [chore] make experiment asset api setting hidden (#5861)

Backport of #5851 to to `core/1.27`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5861-backport-1-27-chore-make-experiment-asset-api-setting-hidden-27e6d73d3650819ea7c0fc0d48a393ee)
by [Unito](https://www.unito.io)

Co-authored-by: Arjan Singh <1598641+arjansingh@users.noreply.github.com>
This commit is contained in:
AustinMroz
2025-09-30 08:11:06 -07:00
committed by GitHub
parent cdff3f90ce
commit d3dc330d56
2 changed files with 6 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import { useModelToNodeStore } from '@/stores/modelToNodeStore'
const ASSETS_ENDPOINT = '/assets'
const MODELS_TAG = 'models'
const MISSING_TAG = 'missing'
const EXPERIMENTAL_WARNING = `EXPERIMENTAL: If you are seeing this please make sure "Comfy.Assets.UseAssetAPI" is set to "false" in your ComfyUI Settings.\n`
/**
* Input names that are eligible for asset browser
@@ -26,7 +27,9 @@ function validateAssetResponse(data: unknown): AssetResponse {
if (result.success) return result.data
const error = fromZodError(result.error)
throw new Error(`Invalid asset response against zod schema:\n${error}`)
throw new Error(
`${EXPERIMENTAL_WARNING}Invalid asset response against zod schema:\n${error}`
)
}
/**
@@ -44,7 +47,7 @@ function createAssetService() {
const res = await api.fetchApi(url)
if (!res.ok) {
throw new Error(
`Unable to load ${context}: Server returned ${res.status}. Please try again.`
`${EXPERIMENTAL_WARNING}Unable to load ${context}: Server returned ${res.status}. Please try again.`
)
}
const data = await res.json()

View File

@@ -1051,7 +1051,7 @@ export const CORE_SETTINGS: SettingParams[] = [
{
id: 'Comfy.Assets.UseAssetAPI',
name: 'Use Asset API for model library',
type: 'boolean',
type: 'hidden',
tooltip: 'Use new Asset API for model browsing',
defaultValue: false,
experimental: true