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 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-06-11 08:10:41 +00:00
committed by QualiaRain
parent cfcc7c7338
commit fd38a9bf63
+3 -3
View File
@@ -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: