Skip to content

Commit d1c9ce5

Browse files
change some settings for cloud-specific behavior (#6302)
## Summary Make some settings dynamic based on whether in cloud or localhost 1. Comfy.Memory.AllowManualUnload (line 18-24) - Type: 'hidden' on cloud, 'boolean' on localhost - Default: false on cloud, true on localhost 2. Comfy.Validation.Workflows (line 25-30) - Default: false on cloud, true on localhost 3. Comfy.Workflow.ShowMissingModelsWarning (line 282-288) - Type: 'hidden' on cloud, 'boolean' on localhost - Default: false on cloud, true on localhost 4. Comfy.ModelLibrary.AutoLoadAll (line 387-394) - Type: 'hidden' on cloud, 'boolean' on localhost 5. Comfy.QueueButton.BatchCountLimit (line 595-603) - Default: 4 on cloud, 100 on localhost 6. Comfy.Toast.DisableReconnectingToast (line 943-949) - Default: true on cloud, false on localhost 7. Comfy.Assets.UseAssetAPI (line 1068-1075) - Default: true on cloud, false on localhost ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6302-change-some-settings-for-cloud-specific-behavior-2986d73d365081169be4ebd11823a7fa) by [Unito](https://www.unito.io)
1 parent d26309c commit d1c9ce5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/platform/settings/constants/coreSettings.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { LinkMarkerShape, LiteGraph } from '@/lib/litegraph/src/litegraph'
2+
import { isCloud } from '@/platform/distribution/types'
23
import { useSettingStore } from '@/platform/settings/settingStore'
34
import type { SettingParams } from '@/platform/settings/types'
45
import type { ColorPalettes } from '@/schemas/colorPaletteSchema'
@@ -18,14 +19,14 @@ export const CORE_SETTINGS: SettingParams[] = [
1819
id: 'Comfy.Memory.AllowManualUnload',
1920
name: 'Allow manual unload of models and execution cache via user command',
2021
type: 'hidden',
21-
defaultValue: true,
22+
defaultValue: isCloud ? false : true,
2223
versionAdded: '1.18.0'
2324
},
2425
{
2526
id: 'Comfy.Validation.Workflows',
2627
name: 'Validate workflows',
2728
type: 'boolean',
28-
defaultValue: true
29+
defaultValue: isCloud ? false : true
2930
},
3031
{
3132
id: 'Comfy.NodeSearchBoxImpl',
@@ -281,8 +282,8 @@ export const CORE_SETTINGS: SettingParams[] = [
281282
{
282283
id: 'Comfy.Workflow.ShowMissingModelsWarning',
283284
name: 'Show missing models warning',
284-
type: 'boolean',
285-
defaultValue: true,
285+
type: isCloud ? 'hidden' : 'boolean',
286+
defaultValue: isCloud ? false : true,
286287
experimental: true
287288
},
288289
{
@@ -388,7 +389,7 @@ export const CORE_SETTINGS: SettingParams[] = [
388389
name: 'Automatically load all model folders',
389390
tooltip:
390391
'If true, all folders will load as soon as you open the model library (this may cause delays while it loads). If false, root level model folders will only load once you click on them.',
391-
type: 'boolean',
392+
type: isCloud ? 'hidden' : 'boolean',
392393
defaultValue: false
393394
},
394395
{
@@ -597,7 +598,7 @@ export const CORE_SETTINGS: SettingParams[] = [
597598
tooltip:
598599
'The maximum number of tasks added to the queue at one button click',
599600
type: 'number',
600-
defaultValue: 100,
601+
defaultValue: isCloud ? 4 : 100,
601602
versionAdded: '1.3.5'
602603
},
603604
{
@@ -943,7 +944,7 @@ export const CORE_SETTINGS: SettingParams[] = [
943944
id: 'Comfy.Toast.DisableReconnectingToast',
944945
name: 'Disable toasts when reconnecting or reconnected',
945946
type: 'hidden',
946-
defaultValue: false,
947+
defaultValue: isCloud ? true : false,
947948
versionAdded: '1.15.12'
948949
},
949950
{
@@ -1069,7 +1070,7 @@ export const CORE_SETTINGS: SettingParams[] = [
10691070
name: 'Use Asset API for model library',
10701071
type: 'hidden',
10711072
tooltip: 'Use new Asset API for model browsing',
1072-
defaultValue: false,
1073+
defaultValue: isCloud ? true : false,
10731074
experimental: true
10741075
}
10751076
]

0 commit comments

Comments
 (0)