-
Notifications
You must be signed in to change notification settings - Fork 10
/
visualize_diffusion.yaml
39 lines (33 loc) · 3.4 KB
/
visualize_diffusion.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# STABLE DIFFUSION EXPERIMENT CONFIGURATION
# This config file contains the experiment configuration for the Stable Diffusion inpaint model from the diffusers library.
# IDENTIFIER CONFIGURATIONS
# Specifies the model and experiment identifiers.
# DO NOT CHANGE THESE!
model_identifier: inpaint
exp_identifier: visualize-diffusion
# MODEL CONFIGURATIONS
# Specifies the model configurations.
model_id: ./weights/stable-diffusion-2-inpainting # Name of the Stable Diffusion repository on HuggingFace (e.g. stabilityai/stable-diffusion-2-1) or the path to the cloned repository (e.g. /mypath/stable-diffusion-2-1).
scheduler: DPMSolverMultistepScheduler # Name of the scheduler algorithm.
att_slicing: True # Whether attention slicing should be used (reduces memory consumption during the diffusion process at the cost of speed).
vae_slicing: True # Whether VAE slicing should be used (reduces memory consumption during the decoding stage at the cost of speed).
vae_tiling: False # Whether VAE tiling should be used (reduces memory consumption during the decoding stage at the cost of speed).
enable_xformers: False # Whether to enable xFormers for optimized performance in the attention blocks (requires the xformers package).
gpu_id: 0 # GPU index.
diffusion_steps: 25 # Amount of diffusion steps to perform (higher values increase quality at the cost of speed).
guidance_scale: 9.5 # Guidance scale factor for classifier free guidance (higher values lead to better correspondence to the prompt, while lower values increase diversity).
# EXPERIMENT CONFIGURATIONS
# Specifies the experiment configurations.
output_path: ./experiments # Path for storing the experiment results (a new folder will be placed at the specified location).
gif_frame_dur: 200 # Specifies the frame duration in milliseconds for the produced gifs.
# PROMPT CONFIGURATION
prompt: A humanoid roboter astronaut.|black and white, blurry, painting, drawing, watermark # Input prompt where the positive part is separated from the negative part by a vertical line "|" without any whitespace in between.
load_prompt_embeds: ./experiments/2023-03-27_21-46-30_inpaint_single-inference/embeddings/output-1_diffstep-25.pt # Path to a local file containing the prompt embeddings. Caution the parameter "prompt" does not apply, if a pre-generated prompt embedding is loaded from a file.
# LATENT NOISE, IMAGE & MASK CONFIGURATION
rand_seed: 0 # Random seed for sampling reproducible latent noise that is added to the input image for inpainting and for sampling the encoded latents of the input image from the VAE..
height: 768 # Image height of the desired VAE output (used for resizing the input image and for computing the latent noise height).
width: 768 # Image width of the desired VAE output (used for resizing the input image and for computing the latent noise width).
images_per_prompt: 1 # Amount of images to generate per prompt (specifies the batch dimension of the latent noise).
load_latent_noise: ./experiments/2023-03-27_21-46-30_inpaint_single-inference/embeddings/output-1_diffstep-25.pt # Path to a local file containing the latent noise tensor. Caution the parameters "height", "width" and "images_per_prompt" do not apply, if a pre-generated latent noise tensor is loaded from a file.
image: ./experiments/2023-03-27_21-40-35_img2img_single-inference/images/output-0_diffstep-25.png # Path to a local image file.
mask: ./resources/astronaut_mask.png # Path to a local mask image.