novelai-python 0.3.6__tar.gz → 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {novelai_python-0.3.6 → novelai_python-0.3.7}/PKG-INFO +1 -1
- {novelai_python-0.3.6 → novelai_python-0.3.7}/pyproject.toml +1 -1
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/__init__.py +2 -2
- {novelai_python-0.3.6 → novelai_python-0.3.7}/LICENSE +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/NOTICE.MD +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/README.md +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_exceptions.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/generate_image.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/upscale.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/schema.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/information.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/login.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/subscription.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/ApiToken.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/JwtToken.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/UserAuth.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/_base.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/LICENSE +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/_enum.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/suggest_tags.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/upscale.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/schema.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/information.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/login.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/subscription.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/server.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/encode.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/hash.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag_character.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag_nsfw.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/useful.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/__init__.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_random_prompt.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_server.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_server_run.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_upscale.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_information.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_login.py +0 -0
- {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_subscription.py +0 -0
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/__init__.py
RENAMED
|
@@ -146,7 +146,7 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
146
146
|
return base64.b64encode(buffered.getvalue()).decode("utf-8")
|
|
147
147
|
|
|
148
148
|
@staticmethod
|
|
149
|
-
def add_image_to_black_background(image: Union[str, bytes], width: int, height: int):
|
|
149
|
+
def add_image_to_black_background(image: Union[str, bytes], width: int = 448, height: int = 448):
|
|
150
150
|
"""
|
|
151
151
|
将图像缩放到一个指定的黑背景上,使其最大,比例不变。
|
|
152
152
|
:param image: 图像
|
|
@@ -201,7 +201,7 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
201
201
|
if self.image is not None:
|
|
202
202
|
self.image = self.resize_image(self.image, self.width, self.height)
|
|
203
203
|
if self.reference_image is not None:
|
|
204
|
-
self.reference_image = self.add_image_to_black_background(self.reference_image,
|
|
204
|
+
self.reference_image = self.add_image_to_black_background(self.reference_image, width=448, height=448)
|
|
205
205
|
return self
|
|
206
206
|
|
|
207
207
|
@field_validator('width')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/generate_image.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/information.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/subscription.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/_enum.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag_nsfw.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|