From fd38a9bf63b642482e406b71a4bf1cf6161237c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:10:41 +0000 Subject: [PATCH] Fix FreeU crash in ConsiStory script Enabling FreeU called len() on the checkbox bool instead of the parsed preset list, raising TypeError and aborting the run. Even without the crash, all four FreeU parameters were passed the same value. Use the parsed freeu_preset values, and log the invalid input before clearing it. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude --- scripts/consistory_ext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/consistory_ext.py b/scripts/consistory_ext.py index f28fc3848..ad1880880 100644 --- a/scripts/consistory_ext.py +++ b/scripts/consistory_ext.py @@ -95,10 +95,10 @@ class ConsiStoryScript(scripts_manager.Script): try: freeu_preset = [float(f.strip()) for f in freeu_preset.split(',')] except Exception: - freeu_preset = [] log.warning(f'ConsiStory: freeu="{freeu_preset}" invalid') - if len(freeu) == 4: - shared.sd_model.enable_freeu(s1=freeu[0], s2=freeu[0], b1=freeu[0], b2=freeu[0]) + freeu_preset = [] + if len(freeu_preset) == 4: + shared.sd_model.enable_freeu(s1=freeu_preset[0], s2=freeu_preset[1], b1=freeu_preset[2], b2=freeu_preset[3]) steps = 50 if steps else p.steps if injection: try: