Audit SD.Next model-loading code for cache_dir routing on from_pretrained/from_single_file calls and verify diffusers vs HF cache path selection.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Audit model-loading code and verify every from_pretrained(...) and from_single_file(...) call explicitly sets cache_dir to the correct cache root.
.github/instructions/core.instructions.md before proceeding.shared.opts.diffusers_dirfrom_pretrained(...) / from_single_file(...) calls that load the full pipeline or full checkpoint into diffusers layout.shared.opts.hfcache_dirshared.opts.hfcache_dirmodules/sd_models.pymodules/model*.pymodules/ui_models_load.pymodules/models_hf.pymodules/merging/**/*.pypipelines/**/*.pyFor each from_pretrained(...) or from_single_file(...) call, verify:
cache_dir is present explicitly.Flag issues such as:
cache_dircache_dir set to the wrong optionshared.opts.diffusers_dir when they should use shared.opts.hfcache_dirshared.opts.hfcache_dirfrom_pretrained and from_single_file call in the target scope.cache_dir argument and compare it to the path policy.Return findings ordered by severity:
cache_dirFor each finding include:
Also include summary counts:
from_pretrained calls checkedfrom_single_file calls checkedA full pass requires all audited loader calls to specify cache_dir and use the correct cache root for the load category.
058a7f0
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.