mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 00:20:07 +00:00
Make max batch count configurable (#1060)
This commit is contained in:
@@ -31,8 +31,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useQueueSettingsStore } from '@/stores/queueStore'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import InputNumber from 'primevue/inputnumber'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
class?: string
|
||||
@@ -45,7 +47,11 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
const queueSettingsStore = useQueueSettingsStore()
|
||||
const { batchCount } = storeToRefs(queueSettingsStore)
|
||||
const minQueueCount = 1
|
||||
const maxQueueCount = 100
|
||||
|
||||
const settingStore = useSettingStore()
|
||||
const maxQueueCount = computed(() =>
|
||||
settingStore.get('Comfy.QueueButton.BatchCountLimit')
|
||||
)
|
||||
|
||||
const handleClick = (increment: boolean) => {
|
||||
let newCount: number
|
||||
|
||||
@@ -386,5 +386,14 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
name: 'Show graph canvas menu',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
id: 'Comfy.QueueButton.BatchCountLimit',
|
||||
name: 'Batch count limit',
|
||||
tooltip:
|
||||
'The maximum number of tasks added to the queue at one button click',
|
||||
type: 'number',
|
||||
defaultValue: 100,
|
||||
versionAdded: '1.3.5'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -503,7 +503,8 @@ const zSettings = z.record(z.any()).and(
|
||||
'Comfy.Window.UnloadConfirmation': z.boolean(),
|
||||
'Comfy.NodeBadge.NodeSourceBadgeMode': zNodeBadgeMode,
|
||||
'Comfy.NodeBadge.NodeIdBadgeMode': zNodeBadgeMode,
|
||||
'Comfy.NodeBadge.NodeLifeCycleBadgeMode': zNodeBadgeMode
|
||||
'Comfy.NodeBadge.NodeLifeCycleBadgeMode': zNodeBadgeMode,
|
||||
'Comfy.QueueButton.BatchCountLimit': z.number()
|
||||
})
|
||||
.optional()
|
||||
)
|
||||
|
||||
@@ -47,4 +47,8 @@ export interface SettingParams {
|
||||
deprecated?: boolean
|
||||
// Deprecated values are mapped to new values.
|
||||
migrateDeprecatedValue?: (value: any) => any
|
||||
// Version of the setting when it was added
|
||||
versionAdded?: string
|
||||
// Version of the setting when it was last modified
|
||||
versionModified?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user