ValueError: Custom filter_fn and FqnToConfig were both specified. Only filter_fn=None is supported when FqnToConfig is specified.

这个报错通常出现在用 TorchAoConfig 包裹 FqnToConfig 并对 Diffusers 模型(例如 Flux2Transformer2DModel)做量化加载时。根本原因是 Diffusers 在调用 torchao 的 quantize_ 时同时传入了自定义 filter_fn







![[Bug] Android 1.0.15 routes remote Codex device execution to Provider API instead of Agent Gateway](https://www.chat-gpts.plus/wp-content/uploads/2026/09/18713-46b4b404-768x403.jpg)
