Skip to content

Commit

Permalink
Update script_callbacks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakura-Luna committed May 14, 2023
1 parent 3078001 commit 8abfc95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/script_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, x, sampling_step, total_sampling_steps, inner_model):
"""Total number of sampling steps planned"""

self.inner_model = inner_model
"""Inner model reference that is being used for denoising"""
"""Inner model reference used for denoising"""


class AfterCFGCallbackParams:
Expand All @@ -79,7 +79,7 @@ def __init__(self, x, sampling_step, total_sampling_steps):
"""Total number of sampling steps planned"""

self.output_altered = False
"""A flag for CFGDenoiser that indicates whether the output has been altered by the callback"""
"""A flag for CFGDenoiser indicating whether the output has been altered by the callback"""


class UiTrainTabParams:
Expand Down Expand Up @@ -360,9 +360,9 @@ def on_cfg_denoised(callback):


def on_cfg_after_cfg(callback):
"""register a function to be called in the kdiffussion cfg_denoiser method after cfg calculations has completed.
"""register a function to be called in the kdiffussion cfg_denoiser method after cfg calculations are completed.
The callback is called with one argument:
- params: CFGDenoisedParams - parameters to be passed to the inner model and sampling state details.
- params: AfterCFGCallbackParams - parameters to be passed to the script for post-processing after cfg calculation.
"""
add_callback(callback_map['callbacks_cfg_after_cfg'], callback)

Expand Down

0 comments on commit 8abfc95

Please sign in to comment.