Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A616567126 GPT WEB JAVA SdConfigController

From Leeroopedia
Knowledge Sources
Domains Admin_API, Stable_Diffusion_Config
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller providing CRUD operations for Stable Diffusion model and LoRA configuration in the admin panel.

Description

The SdConfigController exposes endpoints under `/sys/sd/config` for managing both SD models and LoRA adapters: paginated queries, add, update, and delete for each. It delegates to `ISdModelService` and `ISdLoraService` respectively.

Usage

Use this controller when building the admin interface for managing Stable Diffusion models and LoRA adapters available for image generation.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/sys/sd/config")
public class SdConfigController {

    // Model management
    @RequestMapping(value = "/query/model/page", method = RequestMethod.POST)
    public B<Page<SdModelQueryRes>> queryModelPage(@Validated @RequestBody SdModelQueryReq req);

    @RequestMapping(value = "/add/model", method = RequestMethod.POST)
    public B<Void> addModel(@Validated @RequestBody SdModelAddReq req);

    @RequestMapping(value = "/update/model", method = RequestMethod.POST)
    public B<Void> updateModel(@Validated @RequestBody SdModelUpdateReq req);

    @RequestMapping(value = "/delete/model", method = RequestMethod.POST)
    public B<Void> deleteModel(@Validated @RequestBody BaseDeleteEntity req);

    // LoRA management
    @RequestMapping(value = "/query/lora/page", method = RequestMethod.POST)
    public B<Page<SdLoraQueryRes>> queryLoraPage(@Validated @RequestBody SdLoraQueryReq req);

    @RequestMapping(value = "/add/lora", method = RequestMethod.POST)
    public B<Void> addLora(@Validated @RequestBody SdLoraAddReq req);

    @RequestMapping(value = "/update/lora", method = RequestMethod.POST)
    public B<Void> updateLora(@Validated @RequestBody SdLoraUpdateReq req);

    @RequestMapping(value = "/delete/lora", method = RequestMethod.POST)
    public B<Void> deleteLora(@Validated @RequestBody BaseDeleteEntity req);
}

Import

import com.intelligent.bot.api.sys.admin.SdConfigController;

I/O Contract

Inputs

Name Type Required Description
req SdModelQueryReq/SdLoraQueryReq Yes (query) Pagination params
req SdModelAddReq/SdLoraAddReq Yes (add) Model/LoRA name and config
req SdModelUpdateReq/SdLoraUpdateReq Yes (update) Updated fields
req BaseDeleteEntity Yes (delete) IDs to delete

Outputs

Name Type Description
queryModelPage B<Page<SdModelQueryRes>> Paginated SD model list
queryLoraPage B<Page<SdLoraQueryRes>> Paginated LoRA list
add/update/delete B<Void> Success confirmation

Usage Examples

Add SD Model

// POST /sys/sd/config/add/model
{
    "name": "realisticVisionV60",
    "alias": "Realistic Vision V6.0",
    "enabled": true
}

Add LoRA

// POST /sys/sd/config/add/lora
{
    "name": "animeStyle",
    "alias": "Anime Style",
    "enabled": true
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment