Add option to experiment with results from other impl

Setting -> Compatibility -> Try to reproduce the results from external software
This commit is contained in:
layerdiffusion
2024-08-11 17:02:50 -07:00
parent 08958f84c0
commit 19b41b9438
4 changed files with 33 additions and 14 deletions

View File

@@ -17,7 +17,7 @@ from typing import Any
import modules.sd_hijack
from modules import devices, prompt_parser, masking, sd_samplers, lowvram, infotext_utils, extra_networks, sd_vae_approx, scripts, sd_samplers_common, sd_unet, errors, rng, profiling
from modules.rng import slerp # noqa: F401
from modules.rng import slerp, get_noise_source_type # noqa: F401
from modules.sd_samplers_common import images_tensor_to_samples, decode_first_stage, approximation_indexes
from modules.shared import opts, cmd_opts, state
import modules.shared as shared
@@ -729,6 +729,8 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
if p.sd_model.use_distilled_cfg_scale:
generation_params['Distilled CFG Scale'] = p.distilled_cfg_scale
noise_source_type = get_noise_source_type()
generation_params.update({
"Image CFG scale": getattr(p, 'image_cfg_scale', None),
"Seed": p.all_seeds[0] if use_main_prompt else all_seeds[index],
@@ -750,7 +752,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"Token merging ratio": None if token_merging_ratio == 0 else token_merging_ratio,
"Token merging ratio hr": None if not enable_hr or token_merging_ratio_hr == 0 else token_merging_ratio_hr,
"Init image hash": getattr(p, 'init_img_hash', None),
"RNG": opts.randn_source if opts.randn_source != "GPU" else None,
"RNG": noise_source_type if noise_source_type != "GPU" else None,
"Tiling": "True" if p.tiling else None,
**p.extra_generation_params,
"Version": program_version() if opts.add_version_to_infotext else None,