fix(ui): read cfg_scale and clip_skip with snake_case fallback, pass custom image id for recipe creation (#1012)

This commit is contained in:
Will Miao
2026-07-04 18:40:24 +08:00
parent 3494037d20
commit 817fe21b3e
2 changed files with 5 additions and 2 deletions

View File

@@ -210,8 +210,8 @@ function renderMediaItem(img, index, exampleFiles) {
const model = meta.Model || '';
const steps = meta.steps || '';
const sampler = meta.sampler || '';
const cfgScale = meta.cfgScale || '';
const clipSkip = meta.clipSkip || '';
const cfgScale = meta.cfg_scale || meta.cfgScale || '';
const clipSkip = meta.clip_skip || meta.clipSkip || '';
// Check if we have any meaningful generation parameters
const hasParams = seed || model || steps || sampler || cfgScale || clipSkip;
@@ -242,6 +242,7 @@ function renderMediaItem(img, index, exampleFiles) {
data-image-url="${img.url || ''}"
data-image-nsfw="${img.nsfwLevel ?? ''}"
data-image-id="${cdnImageId}"
data-img-id="${img.id || ''}"
data-local-path="${localFile ? localFile.path : ''}">
<i class="fas fa-book-open"></i>
</button>