novelai-python 0.4.15__tar.gz → 0.4.16__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.4.15 → novelai_python-0.4.16}/PKG-INFO +1 -1
- {novelai_python-0.4.15 → novelai_python-0.4.16}/pyproject.toml +1 -1
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_image/__init__.py +13 -7
- {novelai_python-0.4.15 → novelai_python-0.4.16}/LICENSE +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/NOTICE.MD +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/README.md +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_exceptions.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_image.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_stream.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_voice.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/upscale.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/schema.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/information.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/login.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/subscription.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/credential/ApiToken.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/credential/JwtToken.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/credential/UserAuth.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/credential/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/credential/_base.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/LICENSE +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/_const.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/_cost.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/_enum.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/augment_image/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/augment_image/_enum.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/_const.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/_enum.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/_preset.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_image/suggest_tags.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_stream.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_voice/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_voice/_enum.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/upscale.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/schema.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/user/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/user/information.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/user/login.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/user/subscription.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/server.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/NOTICE.MD +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/bpe_simple_vocab_16e6.txt.gz +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/gpt2-genji_tokenizer.json +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/gpt2_tokenizer.json +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/nerdstash_v1.model +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/nerdstash_v2.model +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/novelai.model +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/novelai_v2.model +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/pile_tokenizer.json +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/simple_tokenizer.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/image_metadata/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/image_metadata/lsb_extractor.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/image_metadata/lsb_injector.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/paint_mask/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/tag.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/tag_character.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/tag_nsfw.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/utils/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/utils/encode.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/utils/useful.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/__init__.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_generate_voice.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_random_prompt.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_server.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_server_run.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_upscale.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_user_information.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_user_login.py +0 -0
- {novelai_python-0.4.15 → novelai_python-0.4.16}/tests/test_user_subscription.py +0 -0
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_image/__init__.py
RENAMED
|
@@ -138,8 +138,8 @@ class Params(BaseModel):
|
|
|
138
138
|
# TODO: find out the usage
|
|
139
139
|
steps: Optional[int] = Field(23, ge=1, le=50)
|
|
140
140
|
"""Steps"""
|
|
141
|
-
ucPreset: Optional[UCPreset] = 0
|
|
142
|
-
"""The Negative Prompt Preset"""
|
|
141
|
+
ucPreset: Optional[Union[UCPreset, int]] = Field(None, ge=0)
|
|
142
|
+
"""The Negative Prompt Preset, Bigger or equal to 0"""
|
|
143
143
|
uncond_scale: Optional[float] = Field(1.0, ge=0, le=1.5, multiple_of=0.05)
|
|
144
144
|
"""Undesired Content Strength"""
|
|
145
145
|
width: Optional[int] = Field(832, ge=64, le=49152)
|
|
@@ -336,12 +336,18 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
336
336
|
:param args: Any
|
|
337
337
|
:return: None
|
|
338
338
|
"""
|
|
339
|
+
# Must be a string
|
|
339
340
|
if self.parameters.negative_prompt is None:
|
|
340
341
|
self.parameters.negative_prompt = ""
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
|
|
343
|
+
# Add negative prompt based on ucPreset
|
|
344
|
+
if self.parameters.ucPreset is not None:
|
|
345
|
+
default_negative_prompt = get_default_uc_preset(self.model, self.parameters.ucPreset)
|
|
346
|
+
self.parameters.negative_prompt = ", ".join(
|
|
347
|
+
filter(None, [default_negative_prompt, self.parameters.negative_prompt])
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
# Add quality prompt
|
|
345
351
|
if self.parameters.qualityToggle:
|
|
346
352
|
self.input += ", best quality, amazing quality, very aesthetic, absurdres"
|
|
347
353
|
|
|
@@ -414,7 +420,7 @@ class GenerateImageInfer(ApiBaseModel):
|
|
|
414
420
|
model: Union[Model, str] = "nai-diffusion-3",
|
|
415
421
|
action: Union[Action, str] = 'generate',
|
|
416
422
|
negative_prompt: str = "",
|
|
417
|
-
ucPreset: Union[UCPreset, int] = UCPreset.TYPE0,
|
|
423
|
+
ucPreset: Optional[Union[UCPreset, int]] = UCPreset.TYPE0,
|
|
418
424
|
steps: int = 28,
|
|
419
425
|
seed: int = None,
|
|
420
426
|
scale: float = 5.0,
|
|
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.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_image.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_stream.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/ai/generate_voice.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/_response/user/information.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/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.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/augment_image/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/augment_image/_enum.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/_const.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate/_preset.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_stream.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_voice/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/sdk/ai/generate_voice/_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.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/gpt2_tokenizer.json
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/nerdstash_v1.model
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/nerdstash_v2.model
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/novelai_v2.model
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/pile_tokenizer.json
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tokenizer/simple_tokenizer.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/image_metadata/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/paint_mask/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/__init__.py
RENAMED
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/random_prompt/tag.py
RENAMED
|
File without changes
|
|
File without changes
|
{novelai_python-0.4.15 → novelai_python-0.4.16}/src/novelai_python/tool/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|