mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 00:50:01 +00:00
feat(assetService): increase limit to 500 (#6078)
## 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)
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user