Skip to content

Releases: LlmKira/novelai-python

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 instead of ImageVerifier.verify

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

pypi_0.5.0 Support llama3, fix LLM interface

26 Sep 10:50
9cbed20
Compare
Choose a tag to compare

What's Changed

  • (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.4.16...pypi_0.5.0

0.4.16 Patch(0.4.15)-Update model hash list, better ucPreset

23 Sep 15:56
5d0135d
Compare
Choose a tag to compare

What's Changed

Full Changelog: pypi_0.4.15...pypi_0.4.16

0.4.15 Update model hash list, better ucPreset

23 Sep 15:36
00e0e03
Compare
Choose a tag to compare

What's Changed

  • (feat): Update model hash list, and smarter preset selection strategy by @sudoskys in #71

Full Changelog: pypi_0.4.14...pypi_0.4.15

0.4.14 Support Variety+

31 Aug 03:20
cae6c9d
Compare
Choose a tag to compare

generate_image.py#L32-L44

        agent = GenerateImageInfer.build(
            prompt=prompt,
            model=Model.NAI_DIFFUSION_3,
            action=Action.GENERATE,
            sampler=Sampler.K_DPMPP_2M,
            qualityToggle=True,
            decrisp_mode=False,
            variety_boost=True
        )

What's Changed

  • Improvement: Added settings related to the Variety Boost in generate_image.Class.build and optimized default settings. by @sudoskys in #69

Update from

https://blog.novelai.net/summer-sampler-update-en-3a34eb32b613

Full Changelog: pypi_0.4.13...pypi_0.4.14

0.4.13 calculate anlas for augment-image

09 Aug 05:05
72b3734
Compare
Choose a tag to compare

What's Changed

  • ✨ feat(augment_image): implement cost calculation for BG_REMOVAL by @sudoskys in #68

Full Changelog: pypi_0.4.12...pypi_0.4.13

0.4.12 Director Tools

02 Aug 08:41
2ee04f6
Compare
Choose a tag to compare

New

  • Added new features
  • Optimized the Session management system (may cause problems, please note)

augment-image Demo

https://github.com/LlmKira/novelai-python/blob/main/playground/augment-image.py#L10-L50

What's Changed

  • ✨ feat: add .nerve.toml configuration file for English language settings by @sudoskys in #63
  • ✨ fix: Correct data extraction error handling in ImageMetadata by @sudoskys in #65
  • feat: Director Tools / imagetools by @sudoskys in #67

Full Changelog: pypi_0.4.11...pypi_0.4.12

pypi_0.4.11 Daily maintenance

03 Jun 03:15
01d3218
Compare
Choose a tag to compare

What's Changed

  • 🐛 fix: Fix issue with uncond_scale comparison in generate_image module by @sudoskys in #62

Full Changelog: pypi_0.4.10...pypi_0.4.11