mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
feat(example-images): add NSFW level setting endpoint
Add new POST endpoint `/api/lm/example-images/set-nsfw-level` to allow updating NSFW classification for individual example images. The endpoint supports both regular and custom images, validates required parameters, and updates the corresponding model metadata. This enables users to manually adjust NSFW ratings for better content filtering.
This commit is contained in:
@@ -12,11 +12,7 @@ export class LoraContextMenu extends BaseContextMenu {
|
||||
this.modelType = 'lora';
|
||||
this.resetAndReload = resetAndReload;
|
||||
|
||||
// Initialize NSFW Level Selector events only if not already initialized
|
||||
if (this.nsfwSelector && !this.nsfwSelector.dataset.initialized) {
|
||||
this.initNSFWSelector();
|
||||
this.nsfwSelector.dataset.initialized = 'true';
|
||||
}
|
||||
this.initNSFWSelector();
|
||||
}
|
||||
|
||||
// Use the saveModelMetadata implementation from loraApi
|
||||
@@ -78,4 +74,4 @@ export class LoraContextMenu extends BaseContextMenu {
|
||||
}
|
||||
|
||||
// Mix in shared methods
|
||||
Object.assign(LoraContextMenu.prototype, ModelContextMenuMixin);
|
||||
Object.assign(LoraContextMenu.prototype, ModelContextMenuMixin);
|
||||
|
||||
Reference in New Issue
Block a user