mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 12:25:06 +08:00
rename CFGDenoiserParams fields for #8064
This commit is contained in:
parent
af416a2dbd
commit
7f2005127f
@ -29,7 +29,7 @@ class ImageSaveParams:
|
|||||||
|
|
||||||
|
|
||||||
class CFGDenoiserParams:
|
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
|
self.x = x
|
||||||
"""Latent image representation in the process of being denoised"""
|
"""Latent image representation in the process of being denoised"""
|
||||||
|
|
||||||
@ -45,11 +45,11 @@ class CFGDenoiserParams:
|
|||||||
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.tensor = tensor
|
self.text_cond = text_cond
|
||||||
""" Encoder hidden states of conditioning"""
|
""" Encoder hidden states of text conditioning from prompt"""
|
||||||
|
|
||||||
self.uncond = uncond
|
self.text_uncond = text_uncond
|
||||||
""" Encoder hidden states of unconditioning"""
|
""" Encoder hidden states of text conditioning from negative prompt"""
|
||||||
|
|
||||||
|
|
||||||
class CFGDenoisedParams:
|
class CFGDenoisedParams:
|
||||||
|
@ -106,8 +106,8 @@ class CFGDenoiser(torch.nn.Module):
|
|||||||
x_in = denoiser_params.x
|
x_in = denoiser_params.x
|
||||||
image_cond_in = denoiser_params.image_cond
|
image_cond_in = denoiser_params.image_cond
|
||||||
sigma_in = denoiser_params.sigma
|
sigma_in = denoiser_params.sigma
|
||||||
tensor = denoiser_params.tensor
|
tensor = denoiser_params.text_cond
|
||||||
uncond = denoiser_params.uncond
|
uncond = denoiser_params.text_uncond
|
||||||
|
|
||||||
if tensor.shape[1] == uncond.shape[1]:
|
if tensor.shape[1] == uncond.shape[1]:
|
||||||
if not is_edit_model:
|
if not is_edit_model:
|
||||||
|
Loading…
Reference in New Issue
Block a user