mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user