fix(assets): recognize temp directory in asset category resolution#13159
fix(assets): recognize temp directory in asset category resolution#13159luke-mino-altherr merged 1 commit intomasterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Files written to the temp directory (e.g. GLSLShader_output_00004_.png) caused a ValueError in get_asset_category_and_relative_path when --enable-assets was active, because the temp directory was not a recognized asset root. Add 'temp' as a category alongside input/output/models so temp outputs can be registered as assets. Amp-Thread-ID: https://ampcode.com/threads/T-019d2800-6944-7039-b2c4-53f809bc7f4f Co-authored-by: Amp <amp@ampcode.com>
3cb6066 to
4c111bb
Compare
Problem
When
--enable-assetsis active, files written to thetempdirectory (e.g.GLSLShader_output_00004_.png,ComfyUI_temp_tczip_00004_.png) cause aValueErroringet_asset_category_and_relative_pathbecause the temp directory is not a recognized asset root.Fix
Add
tempas a recognized category inget_asset_category_and_relative_path(viafolder_paths.get_temp_directory()), alongside the existinginput,output, andmodelsroots.Changes
app/assets/services/path_utils.py– Add temp directory check inget_asset_category_and_relative_pathtests-unit/assets_test/services/test_path_utils.py– New test file covering all category roots including a regression test for the temp directory bug