remove output_altered flag from AfterCFGCallbackParams
This commit is contained in:
parent
cb9a3a7809
commit
005849331e
@ -78,9 +78,6 @@ class AfterCFGCallbackParams:
|
|||||||
self.total_sampling_steps = total_sampling_steps
|
self.total_sampling_steps = total_sampling_steps
|
||||||
"""Total number of sampling steps planned"""
|
"""Total number of sampling steps planned"""
|
||||||
|
|
||||||
self.output_altered = False
|
|
||||||
"""A flag for CFGDenoiser indicating whether the output has been altered by the callback"""
|
|
||||||
|
|
||||||
|
|
||||||
class UiTrainTabParams:
|
class UiTrainTabParams:
|
||||||
def __init__(self, txt2img_preview_params):
|
def __init__(self, txt2img_preview_params):
|
||||||
|
@ -183,8 +183,7 @@ class CFGDenoiser(torch.nn.Module):
|
|||||||
|
|
||||||
after_cfg_callback_params = AfterCFGCallbackParams(denoised, state.sampling_step, state.sampling_steps)
|
after_cfg_callback_params = AfterCFGCallbackParams(denoised, state.sampling_step, state.sampling_steps)
|
||||||
cfg_after_cfg_callback(after_cfg_callback_params)
|
cfg_after_cfg_callback(after_cfg_callback_params)
|
||||||
if after_cfg_callback_params.output_altered:
|
denoised = after_cfg_callback_params.x
|
||||||
denoised = after_cfg_callback_params.x
|
|
||||||
|
|
||||||
self.step += 1
|
self.step += 1
|
||||||
return denoised
|
return denoised
|
||||||
|
Loading…
Reference in New Issue
Block a user