mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -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:
@@ -11,11 +11,7 @@ export class CheckpointContextMenu extends BaseContextMenu {
|
||||
this.modelType = 'checkpoint';
|
||||
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();
|
||||
}
|
||||
|
||||
// Implementation needed by the mixin
|
||||
@@ -65,4 +61,4 @@ export class CheckpointContextMenu extends BaseContextMenu {
|
||||
}
|
||||
|
||||
// Mix in shared methods
|
||||
Object.assign(CheckpointContextMenu.prototype, ModelContextMenuMixin);
|
||||
Object.assign(CheckpointContextMenu.prototype, ModelContextMenuMixin);
|
||||
|
||||
Reference in New Issue
Block a user