From 7ca86159474e1845ed5e59dcc6202b2149c5ef0e Mon Sep 17 00:00:00 2001 From: Arjan Singh <1598641+arjansingh@users.noreply.github.com> Date: Wed, 15 Oct 2025 14:38:10 -0700 Subject: [PATCH] feat(assetService): increase limit to 500 (#6078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Increase asset API limit to 500 to account for additional models being added. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6078-feat-assetService-increase-limit-to-500-28d6d73d365081539760f986dd5bff23) by [Unito](https://www.unito.io) --- src/platform/assets/services/assetService.ts | 2 +- tests-ui/tests/services/assetService.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/assets/services/assetService.ts b/src/platform/assets/services/assetService.ts index 613e244a9b..626a52d20c 100644 --- a/src/platform/assets/services/assetService.ts +++ b/src/platform/assets/services/assetService.ts @@ -12,7 +12,7 @@ import { useModelToNodeStore } from '@/stores/modelToNodeStore' const ASSETS_ENDPOINT = '/assets' const EXPERIMENTAL_WARNING = `EXPERIMENTAL: If you are seeing this please make sure "Comfy.Assets.UseAssetAPI" is set to "false" in your ComfyUI Settings.\n` -const DEFAULT_LIMIT = 300 +const DEFAULT_LIMIT = 500 export const MODELS_TAG = 'models' export const MISSING_TAG = 'missing' diff --git a/tests-ui/tests/services/assetService.test.ts b/tests-ui/tests/services/assetService.test.ts index a1394dacec..b6386bc2bf 100644 --- a/tests-ui/tests/services/assetService.test.ts +++ b/tests-ui/tests/services/assetService.test.ts @@ -117,7 +117,7 @@ describe('assetService', () => { const result = await assetService.getAssetModelFolders() expect(api.fetchApi).toHaveBeenCalledWith( - '/assets?include_tags=models&limit=300' + '/assets?include_tags=models&limit=500' ) expect(result).toHaveLength(2) @@ -163,7 +163,7 @@ describe('assetService', () => { const result = await assetService.getAssetModels('checkpoints') expect(api.fetchApi).toHaveBeenCalledWith( - '/assets?include_tags=models,checkpoints&limit=300' + '/assets?include_tags=models,checkpoints&limit=500' ) expect(result).toEqual([ expect.objectContaining({ name: 'valid.safetensors', pathIndex: 0 }) @@ -236,7 +236,7 @@ describe('assetService', () => { // Verify API call includes correct category expect(api.fetchApi).toHaveBeenCalledWith( - '/assets?include_tags=models,checkpoints&limit=300' + '/assets?include_tags=models,checkpoints&limit=500' ) }) @@ -297,7 +297,7 @@ describe('assetService', () => { const result = await assetService.getAssetsByTag('models') expect(api.fetchApi).toHaveBeenCalledWith( - '/assets?include_tags=models&limit=300' + '/assets?include_tags=models&limit=500' ) expect(result).toEqual(testAssets) })