mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-23 14:12: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 RecipeContextMenu extends BaseContextMenu {
|
||||
this.nsfwSelector = document.getElementById('nsfwLevelSelector');
|
||||
this.modelType = 'recipe';
|
||||
|
||||
// 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 updateRecipeMetadata implementation from recipeApi
|
||||
@@ -286,4 +282,4 @@ export class RecipeContextMenu extends BaseContextMenu {
|
||||
}
|
||||
|
||||
// Mix in shared methods from ModelContextMenuMixin
|
||||
Object.assign(RecipeContextMenu.prototype, ModelContextMenuMixin);
|
||||
Object.assign(RecipeContextMenu.prototype, ModelContextMenuMixin);
|
||||
|
||||
Reference in New Issue
Block a user