distilled cfg scale info text

This commit is contained in:
layerdiffusion
2024-08-08 01:22:27 -07:00
parent 572a3c3d8b
commit a189f3e53e
4 changed files with 13 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ class ForgeDiffusionEngine:
self.tiling_enabled = False
self.first_stage_model = None # set this so that you can change VAE in UI
self.use_distilled_cfg_scale = False
# WebUI Dirty Legacy
self.is_sd1 = False

View File

@@ -66,6 +66,8 @@ class Flux(ForgeDiffusionEngine):
self.forge_objects_original = self.forge_objects.shallow_copy()
self.forge_objects_after_applying_lora = self.forge_objects.shallow_copy()
self.use_distilled_cfg_scale = True
# WebUI Legacy
self.first_stage_model = vae.first_stage_model

View File

@@ -722,7 +722,13 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"Steps": p.steps,
"Sampler": p.sampler_name,
"Schedule type": p.scheduler,
"CFG scale": p.cfg_scale,
"CFG scale": p.cfg_scale
}
if p.sd_model.use_distilled_cfg_scale:
generation_params['Distilled CFG Scale'] = p.distilled_cfg_scale
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],
"Face restoration": opts.face_restoration_model if p.restore_faces else None,
@@ -748,7 +754,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
**p.extra_generation_params,
"Version": program_version() if opts.add_version_to_infotext else None,
"User": p.user if opts.add_user_name_to_info else None,
}
})
for key, value in generation_params.items():
try:

View File

@@ -460,7 +460,7 @@ def create_ui():
PasteField(toprow.prompt, "Prompt", api="prompt"),
PasteField(toprow.negative_prompt, "Negative prompt", api="negative_prompt"),
PasteField(cfg_scale, "CFG scale", api="cfg_scale"),
PasteField(distilled_cfg_scale, "Distilled CFG scale", api="distilled_cfg_scale"),
PasteField(distilled_cfg_scale, "Distilled CFG Scale", api="distilled_cfg_scale"),
PasteField(width, "Size-1", api="width"),
PasteField(height, "Size-2", api="height"),
PasteField(batch_size, "Batch size", api="batch_size"),
@@ -828,7 +828,7 @@ def create_ui():
(toprow.prompt, "Prompt"),
(toprow.negative_prompt, "Negative prompt"),
(cfg_scale, "CFG scale"),
(distilled_cfg_scale, "Distilled CFG scale"),
(distilled_cfg_scale, "Distilled CFG Scale"),
(image_cfg_scale, "Image CFG scale"),
(width, "Size-1"),
(height, "Size-2"),