|
|
@ -273,7 +273,8 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con |
|
|
|
max_total_area = model_management.maximum_batch_area() |
|
|
|
max_total_area = model_management.maximum_batch_area() |
|
|
|
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat, model_options) |
|
|
|
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat, model_options) |
|
|
|
if "sampler_cfg_function" in model_options: |
|
|
|
if "sampler_cfg_function" in model_options: |
|
|
|
return model_options["sampler_cfg_function"](cond, uncond, cond_scale) |
|
|
|
args = {"cond": cond, "uncond": uncond, "cond_scale": cond_scale, "timestep": timestep} |
|
|
|
|
|
|
|
return model_options["sampler_cfg_function"](args) |
|
|
|
else: |
|
|
|
else: |
|
|
|
return uncond + (cond - uncond) * cond_scale |
|
|
|
return uncond + (cond - uncond) * cond_scale |
|
|
|
|
|
|
|
|
|
|
|