text stringlengths 0 5.54k |
|---|
feature_extractor: typing.Optional[transformers.models.clip.image_processing_clip.CLIPImageProcessor] = None |
watermarker: typing.Optional[typing.Any] = None |
max_noise_level: int = 350 |
) |
Parameters |
vae (AutoencoderKL) β |
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. |
text_encoder (CLIPTextModel) β |
Frozen text-encoder. Stable Diffusion uses the text portion of |
CLIP, specifically |
the clip-vit-large-patch14 variant. |
tokenizer (CLIPTokenizer) β |
Tokenizer of class |
CLIPTokenizer. |
unet (UNet2DConditionModel) β Conditional U-Net architecture to denoise the encoded image latents. |
low_res_scheduler (SchedulerMixin) β |
A scheduler used to add initial noise to the low res conditioning image. It must be an instance of |
DDPMScheduler. |
scheduler (SchedulerMixin) β |
A scheduler to be used in combination with unet to denoise the encoded image latents. Can be one of |
DDIMScheduler, LMSDiscreteScheduler, or PNDMScheduler. |
Pipeline for text-guided image super-resolution using Stable Diffusion 2. |
This model inherits from DiffusionPipeline. Check the superclass documentation for the generic methods the |
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.) |
__call__ |
< |
source |
> |
( |
prompt: typing.Union[str, typing.List[str]] = None |
image: typing.Union[torch.FloatTensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None |
num_inference_steps: int = 75 |
guidance_scale: float = 9.0 |
noise_level: int = 20 |
negative_prompt: typing.Union[str, typing.List[str], NoneType] = None |
num_images_per_prompt: typing.Optional[int] = 1 |
eta: float = 0.0 |
generator: typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None |
latents: typing.Optional[torch.FloatTensor] = None |
prompt_embeds: typing.Optional[torch.FloatTensor] = None |
negative_prompt_embeds: typing.Optional[torch.FloatTensor] = None |
output_type: typing.Optional[str] = 'pil' |
return_dict: bool = True |
callback: typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None |
callback_steps: int = 1 |
) |
β |
StableDiffusionPipelineOutput or tuple |
Parameters |
prompt (str or List[str], optional) β |
The prompt or prompts to guide the image generation. If not defined, one has to pass prompt_embeds. |
instead. |
image (PIL.Image.Image or ListPIL.Image.Image or torch.FloatTensor) β |
Image, or tensor representing an image batch which will be upscaled. * |
num_inference_steps (int, optional, defaults to 50) β |
The number of denoising steps. More denoising steps usually lead to a higher quality image at the |
expense of slower inference. |
guidance_scale (float, optional, defaults to 7.5) β |
Guidance scale as defined in Classifier-Free Diffusion Guidance. |
guidance_scale is defined as w of equation 2. of Imagen |
Paper. Guidance scale is enabled by setting guidance_scale > 1. Higher guidance scale encourages to generate images that are closely linked to the text prompt, |
usually at the expense of lower image quality. |
negative_prompt (str or List[str], optional) β |
The prompt or prompts not to guide the image generation. If not defined, one has to pass |
negative_prompt_embeds. instead. Ignored when not using guidance (i.e., ignored if guidance_scale |
is less than 1). |
num_images_per_prompt (int, optional, defaults to 1) β |
The number of images to generate per prompt. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.