Name | nozyio JSON |
Version |
0.1.17
JSON |
| download |
home_page | None |
Summary | Node based workflow orchestration UI for python ML/AI computing |
upload_time | 2024-10-30 14:39:57 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# NozyIO
**Python AI / ML pipeline visualization tool.** Automatically discover your functions as pipeline nodes. Fastest way to demo your python program for customers to tweak and expand. Perfect for AI/ML engineers and designers to collaborate, turning ML components into UI nodes for easy tweaking.
It can also be used as a visual scripting tool for python.
demo: https://youtu.be/L_6kY-fhIcU
- **Automatically discover python functions as nodes** with parameters typing
- Visually pick input files, tune parameters, and preview any image input/output from the GUI
- Save pipeline graph as json and **switch between pipelines quickly**
- Export the pipeline graph as Python code
<img width="1723" alt="378056651-d6c5f930-cedc-426a-aaa8-11cdb92c6cd4-min" src="https://github.com/user-attachments/assets/be4cf1fc-7e71-4e35-91e8-5622a792cd93">
## Install
In your python project root:
`pip install nozyio`
To start the nozyio UI:
`nozyio`
## Usage
**Super easy node define (just write a function with typing) For example:**
```python
from PIL.Image import Image
def resize_image(
image: Image,
width: int = 512,
height: int = 768,
method: Literal["stretch", "fit", "crop"],
interpolation: str
) -> Image:
# ...some code here...
return image.resize((width, height), interp_method)
resize_image.NOZY_NODE_DEF = {
"node_title": "Resize Image",
}
```
👇This function will be rendered as below. You can see that all args default values are populated as the input box defaults
<img width="398" alt="Screenshot 2024-10-19 at 9 22 37 PM" src="https://github.com/user-attachments/assets/4be4c5ae-c2ab-429b-8830-89504bffeb2e">
**👇Export workflow to code, preview any image input/output**
<img width="1728" alt="378069723-64a69234-5532-43a4-b192-415317be6fcd-min" src="https://github.com/user-attachments/assets/b93e8de8-35aa-4144-a41d-10ede476a74d">
**👇Automatically scan your python functions as nodes with params typing**
<img width="400" alt="Screenshot 2024-10-19 at 2 50 02 PM" src="https://github.com/user-attachments/assets/b6a2bb36-9d0e-4940-99da-7d40918bbaf1">
**👇Double-click canvas to search any functions in your project and add nodes**
<img width="400" alt="Screenshot 2024-10-19 at 10 42 41 PM" src="https://github.com/user-attachments/assets/f18b4569-ee60-4385-ad95-3fe72a9e5f43">
### Node input types
Nozyio will automatically scan your python functions and convert them to nodes. You can define the input, output types by adding **type annotations** to the function parameters and return type. Params with no type annotation will become "any" type.
| Python Type | UI Element | HTML element |
| ----------------------- | ------------------ | ------------------------- |
| `int` | number input box | `<input type="number">` |
| `str` | text input box | `<textfield type="text">` |
| `Literal["abc", "xyz"]` | dropdown input box | `<select>` |
| `PIL.Image.Image` | image preview | `<img>` |
### Input widgets - file picker
You can also add custom **UI widgets** to the input parameters by adding a `widget` field to the input definition. In below example, we use `server_file_picker` widget to let user select an image file from the files on the server:
```python
from PIL import Image.Image
def load_image(image_path: str) -> Image.Image:
return Image.open(image_path)
load_image.NOZY_NODE_DEF = {
"node_title": "Load Image",
"description": "Load image from path",
"inputs": {
"image_path": {
"type": "filepath",
"widget": {
'type': 'server_file_picker',
'options': {
'extensions': ['.png', '.jpg', '.jpeg', '.bmp', '.tiff', '.webp']
}
},
"hide_handle": True,
"description": "Path to image"
}
},
"outputs": [{"name": "image", "type": "Image", "description": "Loaded image"}]
}
```
<img width="349" alt="Screenshot 2024-10-19 at 9 37 21 PM" src="https://github.com/user-attachments/assets/529bf77e-99c6-4ff8-8487-c383bf4d92c1">
<img width="908" alt="Screenshot 2024-10-29 at 2 05 35 AM" src="https://github.com/user-attachments/assets/7c1820df-0078-467d-b3f6-294fec6ffa14">
## Future Plans
- [ ] Visualize your python code to graph flow
- [ ] AI image nodes packages
## Screenshots
👇 Install community pacakges
<img width="935" alt="007 install-community-packages" src="https://github.com/user-attachments/assets/e09ccca0-45b3-46f6-af4f-b263091c5c14">
👇 Switch workflows quickly

## Development
install pip package in editable mode
`pip install -e .`
start nozyio server
`nozyio --allow-cors`
Start web dev server with hot reload
`cd nozyio/web && npm run dev`
Go to the web server url
### Build and publish to pypi
if you haven't installed twine:
`python -m pip install --upgrade twine`
if you haven't installed build:
`python -m pip install --upgrade build`
To build and publish to pypi:
`chmod +x build.sh`
`./build.sh`
## Credits
This project is inspired by ComfyUI. Lots of code are referenced from ComfyUI (https://github.com/comfyanonymous/ComfyUI) Sincerely thanks to the contributors of ComfyUI!
Raw data
{
"_id": null,
"home_page": null,
"name": "nozyio",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "oozzy <nozyio.hello@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/df/42/f2c42038633f197ea4bb35547c923eca61570f16cdd353ee135ff38f25c6/nozyio-0.1.17.tar.gz",
"platform": null,
"description": "# NozyIO\n\n**Python AI / ML pipeline visualization tool.** Automatically discover your functions as pipeline nodes. Fastest way to demo your python program for customers to tweak and expand. Perfect for AI/ML engineers and designers to collaborate, turning ML components into UI nodes for easy tweaking.\n\nIt can also be used as a visual scripting tool for python.\n\ndemo: https://youtu.be/L_6kY-fhIcU\n\n- **Automatically discover python functions as nodes** with parameters typing\n- Visually pick input files, tune parameters, and preview any image input/output from the GUI\n- Save pipeline graph as json and **switch between pipelines quickly**\n- Export the pipeline graph as Python code\n\n<img width=\"1723\" alt=\"378056651-d6c5f930-cedc-426a-aaa8-11cdb92c6cd4-min\" src=\"https://github.com/user-attachments/assets/be4cf1fc-7e71-4e35-91e8-5622a792cd93\">\n\n## Install\n\nIn your python project root:\n\n`pip install nozyio`\n\nTo start the nozyio UI:\n\n`nozyio`\n\n## Usage\n\n**Super easy node define (just write a function with typing) For example:**\n\n```python\nfrom PIL.Image import Image\n\ndef resize_image(\n image: Image,\n width: int = 512,\n height: int = 768,\n method: Literal[\"stretch\", \"fit\", \"crop\"],\n interpolation: str\n) -> Image:\n # ...some code here...\n return image.resize((width, height), interp_method)\n\nresize_image.NOZY_NODE_DEF = {\n \"node_title\": \"Resize Image\",\n}\n\n```\n\n\ud83d\udc47This function will be rendered as below. You can see that all args default values are populated as the input box defaults\n\n<img width=\"398\" alt=\"Screenshot 2024-10-19 at 9 22 37 PM\" src=\"https://github.com/user-attachments/assets/4be4c5ae-c2ab-429b-8830-89504bffeb2e\">\n\n**\ud83d\udc47Export workflow to code, preview any image input/output**\n\n<img width=\"1728\" alt=\"378069723-64a69234-5532-43a4-b192-415317be6fcd-min\" src=\"https://github.com/user-attachments/assets/b93e8de8-35aa-4144-a41d-10ede476a74d\">\n\n**\ud83d\udc47Automatically scan your python functions as nodes with params typing**\n\n<img width=\"400\" alt=\"Screenshot 2024-10-19 at 2 50 02 PM\" src=\"https://github.com/user-attachments/assets/b6a2bb36-9d0e-4940-99da-7d40918bbaf1\">\n\n**\ud83d\udc47Double-click canvas to search any functions in your project and add nodes**\n\n<img width=\"400\" alt=\"Screenshot 2024-10-19 at 10 42 41 PM\" src=\"https://github.com/user-attachments/assets/f18b4569-ee60-4385-ad95-3fe72a9e5f43\">\n\n### Node input types\n\nNozyio will automatically scan your python functions and convert them to nodes. You can define the input, output types by adding **type annotations** to the function parameters and return type. Params with no type annotation will become \"any\" type.\n\n| Python Type | UI Element | HTML element |\n| ----------------------- | ------------------ | ------------------------- |\n| `int` | number input box | `<input type=\"number\">` |\n| `str` | text input box | `<textfield type=\"text\">` |\n| `Literal[\"abc\", \"xyz\"]` | dropdown input box | `<select>` |\n| `PIL.Image.Image` | image preview | `<img>` |\n\n### Input widgets - file picker\n\nYou can also add custom **UI widgets** to the input parameters by adding a `widget` field to the input definition. In below example, we use `server_file_picker` widget to let user select an image file from the files on the server:\n\n```python\nfrom PIL import Image.Image\ndef load_image(image_path: str) -> Image.Image:\n return Image.open(image_path)\nload_image.NOZY_NODE_DEF = {\n \"node_title\": \"Load Image\",\n \"description\": \"Load image from path\",\n \"inputs\": {\n \"image_path\": {\n \"type\": \"filepath\",\n \"widget\": {\n 'type': 'server_file_picker',\n 'options': {\n 'extensions': ['.png', '.jpg', '.jpeg', '.bmp', '.tiff', '.webp']\n }\n },\n \"hide_handle\": True,\n \"description\": \"Path to image\"\n }\n },\n \"outputs\": [{\"name\": \"image\", \"type\": \"Image\", \"description\": \"Loaded image\"}]\n}\n```\n\n<img width=\"349\" alt=\"Screenshot 2024-10-19 at 9 37 21 PM\" src=\"https://github.com/user-attachments/assets/529bf77e-99c6-4ff8-8487-c383bf4d92c1\">\n\n<img width=\"908\" alt=\"Screenshot 2024-10-29 at 2 05 35 AM\" src=\"https://github.com/user-attachments/assets/7c1820df-0078-467d-b3f6-294fec6ffa14\">\n\n## Future Plans\n\n- [ ] Visualize your python code to graph flow\n- [ ] AI image nodes packages\n\n## Screenshots\n\n\ud83d\udc47 Install community pacakges\n\n<img width=\"935\" alt=\"007 install-community-packages\" src=\"https://github.com/user-attachments/assets/e09ccca0-45b3-46f6-af4f-b263091c5c14\">\n\n\ud83d\udc47 Switch workflows quickly\n\n\n\n\n## Development\n\ninstall pip package in editable mode\n\n`pip install -e .`\n\nstart nozyio server\n\n`nozyio --allow-cors`\n\nStart web dev server with hot reload\n\n`cd nozyio/web && npm run dev`\n\nGo to the web server url\n\n### Build and publish to pypi\n\nif you haven't installed twine:\n`python -m pip install --upgrade twine`\nif you haven't installed build:\n`python -m pip install --upgrade build`\n\nTo build and publish to pypi:\n\n`chmod +x build.sh`\n\n`./build.sh`\n\n## Credits\n\nThis project is inspired by ComfyUI. Lots of code are referenced from ComfyUI (https://github.com/comfyanonymous/ComfyUI) Sincerely thanks to the contributors of ComfyUI!\n",
"bugtrack_url": null,
"license": null,
"summary": "Node based workflow orchestration UI for python ML/AI computing",
"version": "0.1.17",
"project_urls": {
"Repository": "https://github.com/oozzy77/nozyio"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "026342360759125e8b50916b35deb5584a95097723f3c2f13e45bae352b0ecfa",
"md5": "46c90d69600f6b4c6ebc561f63942ef1",
"sha256": "e1df22272038fb5ec284218afc33702c08bb648339787d8f5f2595e6923943f0"
},
"downloads": -1,
"filename": "nozyio-0.1.17-py3-none-any.whl",
"has_sig": false,
"md5_digest": "46c90d69600f6b4c6ebc561f63942ef1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6382126,
"upload_time": "2024-10-30T14:39:51",
"upload_time_iso_8601": "2024-10-30T14:39:51.823039Z",
"url": "https://files.pythonhosted.org/packages/02/63/42360759125e8b50916b35deb5584a95097723f3c2f13e45bae352b0ecfa/nozyio-0.1.17-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "df42f2c42038633f197ea4bb35547c923eca61570f16cdd353ee135ff38f25c6",
"md5": "93eb42c57b973eb70d0272789e46affc",
"sha256": "fe33cba96e65a112c8c6eba39b2a3a9f5a2cb8e359a4be7cfe0ce7289dccdf71"
},
"downloads": -1,
"filename": "nozyio-0.1.17.tar.gz",
"has_sig": false,
"md5_digest": "93eb42c57b973eb70d0272789e46affc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6351693,
"upload_time": "2024-10-30T14:39:57",
"upload_time_iso_8601": "2024-10-30T14:39:57.208022Z",
"url": "https://files.pythonhosted.org/packages/df/42/f2c42038633f197ea4bb35547c923eca61570f16cdd353ee135ff38f25c6/nozyio-0.1.17.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-30 14:39:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oozzy77",
"github_project": "nozyio",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nozyio"
}