mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 14:10:13 -03:00
fix(SaveImageLM): correct scheduler mapping and deduplicate sampler map
- Fix incorrect mapping: "normal" -> "Normal" (was "Simple") - Replace inline sampler_mapping with CIVITAI_SAMPLER_MAP reference to eliminate duplicate definition
This commit is contained in:
@@ -446,7 +446,16 @@ class SaveImageLM:
|
|||||||
lora_resource["versionName"] = lora_civitai["name"]
|
lora_resource["versionName"] = lora_civitai["name"]
|
||||||
civitai_resources.append(lora_resource)
|
civitai_resources.append(lora_resource)
|
||||||
|
|
||||||
sampler_display = self._get_civitai_sampler_name(sampler, scheduler)
|
sampler_name = CIVITAI_SAMPLER_MAP.get(sampler, sampler) if sampler else None
|
||||||
|
|
||||||
|
scheduler_mapping = {
|
||||||
|
"normal": "Normal",
|
||||||
|
"karras": "Karras",
|
||||||
|
"exponential": "Exponential",
|
||||||
|
"sgm_uniform": "SGM Uniform",
|
||||||
|
"sgm_quadratic": "SGM Quadratic",
|
||||||
|
}
|
||||||
|
scheduler_name = scheduler_mapping.get(scheduler, scheduler) if scheduler else None
|
||||||
|
|
||||||
# Build output lines
|
# Build output lines
|
||||||
lines = [prompt] if prompt else [""]
|
lines = [prompt] if prompt else [""]
|
||||||
@@ -456,8 +465,11 @@ class SaveImageLM:
|
|||||||
params: list[str] = []
|
params: list[str] = []
|
||||||
if steps is not None:
|
if steps is not None:
|
||||||
params.append(f"Steps: {steps}")
|
params.append(f"Steps: {steps}")
|
||||||
if sampler_display:
|
if sampler_name:
|
||||||
params.append(f"Sampler: {sampler_display}")
|
if scheduler_name:
|
||||||
|
params.append(f"Sampler: {sampler_name} {scheduler_name}")
|
||||||
|
else:
|
||||||
|
params.append(f"Sampler: {sampler_name}")
|
||||||
if cfg is not None:
|
if cfg is not None:
|
||||||
params.append(f"CFG scale: {cfg}")
|
params.append(f"CFG scale: {cfg}")
|
||||||
if seed is not None:
|
if seed is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user