novelai-python 0.7.3__tar.gz → 0.7.4__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.7.3 → novelai_python-0.7.4}/PKG-INFO +1 -2
- {novelai_python-0.7.3 → novelai_python-0.7.4}/README.md +0 -1
- {novelai_python-0.7.3 → novelai_python-0.7.4}/pyproject.toml +1 -1
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_image/__init__.py +12 -25
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_voice/__init__.py +1 -1
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_voice/_enum.py +12 -12
- {novelai_python-0.7.3 → novelai_python-0.7.4}/LICENSE +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/NOTICE.MD +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_enum.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_exceptions.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_image.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_stream.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_voice.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/upscale.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/schema.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/user/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/user/information.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/user/login.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/user/subscription.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/credential/ApiToken.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/credential/JwtToken.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/credential/UserAuth.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/credential/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/credential/_base.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/LICENSE +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/_const.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/_cost.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/_enum.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/augment_image/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/augment_image/_enum.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/_const.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/_enum.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/_schema.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/themes.json +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_image/schema.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_image/suggest_tags.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_stream.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/upscale.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/schema.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/user/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/user/information.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/user/login.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/user/subscription.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/server.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/clip_simple_tokenizer.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/nerdstash_v1.model +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/nerdstash_v2.model +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/novelai.model +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/novelai_v2.model +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/bch_utils.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/lsb_extractor.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/lsb_injector.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/paint_mask/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/generate_scene_composition.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/generate_scene_tags.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/generate_tags.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/utils/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/utils/encode.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/utils/useful.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/__init__.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_generate_voice.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_random_prompt.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_server.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_server_run.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_tokenizer.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_upscale.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_user_information.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/tests/test_user_login.py +0 -0
- {novelai_python-0.7.3 → novelai_python-0.7.4}/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.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: NovelAI Python Binding With Pydantic
|
|
5
5
|
Author-Email: sudoskys <coldlando@hotmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -102,7 +102,6 @@ async def main():
|
|
|
102
102
|
sampler=Sampler.K_EULER_ANCESTRAL,
|
|
103
103
|
ucPreset=UCPreset.TYPE0,
|
|
104
104
|
# Recommended, using preset negative_prompt depends on selected model
|
|
105
|
-
qualitySuffix=True,
|
|
106
105
|
qualityToggle=True,
|
|
107
106
|
decrisp_mode=False,
|
|
108
107
|
variety_boost=True,
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_image/__init__.py
RENAMED
|
@@ -344,10 +344,18 @@ class Params(BaseModel):
|
|
|
344
344
|
|
|
345
345
|
class GenerateImageInfer(ApiBaseModel):
|
|
346
346
|
_endpoint: str = PrivateAttr("https://image.novelai.net")
|
|
347
|
+
"""Endpoint"""
|
|
348
|
+
|
|
349
|
+
@property
|
|
350
|
+
def endpoint(self):
|
|
351
|
+
return self._endpoint
|
|
352
|
+
|
|
353
|
+
@endpoint.setter
|
|
354
|
+
def endpoint(self, value):
|
|
355
|
+
self._endpoint = value
|
|
356
|
+
|
|
347
357
|
_mutual_exclusion: bool = PrivateAttr(False)
|
|
348
358
|
"""Positive words and negative words are mutually exclusive, and conflicting negative words are deleted first."""
|
|
349
|
-
_quality_modifier: bool = PrivateAttr(True)
|
|
350
|
-
"""Add Quality Modifier To Input"""
|
|
351
359
|
|
|
352
360
|
def set_mutual_exclusion(self, value: bool):
|
|
353
361
|
"""
|
|
@@ -361,27 +369,6 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
361
369
|
self._mutual_exclusion = bool(value)
|
|
362
370
|
return self
|
|
363
371
|
|
|
364
|
-
def set_quality_modifier(self, value: bool):
|
|
365
|
-
"""
|
|
366
|
-
**Enable This will modify the input prompt.**
|
|
367
|
-
Default is True.
|
|
368
|
-
|
|
369
|
-
Add Quality Modifier To Input.
|
|
370
|
-
Whether to add the quality vocabulary used by the web application.
|
|
371
|
-
:param value:
|
|
372
|
-
:return:
|
|
373
|
-
"""
|
|
374
|
-
self._quality_modifier = bool(value)
|
|
375
|
-
return self
|
|
376
|
-
|
|
377
|
-
@property
|
|
378
|
-
def endpoint(self):
|
|
379
|
-
return self._endpoint
|
|
380
|
-
|
|
381
|
-
@endpoint.setter
|
|
382
|
-
def endpoint(self, value):
|
|
383
|
-
self._endpoint = value
|
|
384
|
-
|
|
385
372
|
action: Union[str, Action] = Field(Action.GENERATE, description="Mode for img generate")
|
|
386
373
|
input: str = "1girl, best quality, amazing quality, very aesthetic, absurdres"
|
|
387
374
|
model: ModelTypeAlias = "nai-diffusion-3"
|
|
@@ -467,8 +454,8 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
467
454
|
)
|
|
468
455
|
return _prompt
|
|
469
456
|
|
|
470
|
-
if self.
|
|
471
|
-
logger.trace("Enhancing input with
|
|
457
|
+
if self.parameters.qualityToggle:
|
|
458
|
+
logger.trace("Enhancing input with qualityToggle, will modify input prompt.")
|
|
472
459
|
self.input = enhance_message(self.input)
|
|
473
460
|
|
|
474
461
|
if self._mutual_exclusion:
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_voice/_enum.py
RENAMED
|
@@ -7,30 +7,30 @@ class Speaker(BaseModel):
|
|
|
7
7
|
"""
|
|
8
8
|
Speaker for /ai/generated_voice
|
|
9
9
|
"""
|
|
10
|
-
|
|
10
|
+
sid: int = -1
|
|
11
11
|
seed: str = "kurumuz12"
|
|
12
12
|
name: str
|
|
13
13
|
category: str
|
|
14
14
|
|
|
15
15
|
@property
|
|
16
16
|
def version(self):
|
|
17
|
-
return "v2" if self.
|
|
17
|
+
return "v2" if self.sid == -1 else "v1"
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class VoiceSpeakerV1(Enum):
|
|
21
21
|
"""
|
|
22
22
|
Speaker for /ai/generated_voice
|
|
23
23
|
"""
|
|
24
|
-
Cyllene = Speaker(
|
|
25
|
-
Leucosia = Speaker(
|
|
26
|
-
Crina = Speaker(
|
|
27
|
-
Hespe = Speaker(
|
|
28
|
-
Ida = Speaker(
|
|
29
|
-
Alseid = Speaker(
|
|
30
|
-
Daphnis = Speaker(
|
|
31
|
-
Echo = Speaker(
|
|
32
|
-
Thel = Speaker(
|
|
33
|
-
Nomios = Speaker(
|
|
24
|
+
Cyllene = Speaker(sid=17, name="Cyllene", category="female")
|
|
25
|
+
Leucosia = Speaker(sid=95, name="Leucosia", category="female")
|
|
26
|
+
Crina = Speaker(sid=44, name="Crina", category="female")
|
|
27
|
+
Hespe = Speaker(sid=80, name="Hespe", category="female")
|
|
28
|
+
Ida = Speaker(sid=106, name="Ida", category="female")
|
|
29
|
+
Alseid = Speaker(sid=6, name="Alseid", category="male")
|
|
30
|
+
Daphnis = Speaker(sid=10, name="Daphnis", category="male")
|
|
31
|
+
Echo = Speaker(sid=16, name="Echo", category="male")
|
|
32
|
+
Thel = Speaker(sid=41, name="Thel", category="male")
|
|
33
|
+
Nomios = Speaker(sid=77, name="Nomios", category="male")
|
|
34
34
|
# SeedInput = Speaker(sid=-1, name="Seed Input", category="custom")
|
|
35
35
|
|
|
36
36
|
|
|
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.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_image.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_stream.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/ai/generate_voice.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/_response/user/information.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/augment_image/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/augment_image/_enum.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate/themes.json
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/sdk/ai/generate_image/schema.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
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/clip_simple_tokenizer.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/nerdstash_v1.model
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tokenizer/nerdstash_v2.model
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/bch_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/image_metadata/lsb_injector.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/paint_mask/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.7.3 → novelai_python-0.7.4}/src/novelai_python/tool/random_prompt/generate_tags.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
|
|
File without changes
|
|
File without changes
|