From 47c7fdf6e485e5e87f377fee2051777bcde731a4 Mon Sep 17 00:00:00 2001 From: Johannes Stelzer Date: Mon, 9 Jan 2023 13:42:02 +0100 Subject: [PATCH] parameters --- README.md | 3 ++- latent_blending.py | 2 +- parameters.md | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 parameters.md diff --git a/README.md b/README.md index 91f489a..99674fe 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ imgs_transition = lb.run_transition() ``` ## Gradio UI To run the UI on your local machine, run `gradio_ui.py` +You can find the [most relevant parameters here](parameters.md) ## Example 1: Simple transition ![](example1.jpg) @@ -46,7 +47,7 @@ lb.set_width(1024) lb.set_guidance_scale(5.0) ``` ### depth_strength / list_injection_strength -The strength dictates how early the blending process starts. The closer its value is to zero, the more inventive the results will be; whereas, a value closer to one indicates a more simple alpha blending. +The strength of the diffusion iterations determines when the blending process will begin. A value close to zero results in more creative and intricate outcomes, while a value closer to one indicates a simpler alpha blending. However, low values may also bring about the introduction of additional objects and motion. ## Set up the branching structure diff --git a/latent_blending.py b/latent_blending.py index 5894a4f..08eebca 100644 --- a/latent_blending.py +++ b/latent_blending.py @@ -252,7 +252,7 @@ class LatentBlending(): Deeper injections will cause (unwanted) formation of new structures, more shallow values will go into alpha-blendy land. num_inference_steps: int - Number of diffusion steps. Larger values will take more compute time. + Number of diffusion steps. Higher values will take more compute time. nmb_branches_final (int): The number of diffusion-generated images at the end of the inference. nmb_mindist (int): The minimum number of diffusion steps diff --git a/parameters.md b/parameters.md new file mode 100644 index 0000000..2388e46 --- /dev/null +++ b/parameters.md @@ -0,0 +1,21 @@ +# Gradio parameters + +## depth_strength +determines when the blending process will begin in terms of diffusion steps. A value close to zero results in more creative and intricate outcomes, while a value closer to one indicates a simpler alpha blending. However, low values may also bring about the introduction of additional objects and motion. + +## guidance_scale +higher guidance scale encourages the creation of images that are closely aligned with the text. However, the best results for latent blending are achieved with lower values. + +## guidance_scale_mid_damper +decreases the guidance scale in the middle of a transition. A value of 1 would maintain a constant guidance scale, while a value of 0 would decrease the guidance scale to 1 at the midpoint of the transition + +## mid_compression_scaler +stretches the spacing towards the center, with a linear spacing at mid_compression_scaler=1 and a higher sampling density in the middle at mid_compression_scaler=2 + +## num_inference_steps +determines the quality of the results. While an increase in this value may improve the outcome, it will also require more computation time. + +## nmb_trans_images +final number of images computed in the last branch of the tree. Higher values will give better results but require more computation time. + +