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.15.tar.gz
(25.7 kB
view details)
Built Distribution
rockai-0.1.15-py3-none-any.whl
(30.6 kB
view details)
File details
Details for the file rockai-0.1.15.tar.gz
.
File metadata
- Download URL: rockai-0.1.15.tar.gz
- Upload date:
- Size: 25.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 | 6fe9aa50ee54b1f45e3ef92834bd904db78833e1dda79896afb1cd5ff3a73802 |
|
MD5 | 858d8fbbf2bef1a4521f6858a08508d8 |
|
BLAKE2b-256 | 209218b6214139b3d4022fd216c553eb93df768761cfab1581c8b0b09bf92000 |
File details
Details for the file rockai-0.1.15-py3-none-any.whl
.
File metadata
- Download URL: rockai-0.1.15-py3-none-any.whl
- Upload date:
- Size: 30.6 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 | 6e4b6e409f50825ce984857813dbbad87d9660c5c4c8e39b840ad95e5385c7c7 |
|
MD5 | 02da44af000d77eaeaf3633fb7ca0423 |
|
BLAKE2b-256 | b0bf58cbd43d7169a3f96e7a354755f9c656f7c8bb8c5b08ed99bf5e0d457adf |