diff --git a/imaginairy/cli/run_api.py b/imaginairy/cli/run_api.py index 91aab807..6a28502f 100644 --- a/imaginairy/cli/run_api.py +++ b/imaginairy/cli/run_api.py @@ -10,7 +10,7 @@ def run_server_cmd(): """Run a HTTP API server.""" import uvicorn - from imaginairy.http.app import app + from imaginairy.http_app.app import app from imaginairy.log_utils import configure_logging configure_logging(level="DEBUG") diff --git a/imaginairy/http/__init__.py b/imaginairy/http_app/__init__.py similarity index 100% rename from imaginairy/http/__init__.py rename to imaginairy/http_app/__init__.py diff --git a/imaginairy/http/app.py b/imaginairy/http_app/app.py similarity index 94% rename from imaginairy/http/app.py rename to imaginairy/http_app/app.py index e9b37888..490b8ce0 100644 --- a/imaginairy/http/app.py +++ b/imaginairy/http_app/app.py @@ -10,8 +10,8 @@ from fastapi.responses import FileResponse, JSONResponse, StreamingResponse from fastapi.staticfiles import StaticFiles -from imaginairy.http.stablestudio import routes -from imaginairy.http.utils import generate_image +from imaginairy.http_app.stablestudio import routes +from imaginairy.http_app.utils import generate_image from imaginairy.schema import ImaginePrompt logger = logging.getLogger(__name__) diff --git a/imaginairy/http/stablestudio/__init__.py b/imaginairy/http_app/stablestudio/__init__.py similarity index 100% rename from imaginairy/http/stablestudio/__init__.py rename to imaginairy/http_app/stablestudio/__init__.py diff --git a/imaginairy/http/stablestudio/dist/Checkers.png b/imaginairy/http_app/stablestudio/dist/Checkers.png similarity index 100% rename from imaginairy/http/stablestudio/dist/Checkers.png rename to imaginairy/http_app/stablestudio/dist/Checkers.png diff --git a/imaginairy/http/stablestudio/dist/DummyImage.png b/imaginairy/http_app/stablestudio/dist/DummyImage.png similarity index 100% rename from imaginairy/http/stablestudio/dist/DummyImage.png rename to imaginairy/http_app/stablestudio/dist/DummyImage.png diff --git a/imaginairy/http/stablestudio/dist/Inter.ttf b/imaginairy/http_app/stablestudio/dist/Inter.ttf similarity index 100% rename from imaginairy/http/stablestudio/dist/Inter.ttf rename to imaginairy/http_app/stablestudio/dist/Inter.ttf diff --git a/imaginairy/http/stablestudio/dist/LICENSE b/imaginairy/http_app/stablestudio/dist/LICENSE similarity index 100% rename from imaginairy/http/stablestudio/dist/LICENSE rename to imaginairy/http_app/stablestudio/dist/LICENSE diff --git a/imaginairy/http/stablestudio/dist/PluginWithManifest.js b/imaginairy/http_app/stablestudio/dist/PluginWithManifest.js similarity index 100% rename from imaginairy/http/stablestudio/dist/PluginWithManifest.js rename to imaginairy/http_app/stablestudio/dist/PluginWithManifest.js diff --git a/imaginairy/http/stablestudio/dist/PluginWithoutManifest.js b/imaginairy/http_app/stablestudio/dist/PluginWithoutManifest.js similarity index 100% rename from imaginairy/http/stablestudio/dist/PluginWithoutManifest.js rename to imaginairy/http_app/stablestudio/dist/PluginWithoutManifest.js diff --git a/imaginairy/http/stablestudio/dist/assets/index-03379660.css b/imaginairy/http_app/stablestudio/dist/assets/index-03379660.css similarity index 100% rename from imaginairy/http/stablestudio/dist/assets/index-03379660.css rename to imaginairy/http_app/stablestudio/dist/assets/index-03379660.css diff --git a/imaginairy/http/stablestudio/dist/assets/index-80230e31.js b/imaginairy/http_app/stablestudio/dist/assets/index-80230e31.js similarity index 100% rename from imaginairy/http/stablestudio/dist/assets/index-80230e31.js rename to imaginairy/http_app/stablestudio/dist/assets/index-80230e31.js diff --git a/imaginairy/http/stablestudio/dist/favicon.svg b/imaginairy/http_app/stablestudio/dist/favicon.svg similarity index 100% rename from imaginairy/http/stablestudio/dist/favicon.svg rename to imaginairy/http_app/stablestudio/dist/favicon.svg diff --git a/imaginairy/http/stablestudio/dist/index.html b/imaginairy/http_app/stablestudio/dist/index.html similarity index 100% rename from imaginairy/http/stablestudio/dist/index.html rename to imaginairy/http_app/stablestudio/dist/index.html diff --git a/imaginairy/http/stablestudio/dist/logo.png b/imaginairy/http_app/stablestudio/dist/logo.png similarity index 100% rename from imaginairy/http/stablestudio/dist/logo.png rename to imaginairy/http_app/stablestudio/dist/logo.png diff --git a/imaginairy/http/stablestudio/models.py b/imaginairy/http_app/stablestudio/models.py similarity index 98% rename from imaginairy/http/stablestudio/models.py rename to imaginairy/http_app/stablestudio/models.py index 9d626066..77cb39ef 100644 --- a/imaginairy/http/stablestudio/models.py +++ b/imaginairy/http_app/stablestudio/models.py @@ -3,7 +3,7 @@ from pydantic import BaseModel, Extra, Field, HttpUrl, validator -from imaginairy.http.utils import Base64Bytes +from imaginairy.http_app.utils import Base64Bytes from imaginairy.schema import ImaginePrompt diff --git a/imaginairy/http/stablestudio/routes.py b/imaginairy/http_app/stablestudio/routes.py similarity index 91% rename from imaginairy/http/stablestudio/routes.py rename to imaginairy/http_app/stablestudio/routes.py index c39bf859..8aa3e5c8 100644 --- a/imaginairy/http/stablestudio/routes.py +++ b/imaginairy/http_app/stablestudio/routes.py @@ -3,21 +3,21 @@ from fastapi import APIRouter from fastapi.concurrency import run_in_threadpool -from imaginairy.http.stablestudio.models import ( +from imaginairy.http_app.stablestudio.models import ( StableStudioBatchRequest, StableStudioBatchResponse, StableStudioImage, StableStudioModel, StableStudioSampler, ) -from imaginairy.http.utils import generate_image_b64 +from imaginairy.http_app.utils import generate_image_b64 router = APIRouter() @router.post("/generate", response_model=StableStudioBatchResponse) async def generate(studio_request: StableStudioBatchRequest): - from imaginairy.http.app import gpu_lock + from imaginairy.http_app.app import gpu_lock generated_images = [] imagine_prompt = studio_request.input.to_imagine_prompt() diff --git a/imaginairy/http/utils.py b/imaginairy/http_app/utils.py similarity index 100% rename from imaginairy/http/utils.py rename to imaginairy/http_app/utils.py