Python SDK for RockAI.online
Project description
Setup
Python SDK for inference and training for RockAI
# Install package using pip
pip install rockai-cli-app
from rockai_cli_app import Client
import asyncio
my_client = Client()
# Function to run the asynchronous function and print the result
async def main():
result = await my_client.run_async(
version="001bb81139b01780380407b4106ac681df46108e002eafbeb9ccb2d8faca42e1",
input={
"width": 1024,
"height": 1024,
"prompt": "a cartoon of a IRONMAN fighting with HULK, wall painting",
"guidance_scale": 3,
"negative_prompt": "(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, NSFW",
"num_inference_steps": 15,
}
)
print("Result:", result)
# Run the main function using asyncio.run
if __name__ == "__main__":
asyncio.run(main())
# clean docker space
docker system prune --all --force --volumes
Development
- Python version 3.9.19
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rockai-0.1.30.tar.gz
(29.7 kB
view details)
Built Distribution
rockai-0.1.30-py3-none-any.whl
(35.3 kB
view details)
File details
Details for the file rockai-0.1.30.tar.gz
.
File metadata
- Download URL: rockai-0.1.30.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08754d73ca7529a4fe06b62e6b0cb78f21ababf26760d3681f9d5d47b37019e3 |
|
MD5 | a909eebaf039d25939bd377971512f3c |
|
BLAKE2b-256 | a277b55e27a8beb1c0c75ca08ef3293323ba226d6bef9483b9e632c664124cbf |
File details
Details for the file rockai-0.1.30-py3-none-any.whl
.
File metadata
- Download URL: rockai-0.1.30-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c8e385f12b3f83acff586cd329458fb4a241b85496ed7a70f50f88c452a229 |
|
MD5 | a45ea52685feaa7f07b9bd44970f5821 |
|
BLAKE2b-256 | 3eb1d38644271fc71fc37c312eb6035273511300b45ba347b35564c257909bad |