Skip to content

Commit d3dc330

Browse files
[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>
1 parent cdff3f9 commit d3dc330

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/platform/assets/services/assetService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useModelToNodeStore } from '@/stores/modelToNodeStore'
1212
const ASSETS_ENDPOINT = '/assets'
1313
const MODELS_TAG = 'models'
1414
const MISSING_TAG = 'missing'
15+
const EXPERIMENTAL_WARNING = `EXPERIMENTAL: If you are seeing this please make sure "Comfy.Assets.UseAssetAPI" is set to "false" in your ComfyUI Settings.\n`
1516

1617
/**
1718
* Input names that are eligible for asset browser
@@ -26,7 +27,9 @@ function validateAssetResponse(data: unknown): AssetResponse {
2627
if (result.success) return result.data
2728

2829
const error = fromZodError(result.error)
29-
throw new Error(`Invalid asset response against zod schema:\n${error}`)
30+
throw new Error(
31+
`${EXPERIMENTAL_WARNING}Invalid asset response against zod schema:\n${error}`
32+
)
3033
}
3134

3235
/**
@@ -44,7 +47,7 @@ function createAssetService() {
4447
const res = await api.fetchApi(url)
4548
if (!res.ok) {
4649
throw new Error(
47-
`Unable to load ${context}: Server returned ${res.status}. Please try again.`
50+
`${EXPERIMENTAL_WARNING}Unable to load ${context}: Server returned ${res.status}. Please try again.`
4851
)
4952
}
5053
const data = await res.json()

src/platform/settings/constants/coreSettings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ export const CORE_SETTINGS: SettingParams[] = [
10511051
{
10521052
id: 'Comfy.Assets.UseAssetAPI',
10531053
name: 'Use Asset API for model library',
1054-
type: 'boolean',
1054+
type: 'hidden',
10551055
tooltip: 'Use new Asset API for model browsing',
10561056
defaultValue: false,
10571057
experimental: true

0 commit comments

Comments
 (0)