Skip to content

Releases: LlmKira/novelai-python

pypi_0.7.4 Fix qualityToggle

05 Jan 01:45
8759efe
Compare
Choose a tag to compare

What's Changed

Full Changelog: pypi_0.7.3...pypi_0.7.4

pypi_0.7.3 fix generate_voice, better logger

04 Jan 12:41
904bf85
Compare
Choose a tag to compare

Break Change

try:
        voice_gen = VoiceGenerate.build(
            text=text,
-            voice_engine=VoiceSpeakerV1.Crina,  # VoiceSpeakerV2.Ligeia,
+            speaker=VoiceSpeakerV2.Ligeia,  # VoiceSpeakerV2.Ligeia,
        )
        result = await voice_gen.request(
            session=credential

What's Changed

  • 🎨 refactor(generate_voice): update speaker attributes and API usage by @sudoskys in #97

fix #96

Full Changelog: pypi_0.7.2...pypi_0.7.3

pypi_0.7.2 generate_image: Fine-grained control

03 Jan 08:00
52ab424
Compare
Choose a tag to compare

What's Changed

  • ✨ feat(generate_image): add mutual exclusion and quality modifier by @sudoskys in #95
GenerateImageInfer

    def set_mutual_exclusion(self, value: bool):
        """
        **Enable This will modify the negative prompt.**
        Default is False.

        Positive words and negative words are mutually exclusive, and conflicting negative words are deleted first.
        :param value: bool
        :return: self
        """
        self._mutual_exclusion = bool(value)
        return self

    def set_quality_modifier(self, value: bool):
        """
        **Enable This will modify the input prompt.**
        Default is True.

        Add Quality Modifier To Input.
        Whether to add the quality vocabulary used by the web application.
        :param value:
        :return:
        """
        self._quality_modifier = bool(value)
        return self

Full Changelog: pypi_0.7.1...pypi_0.7.2

pypi_0.7.1 Fix bug

02 Jan 16:34
03e15d0
Compare
Choose a tag to compare

BreakChange

  • remove qualitySuffix parameter and logic

What's Changed

  • Fix ucPreset
  • Fix quality suffix in mixed prompt
  • ✨ refactor: update logic by @sudoskys in #94

Issue report from #91 #92 @TimmekHW

Full Changelog: pypi_0.7.0...pypi_0.7.1

pypi_0.7.0 randomPrompt for scene

25 Dec 07:14
8e9fdaf
Compare
Choose a tag to compare

⚠️ BreakChange

What's Changed

  • 🔧 feat(tokenizer): add T5 model support and enhance tokenizer usage by @sudoskys in #87
  • feat: implement image metadata extraction and verification by @sudoskys in #89

Full Changelog: pypi_0.6.1...pypi_0.7.0

pypi_0.6.1 nai-diffusion-4-curated-preview

21 Dec 16:22
f9ab8dc
Compare
Choose a tag to compare

⚠️ BreakChange

- GenerateImageInfer.build(
+ GenerateImageInfer.build_generate(
+ GenerateImageInfer.build_img2img(
+ GenerateImageInfer.build_infill(
  • support nai-diffusion-4-curated-preview
  • remove nai-diffusion-1

What's Changed

Full Changelog: pypi_0.6.0...pypi_0.6.1

pypi_0.6.0 support nai-diffusion-4-curated-preview

21 Dec 15:58
741e0a2
Compare
Choose a tag to compare

⚠️ BreakChange

- GenerateImageInfer.build(
+ GenerateImageInfer.build_generate(
+ GenerateImageInfer.build_img2img(
+ GenerateImageInfer.build_infill(

What's Changed

Full Changelog: pypi_0.5.3...pypi_0.6.0

pypi_0.5.3 Fix datetime error

27 Sep 15:42
7a7d03b
Compare
Choose a tag to compare

What's Changed

  • ⬆️ feat: migrate from datetime to arrow for datetime handling by @sudoskys in #79

Full Changelog: pypi_0.5.2...pypi_0.5.3

pypi_0.5.2 Add ImageVerifier for tool.image_metadata

27 Sep 13:11
feeb058
Compare
Choose a tag to compare

What's Changed

  • (feat):Update Readme by @sudoskys in #77
  • (refactor): Add ImageVerifier for tool.image_metadata / add bch_utils by @sudoskys in #78

!! Breakchange

  • delete ImageMetadata.verify_image_is_novelai , use ImageVerifier.verify instead

Usage

from pathlib import Path

from novelai_python.tool.image_metadata import ImageMetadata, ImageVerifier

image = Path(__file__).parent.joinpath("sample-0316.png")
image_clear = ImageMetadata.reset_alpha(
    image=image
)

try:
    meta = ImageMetadata.load_image(image)
except ValueError:
    raise LookupError("Cant find a MetaData")

print(meta.Title)
print(f"Description: {meta.Description}")
print(f"Comment: {meta.Comment}")
print(f"Request Method: {meta.Comment.request_type}")
print(f"Used image model: {meta.used_model}")
# Verify if the image is from NovelAI
is_novelai, have_latent = ImageVerifier().verify(image=image)
print(f"Is NovelAI: {is_novelai}")
print(f"Have Latent: {have_latent}")

Full Changelog: pypi_0.5.1...pypi_0.5.2

pypi_0.5.1 Support llama3, new endpoint

26 Sep 12:28
7c71f0c
Compare
Choose a tag to compare

What's Changed

  • fix(0.5.1): add tokenizer.get_vocab() | Diff generation endpoint / text.novelai.net or api.novelai.net by @sudoskys in #76
  • (fix): If the model is a string, a cost calculation error will be raised by @sudoskys in #74
  • (feat): Novelai tokenizer re-implement || New LLM by @sudoskys in #75

Preset

image

Preset -> https://github.com/LlmKira/novelai-python/blob/main/src/novelai_python/sdk/ai/generate/_enum.py#L199

async def chat(prompt: str):
    try:
        model = TextLLMModel.ERATO  # llama3
        parameters = get_default_preset(model).parameters
        agent = LLM.build(
            prompt=prompt,
            model=model,
            parameters=None  # Auto Select or get from preset
        )
        result = await agent.request(session=login_credential)
    except APIError as e:
        raise Exception(f"Error: {e.message}")
    print(f"Result: \n{result.text}")
  

Full Changelog: pypi_0.5.0...pypi_0.5.1