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.
Files changed (50) hide show
  1. {novelai_python-0.3.6 → novelai_python-0.3.7}/PKG-INFO +1 -1
  2. {novelai_python-0.3.6 → novelai_python-0.3.7}/pyproject.toml +1 -1
  3. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/__init__.py +2 -2
  4. {novelai_python-0.3.6 → novelai_python-0.3.7}/LICENSE +0 -0
  5. {novelai_python-0.3.6 → novelai_python-0.3.7}/NOTICE.MD +0 -0
  6. {novelai_python-0.3.6 → novelai_python-0.3.7}/README.md +0 -0
  7. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/__init__.py +0 -0
  8. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_exceptions.py +0 -0
  9. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/__init__.py +0 -0
  10. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/__init__.py +0 -0
  11. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/generate_image.py +0 -0
  12. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/ai/upscale.py +0 -0
  13. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/schema.py +0 -0
  14. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/__init__.py +0 -0
  15. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/information.py +0 -0
  16. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/login.py +0 -0
  17. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/_response/user/subscription.py +0 -0
  18. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/ApiToken.py +0 -0
  19. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/JwtToken.py +0 -0
  20. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/UserAuth.py +0 -0
  21. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/__init__.py +0 -0
  22. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/credential/_base.py +0 -0
  23. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/__init__.py +0 -0
  24. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/LICENSE +0 -0
  25. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/__init__.py +0 -0
  26. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/_enum.py +0 -0
  27. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/generate_image/suggest_tags.py +0 -0
  28. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/ai/upscale.py +0 -0
  29. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/schema.py +0 -0
  30. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/__init__.py +0 -0
  31. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/information.py +0 -0
  32. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/login.py +0 -0
  33. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/sdk/user/subscription.py +0 -0
  34. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/server.py +0 -0
  35. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/__init__.py +0 -0
  36. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/encode.py +0 -0
  37. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/hash.py +0 -0
  38. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/__init__.py +0 -0
  39. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag.py +0 -0
  40. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag_character.py +0 -0
  41. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/random_prompt/tag_nsfw.py +0 -0
  42. {novelai_python-0.3.6 → novelai_python-0.3.7}/src/novelai_python/utils/useful.py +0 -0
  43. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/__init__.py +0 -0
  44. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_random_prompt.py +0 -0
  45. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_server.py +0 -0
  46. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_server_run.py +0 -0
  47. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_upscale.py +0 -0
  48. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_information.py +0 -0
  49. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_login.py +0 -0
  50. {novelai_python-0.3.6 → novelai_python-0.3.7}/tests/test_user_subscription.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: novelai-python
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: Novelai Python Binding With Pydantic
5
5
  Author-Email: sudoskys <coldlando@hotmail.com>
6
6
  License: Apache License 2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "novelai-python"
3
- version = "0.3.6"
3
+ version = "0.3.7"
4
4
  description = "Novelai Python Binding With Pydantic"
5
5
  authors = [
6
6
  { name = "sudoskys", email = "coldlando@hotmail.com" },
@@ -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, self.width, self.height)
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