example directory¶
Requirements¶
Requires the “NAI_USERNAME” and “NAI_PASSWORD” values provided via environment variables. They can be provided through a .env file at the root of the project.
The “NAI_PROXY” environment variable is also supported to inject a proxy address.
Usage¶
If you have the novelai-api package installed via pip :
python example/<filename>
If you don’t have the novelai-api package installed, or you’re actively developing on the project :
poetry run python example/<filename>
Remember to run poetry install
before running the example, if not already done.
Content¶
download_modules.py¶
Example of how to download and decrypt modules from the provided account
download_presets.py¶
Example of how to download and decompress shelves from the provided account
download_shelves.py¶
Example of how to download and decompress shelves from the provided account
download_stories_and_content.py¶
Example of how to download and decrypt stories from the provided account
generate_controlnet_masks.py¶
generate_image.py¶
generate_image_test_samplers.py¶
generate_image_with_controlnet.py¶
generate_image_with_img2img.py¶
generate_text.py¶
generate_voice.py¶
login.py¶
Example of how to login on the provided account
login_with_proxy.py¶
Example of how to login on the provided account with a proxy
upscale_image.py¶
image_size
to change it