forked from parlance-zz/g-diffuser-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathg_diffuser_defaults.py
More file actions
33 lines (28 loc) · 2.56 KB
/
Copy pathg_diffuser_defaults.py
File metadata and controls
33 lines (28 loc) · 2.56 KB
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
import argparse
# ******************** SETTINGS BEGIN ************************
DEFAULT_SAMPLE_SETTINGS = argparse.Namespace()
DEFAULT_SAMPLE_SETTINGS.sampler = "k_dpm_2_ancestral" # default sampling mode (ddim, plms, k_euler, k_euler_ancestral, k_heun, k_dpm_2, k_dpm_2_ancestral, k_lms)
DEFAULT_SAMPLE_SETTINGS.n = 1 # number of samples to generate per sample command by default
DEFAULT_SAMPLE_SETTINGS.resolution = (640,512) # default resolution for img / video outputs
DEFAULT_SAMPLE_SETTINGS.max_resolution = (768,768) # if you run out of ram due to output resolution lower this to prevent exceeding your max memory
DEFAULT_SAMPLE_SETTINGS.resolution_granularity = 8 # required by stable-diffusion for now due to latent space subsampling
DEFAULT_SAMPLE_SETTINGS.noise_start = 0.65 # default strength for pure img2img or style transfer
DEFAULT_SAMPLE_SETTINGS.noise_end = 0.01 # can be used to influence in/out-painting quality
DEFAULT_SAMPLE_SETTINGS.noise_eta = 0.70 # can be used to influence in/out-painting quality
DEFAULT_SAMPLE_SETTINGS.scale = 10. # default cfg scale
DEFAULT_SAMPLE_SETTINGS.steps = 75 # default number of sampling steps, lower to reduce sampling time
DEFAULT_SAMPLE_SETTINGS.noise_q = 1. # fall-off of shaped noise distribution for in/out-painting
DEFAULT_SAMPLE_SETTINGS.auto_seed_range = (10000,99999) # automatic random seed range
DEFAULT_SAMPLE_SETTINGS.model_name = "stable-diffusion-v1-5-clip-small" # default model id to use, see g_diffuser_config_models.yaml for the list of models to be loaded by grpc server
DEFAULT_SAMPLE_SETTINGS.guidance_strength = 0.618 # default guidance strength (only affects 'clip guided' models)
DEFAULT_SAMPLE_SETTINGS.negative_prompt = None # default negative prompt string or None
DEFAULT_SAMPLE_SETTINGS.min_outpaint_noise = 1.618 # 1 for pure shaped noise, values above 1. add some unshaped noise
# ******************** SETTINGS END ************************
if __name__ == "__main__": # you can execute this file with python to see a summary of your defaults
from extensions.g_diffuser_lib import print_namespace, get_args_parser
print("\ndefault sample settings: ")
print_namespace(DEFAULT_SAMPLE_SETTINGS, debug=True)
parser = get_args_parser()
args = parser.parse_args()
print("\ndefault standard args: ")
print_namespace(args, debug=True)