mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-28 01:47:32 +08:00
The /api/assets response previously emitted one tag per parent directory between the root category and the filename. For nested categories like diffusers, this produced ["models", "diffusers", "Kolors", "text_encoder"] where consumers that look up a category via tags[1] would only see the top-level bucket name and miss the model-specific sub-path that uniquely identifies the component. This collapses the parent subpath into a single slash-joined tag so the result is ["models", "diffusers/Kolors/text_encoder"]. Consumers can now read tags[1] as a stable category identifier regardless of how deep the file lives in the bucket. Case is preserved on the subpath so providers keyed on the original-case path (e.g. "diffusers/Kolors/text_encoder") resolve correctly. Same shape applies uniformly: - input/foo.png -> ["input"] - output/00001.png -> ["output"] - models/checkpoints/flux.safetensors -> ["models", "checkpoints"] - models/diffusers/Kolors/text_encoder/m.sft -> ["models", "diffusers/Kolors/text_encoder"] - models/loras/my/custom/path/v1.safetensors -> ["models", "loras/my/custom/path"] Integration tests that filtered by individual subdirectory tags (`include_tags=unit-tests,scope`) updated to use the new slash-joined shape (`include_tags=unit-tests/scope`). Unit tests cover flat input, flat output, flat models, diffusers-style nested, and deep user-subpath cases. |
||
|---|---|---|
| .. | ||
| app_test | ||
| assets_test | ||
| comfy_api_test | ||
| comfy_extras_test | ||
| comfy_quant | ||
| comfy_test | ||
| execution_test | ||
| folder_paths_test | ||
| prompt_server_test | ||
| seeder_test | ||
| server/utils | ||
| server_test | ||
| utils | ||
| deploy_environment_test.py | ||
| feature_flags_test.py | ||
| README.md | ||
| requirements.txt | ||
| websocket_feature_flags_test.py | ||
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/