@@ -24,13 +24,22 @@ def __init__(self, image, p, filename, pnginfo):
24
24
"""dictionary with parameters for image's PNG info data; infotext will have the key 'parameters'"""
25
25
26
26
27
- class CGFDenoiserParams :
28
- def __init__ (self , x_in , image_cond_in , sigma_in , sampling_step , total_sampling_steps ):
29
- self .x_in = x_in
30
- self .image_cond_in = image_cond_in
31
- self .sigma_in = sigma_in
27
+ class CFGDenoiserParams :
28
+ def __init__ (self , x , image_cond , sigma , sampling_step , total_sampling_steps ):
29
+ self .x = x
30
+ """Latent image representation in the process of being denoised"""
31
+
32
+ self .image_cond = image_cond
33
+ """Conditioning image"""
34
+
35
+ self .sigma = sigma
36
+ """Current sigma noise step value"""
37
+
32
38
self .sampling_step = sampling_step
39
+ """Current Sampling step number"""
40
+
33
41
self .total_sampling_steps = total_sampling_steps
42
+ """Total number of sampling steps planned"""
34
43
35
44
36
45
ScriptCallback = namedtuple ("ScriptCallback" , ["script" , "callback" ])
@@ -94,7 +103,7 @@ def image_saved_callback(params: ImageSaveParams):
94
103
report_exception (c , 'image_saved_callback' )
95
104
96
105
97
- def cfg_denoiser_callback (params : CGFDenoiserParams ):
106
+ def cfg_denoiser_callback (params : CFGDenoiserParams ):
98
107
for c in callbacks_cfg_denoiser :
99
108
try :
100
109
c .callback (params )
@@ -153,7 +162,7 @@ def on_image_saved(callback):
153
162
def on_cfg_denoiser (callback ):
154
163
"""register a function to be called in the kdiffussion cfg_denoiser method after building the inner model inputs.
155
164
The callback is called with one argument:
156
- - params: CGFDenoiserParams - parameters to be passed to the inner model and sampling state details.
165
+ - params: CFGDenoiserParams - parameters to be passed to the inner model and sampling state details.
157
166
"""
158
167
add_callback (callbacks_cfg_denoiser , callback )
159
168
0 commit comments