{"id":22432682,"url":"https://github.com/1999azzar/image-processing-toolkit","last_synced_at":"2025-10-06T21:54:45.230Z","repository":{"id":211797025,"uuid":"729964481","full_name":"1999AZZAR/Image-Processing-Toolkit","owner":"1999AZZAR","description":"The Image Processing Toolkit (IPT) is a Python project using the Stability AI API for effortless image creation, modification, and upscaling. Generate imaginative images from text, transform existing ones, and enhance resolution seamlessly. Simplify your image processing tasks with IPT!","archived":false,"fork":false,"pushed_at":"2024-05-21T11:38:25.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T07:48:23.113Z","etag":null,"topics":["image-generation","image-processing","image-to-image","stability-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-10T22:04:25.000Z","updated_at":"2024-05-21T11:38:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e41e282-1f7d-4687-9bf9-49a15b7404aa","html_url":"https://github.com/1999AZZAR/Image-Processing-Toolkit","commit_stats":null,"previous_names":["1999azzar/image-processing-toolkit-ipt-","1999azzar/image-processing-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1999AZZAR/Image-Processing-Toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2FImage-Processing-Toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2FImage-Processing-Toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2FImage-Processing-Toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2FImage-Processing-Toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/Image-Processing-Toolkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2FImage-Processing-Toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278686638,"owners_count":26028325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-generation","image-processing","image-to-image","stability-ai"],"created_at":"2024-12-05T22:12:33.319Z","updated_at":"2025-10-06T21:54:45.198Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Processing Toolkit (IPT)\n\n## Overview\n\nThe Image Processing Toolkit (IPT) is a versatile project featuring five Python scripts that leverage the Stability AI API. Each script is tailored for specific image-related tasks, including image creation, modification through textual prompts, high-quality upscaling, and interacting with the Stability AI API to check account balance and list available engines.\n\n### 1. Text-to-Image Generation\n\n#### File: `text2img.py`\n\nThis script generates vibrant and unique images based on textual prompts. Here's a more detailed breakdown:\n\n- **API Interaction:**\n  - Utilizes the Stability AI API for text-to-image generation.\n  - The `imagine` function initiates a POST request, incorporating parameters such as engine ID, text prompts, and image dimensions.\n\n- **Text Prompts:**\n  - Three carefully crafted text prompts guide the generation process.\n  - Positive and negative aspects are strategically weighted to influence the AI's creative process.\n\n- **Output Handling:**\n  - Images are saved in the `./out` directory with filenames reflecting the seed values.\n  - The script automatically creates the `./out` directory if it doesn't exist.\n\n- **Potential Use Cases:**\n  - Ideal for generating artistic and imaginative images based on specific textual descriptions.\n\n### 2. Image-to-Image Transformation\n\n#### File: `img2img.py`\n\nThis script transforms existing images based on textual prompts. Let's delve deeper:\n\n- **API Interaction:**\n  - Leverages the Stability AI API for image-to-image transformation.\n  - The `reimagine` function orchestrates a POST request, incorporating the initial image and parameters for style, text prompts, and transformation steps.\n\n- **Text Prompts:**\n  - The same three text prompts, now applied to the initial image, influence the transformation process.\n\n- **Output Handling:**\n  - Resulting images are stored in the `./out` directory, preserving seed-based filenames.\n\n- **Potential Use Cases:**\n  - Useful for altering existing images according to specific themes or artistic styles.\n\n### 3. Image Upscaling\n\n#### File: `img2ups.py`\n\nThis script enhances image resolution through advanced upscaling techniques. Let's explore its features:\n\n- **API Interaction:**\n  - Employs the Stability AI API, specifically utilizing the ESRGAN engine for image upscaling.\n  - The `image_upscaling` function orchestrates a POST request, incorporating the target image and desired height.\n\n- **Output Handling:**\n  - The upscaled image is saved in the `./out` directory as `img2ups.png`.\n\n### 4. Check Account Balance\n\n#### File: `check_balance.py`\n\nThis script interacts with the Stability AI API to check the account balance. Here are the key features:\n\n- **API Interaction:**\n  - Sends a GET request to the `/v1/user/balance` endpoint to retrieve the account balance.\n\n- **Output Handling:**\n  - The response payload is printed, providing information about the account balance.\n\n### 5. List Available Engines\n\n#### File: `list_engines.py`\n\nThis script interacts with the Stability AI API to list available engines. Let's explore its features:\n\n- **API Interaction:**\n  - Sends a GET request to the `/v1/engines/list` endpoint to retrieve the list of available engines.\n\n- **Output Handling:**\n  - The response payload is printed, providing information about the available engines.\n\n## Getting Started\n\n### 1. Obtain the Stability API Key\n\nBefore running the scripts, ensure you have a Stability API key. If you don't have one, you can obtain it by visiting [https://platform.stability.ai/account/keys](https://platform.stability.ai/account/keys).\n\n### 2. Create the `.env` File\n\nCreate a file named `.env` in the root directory of the project. Add the following content to the `.env` file:\n\n```env\nAPI_HOST=https://api.stability.ai\nSTABILITY_API_KEY=YOUR_STABILITY_API_KEY\n```\n\nReplace `YOUR_STABILITY_API_KEY` with the API key you obtained from the Stability AI platform.\n\n## Usage\n\n1. **Dependencies Installation:**\n   - Ensure you have the required dependencies installed. You can install them using:\n\n     ```bash\n     pip install -r requirements.txt\n     ```\n\n2. **Script Execution:**\n   - Run each script individually based on your requirements.\n     Example:\n\n     ```bash\n     python check_balance.py\n     ```\n\n## Important Considerations\n\n- **Security:**\n  - Handle API keys securely. Keep the `.env` file confidential to prevent unauthorized access.\n\n- **Output Directory:**\n  - The `./out` directory is automatically created to store generated and modified images. Ensure the script has write permissions in this directory.\n\n- **Customization:**\n  - Feel free to customize the scripts or integrate them into larger workflows based on your project's needs.\n\n---\n\nThe Image Processing Toolkit (IPT) is designed to simplify image-related tasks with ease. If you have any specific requirements or additional details to include, please let me know!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fimage-processing-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fimage-processing-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fimage-processing-toolkit/lists"}