mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-07-13 20:21:16 -03:00
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:
@@ -586,6 +586,7 @@ export function initMediaControlHandlers(container) {
|
|||||||
const imageMetaRaw = this.dataset.imageMeta;
|
const imageMetaRaw = this.dataset.imageMeta;
|
||||||
const imageUrl = this.dataset.imageUrl;
|
const imageUrl = this.dataset.imageUrl;
|
||||||
const imageNsfw = this.dataset.imageNsfw;
|
const imageNsfw = this.dataset.imageNsfw;
|
||||||
|
const imgId = this.dataset.imgId || '';
|
||||||
const localPath = this.dataset.localPath || '';
|
const localPath = this.dataset.localPath || '';
|
||||||
const showcaseSection = this.closest('.showcase-section');
|
const showcaseSection = this.closest('.showcase-section');
|
||||||
const modelHash = showcaseSection ? showcaseSection.dataset.modelHash : '';
|
const modelHash = showcaseSection ? showcaseSection.dataset.modelHash : '';
|
||||||
@@ -613,6 +614,7 @@ export function initMediaControlHandlers(container) {
|
|||||||
meta: imageMeta,
|
meta: imageMeta,
|
||||||
url: imageUrl,
|
url: imageUrl,
|
||||||
nsfwLevel: imageNsfw ? parseInt(imageNsfw, 10) : undefined,
|
nsfwLevel: imageNsfw ? parseInt(imageNsfw, 10) : undefined,
|
||||||
|
id: imgId || undefined,
|
||||||
},
|
},
|
||||||
model_hash: modelHash,
|
model_hash: modelHash,
|
||||||
model_name: modelName || modelHash,
|
model_name: modelName || modelHash,
|
||||||
|
|||||||
@@ -210,8 +210,8 @@ function renderMediaItem(img, index, exampleFiles) {
|
|||||||
const model = meta.Model || '';
|
const model = meta.Model || '';
|
||||||
const steps = meta.steps || '';
|
const steps = meta.steps || '';
|
||||||
const sampler = meta.sampler || '';
|
const sampler = meta.sampler || '';
|
||||||
const cfgScale = meta.cfgScale || '';
|
const cfgScale = meta.cfg_scale || meta.cfgScale || '';
|
||||||
const clipSkip = meta.clipSkip || '';
|
const clipSkip = meta.clip_skip || meta.clipSkip || '';
|
||||||
|
|
||||||
// Check if we have any meaningful generation parameters
|
// Check if we have any meaningful generation parameters
|
||||||
const hasParams = seed || model || steps || sampler || cfgScale || clipSkip;
|
const hasParams = seed || model || steps || sampler || cfgScale || clipSkip;
|
||||||
@@ -242,6 +242,7 @@ function renderMediaItem(img, index, exampleFiles) {
|
|||||||
data-image-url="${img.url || ''}"
|
data-image-url="${img.url || ''}"
|
||||||
data-image-nsfw="${img.nsfwLevel ?? ''}"
|
data-image-nsfw="${img.nsfwLevel ?? ''}"
|
||||||
data-image-id="${cdnImageId}"
|
data-image-id="${cdnImageId}"
|
||||||
|
data-img-id="${img.id || ''}"
|
||||||
data-local-path="${localFile ? localFile.path : ''}">
|
data-local-path="${localFile ? localFile.path : ''}">
|
||||||
<i class="fas fa-book-open"></i>
|
<i class="fas fa-book-open"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user