Releases: LlmKira/novelai-python
pypi_0.5.3 Fix datetime error
What's Changed
Full Changelog: pypi_0.5.2...pypi_0.5.3
pypi_0.5.2 Add ImageVerifier for tool.image_metadata
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 ofImageVerifier.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
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
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
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
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
What's Changed
- Patch: 0.4.15 by @sudoskys in #72
- 🐛 fix(generate_image): update ucPreset handling and imports by @sudoskys in #73
Full Changelog: pypi_0.4.15...pypi_0.4.16
0.4.15 Update model hash list, better ucPreset
What's Changed
Full Changelog: pypi_0.4.14...pypi_0.4.15
0.4.14 Support Variety+
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
ingenerate_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
What's Changed
Full Changelog: pypi_0.4.12...pypi_0.4.13
0.4.12 Director Tools
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
What's Changed
Full Changelog: pypi_0.4.10...pypi_0.4.11