diff options
author | hako-mikan <122196982+hako-mikan@users.noreply.github.com> | 2024-02-09 14:17:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 14:17:40 +0000 |
commit | 0bc7867ccd4ac24f5f270cb767c4642d0a0c001c (patch) | |
tree | 2ad13a0cf77bc189a8c9097bd507f9674f993da6 /modules/api | |
parent | 816096e642187a18b11e2729c42c0b5f677f047d (diff) | |
parent | cf2772fab0af5573da775e7437e6acdca424f26e (diff) | |
download | stable-diffusion-webui-gfx803-0bc7867ccd4ac24f5f270cb767c4642d0a0c001c.tar.gz stable-diffusion-webui-gfx803-0bc7867ccd4ac24f5f270cb767c4642d0a0c001c.tar.bz2 stable-diffusion-webui-gfx803-0bc7867ccd4ac24f5f270cb767c4642d0a0c001c.zip |
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/api')
-rw-r--r-- | modules/api/api.py | 15 | ||||
-rw-r--r-- | modules/api/models.py | 3 |
2 files changed, 0 insertions, 18 deletions
diff --git a/modules/api/api.py b/modules/api/api.py index 09083874..b3d74e51 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -22,7 +22,6 @@ from modules.api import models from modules.shared import opts from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img, process_images from modules.textual_inversion.textual_inversion import create_embedding, train_embedding -from modules.textual_inversion.preprocess import preprocess from modules.hypernetworks.hypernetwork import create_hypernetwork, train_hypernetwork from PIL import PngImagePlugin, Image from modules.sd_models_config import find_checkpoint_config_near_filename @@ -235,7 +234,6 @@ class Api: self.add_api_route("/sdapi/v1/refresh-vae", self.refresh_vae, methods=["POST"]) self.add_api_route("/sdapi/v1/create/embedding", self.create_embedding, methods=["POST"], response_model=models.CreateResponse) self.add_api_route("/sdapi/v1/create/hypernetwork", self.create_hypernetwork, methods=["POST"], response_model=models.CreateResponse) - self.add_api_route("/sdapi/v1/preprocess", self.preprocess, methods=["POST"], response_model=models.PreprocessResponse) self.add_api_route("/sdapi/v1/train/embedding", self.train_embedding, methods=["POST"], response_model=models.TrainResponse) self.add_api_route("/sdapi/v1/train/hypernetwork", self.train_hypernetwork, methods=["POST"], response_model=models.TrainResponse) self.add_api_route("/sdapi/v1/memory", self.get_memory, methods=["GET"], response_model=models.MemoryResponse) @@ -675,19 +673,6 @@ class Api: finally: shared.state.end() - def preprocess(self, args: dict): - try: - shared.state.begin(job="preprocess") - preprocess(**args) # quick operation unless blip/booru interrogation is enabled - shared.state.end() - return models.PreprocessResponse(info='preprocess complete') - except KeyError as e: - return models.PreprocessResponse(info=f"preprocess error: invalid token: {e}") - except Exception as e: - return models.PreprocessResponse(info=f"preprocess error: {e}") - finally: - shared.state.end() - def train_embedding(self, args: dict): try: shared.state.begin(job="train_embedding") diff --git a/modules/api/models.py b/modules/api/models.py index a0d80af8..33894b3e 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -202,9 +202,6 @@ class TrainResponse(BaseModel): class CreateResponse(BaseModel): info: str = Field(title="Create info", description="Response string from create embedding or hypernetwork task.") -class PreprocessResponse(BaseModel): - info: str = Field(title="Preprocess info", description="Response string from preprocessing task.") - fields = {} for key, metadata in opts.data_labels.items(): value = opts.data.get(key) |