diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-03-11 11:52:29 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-03-11 11:52:29 +0000 |
commit | 7f2005127ff20170e2d92f353416c7f0705c593b (patch) | |
tree | 46638a7a0069c260fed6b363b2fd59259264482c | |
parent | af416a2dbd6ace02b2968e2d11b94947bfa87433 (diff) | |
download | stable-diffusion-webui-gfx803-7f2005127ff20170e2d92f353416c7f0705c593b.tar.gz stable-diffusion-webui-gfx803-7f2005127ff20170e2d92f353416c7f0705c593b.tar.bz2 stable-diffusion-webui-gfx803-7f2005127ff20170e2d92f353416c7f0705c593b.zip |
rename CFGDenoiserParams fields for #8064
-rw-r--r-- | modules/script_callbacks.py | 10 | ||||
-rw-r--r-- | modules/sd_samplers_kdiffusion.py | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/script_callbacks.py b/modules/script_callbacks.py index d1703135..07911876 100644 --- a/modules/script_callbacks.py +++ b/modules/script_callbacks.py @@ -29,7 +29,7 @@ class ImageSaveParams: class CFGDenoiserParams:
- def __init__(self, x, image_cond, sigma, sampling_step, total_sampling_steps, tensor, uncond):
+ def __init__(self, x, image_cond, sigma, sampling_step, total_sampling_steps, text_cond, text_uncond):
self.x = x
"""Latent image representation in the process of being denoised"""
@@ -45,11 +45,11 @@ class CFGDenoiserParams: self.total_sampling_steps = total_sampling_steps
"""Total number of sampling steps planned"""
- self.tensor = tensor
- """ Encoder hidden states of conditioning"""
+ self.text_cond = text_cond
+ """ Encoder hidden states of text conditioning from prompt"""
- self.uncond = uncond
- """ Encoder hidden states of unconditioning"""
+ self.text_uncond = text_uncond
+ """ Encoder hidden states of text conditioning from negative prompt"""
class CFGDenoisedParams:
diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index ea974be0..93f0e55a 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -106,8 +106,8 @@ class CFGDenoiser(torch.nn.Module): x_in = denoiser_params.x
image_cond_in = denoiser_params.image_cond
sigma_in = denoiser_params.sigma
- tensor = denoiser_params.tensor
- uncond = denoiser_params.uncond
+ tensor = denoiser_params.text_cond
+ uncond = denoiser_params.text_uncond
if tensor.shape[1] == uncond.shape[1]:
if not is_edit_model:
|