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.45.tar.gz
(27.6 kB
view details)
Built Distribution
rockai-0.1.45-py3-none-any.whl
(33.2 kB
view details)
File details
Details for the file rockai-0.1.45.tar.gz
.
File metadata
- Download URL: rockai-0.1.45.tar.gz
- Upload date:
- Size: 27.6 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 | b2091fefd194388251b0ba24b1955b462796a9bda58c289ceaf23230d61da67e |
|
MD5 | 099385cc01a9968a0d60f391bcd72e8f |
|
BLAKE2b-256 | 99e4ec6067cefc7a6de27eb4630d2597d7e93f8a7dba94e6709f1ddf0b3c4b36 |
File details
Details for the file rockai-0.1.45-py3-none-any.whl
.
File metadata
- Download URL: rockai-0.1.45-py3-none-any.whl
- Upload date:
- Size: 33.2 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 | 3b7ea78a87e15aef1aea5bfa00188a1dbca6ffd6801a99dfc7109be44ca1dfd3 |
|
MD5 | 3d42d5cd1a7f44a7cefc0f13f8608858 |
|
BLAKE2b-256 | 46827257ad17bc663ebec45950b27dc13a7780b01448b9d8998661f1001ad763 |