Setting cache_device to cpu eliminates JPEG Artifacts in Flux (Even at High Thresholds) - add to readme (?) #176
Unanswered
couleurs256
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
cache_device="cpu"Eliminates JPEG Artifacts in Flux (Even at High Thresholds)Problem:
With
cache_device="cuda"andrel_l1_thresh > 0.4, Flux outputs show blocky JPEG-like artifacts since recent ComfyUI updates, color banding, and noisy fur/textures — especially on FP8 or quantized models.Lowering rel_l1_thresh around 0.22 fixed the issue but removes any generation speed improvement.
Fix:
Switch TeaCache →
cache_device="cpu"solved the problem after hours of headaches→ 100% clean output, even at
thresh=0.4+→ Only ~10–15% speed loss vs full GPU caching
→ Works reliably after ComfyUI updates (v0.3.75+)
Before/After (same seed, Flux.1 Dev, 20 steps or more, thresh=0.40):

Before, with cache device set to cuda :
After, with cache device set to CPU :
Now it works flawlessly again. I'm new to github, but maybe this could be added to the main readme file and help troubleshoot issues. I spent hours finding this solution and wanted to share it.
Beta Was this translation helpful? Give feedback.
All reactions