Quick and dirty command line for Venice AI upscaling.
A command-line tool for upscaling and enhancing images using the Venice AI API. This tool provides a simple interface to access Venice AI's powerful image upscaling and enhancement capabilities.
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License - see the LICENSE file for details.
1. Download the latest release from the releases page
2. Extract the ZIP file
3. Create a .env
file in the same directory as the executable with your API key:
VENICE_API_KEY=your_api_key_here
4. Run venice-upscaler.exe
directly1. Clone this repository or download the source files 2. Install required dependencies:
bash
pip install -r requirements.txt
3. Create a .env
file in the project root with your API key:
VENICE_API_KEY=your_api_key_here
To build the Windows executable yourself:
1. Install the requirements:
bash
pip install -r requirements.txt
2. Create a .env
file in the project root with your API key:
VENICE_API_KEY=your_api_key_here
3. Run the build script:
bash
python build.py
4. The executable will be created in the build
directory along with necessary documentation
Note: Building requires Windows and Python 3.6 or higher. The build process will create a build
directory containing:
venice-upscaler.exe
: The compiled executableREADME.md
: Documentationrequirements.txt
: Python dependencies (for reference)The script uses environment variables for configuration:
VENICE_API_KEY
: Your Venice AI API key (required)bash
Basic upscaling (2x)
venice-upscaler.exe image.jpgCustom scale factor
venice-upscaler.exe -s 4 image.jpgEnable enhancement
venice-upscaler.exe -e image.jpgFull enhancement with custom parameters
venice-upscaler.exe -e -c 0.8 -p "gold" -r 0.5 image.jpg
bash
Basic upscaling (2x)
python upscale.py image.jpgCustom scale factor
python upscale.py -s 4 image.jpgEnable enhancement
python upscale.py -e image.jpgFull enhancement with custom parameters
python upscale.py -e -c 0.8 -p "gold" -r 0.5 image.jpg
| Option | Short | Description |
|--------|-------|-------------|
| --scale
| -s
| Scale factor (1.0, 2.0, or 4.0). Scale of 1.0 requires --enhance |
| --enhance
| -e
| Enable image enhancement during upscaling |
| --enhance-creativity
| -c
| Enhancement creativity level (0.0 to 1.0) |
| --enhance-prompt
| -p
| Text prompt for enhancement style |
| --replication
| -r
| Line and noise preservation level (0.0 to 1.0) |
| --verbose
| -v
| Enable verbose logging |
| --version
| | Show version information |
-c
): Controls how much the AI can modify the image-p
): Text description of desired style-r
): Controls preservation of original image detailsThe script outputs JSON responses for both success and failure cases:
Success example:
json
{
"success": true,
"output_path": "upscaled_image.jpg",
"scale_factor": 2.0,
"enhance": true,
"enhance_creativity": 0.8,
"enhance_prompt": "gold",
"replication": 0.5
}
Error example:
json
{
"success": false,
"error": "Error message here"
}
bash
2x upscale
venice-upscaler.exe image.jpg4x upscale
venice-upscaler.exe -s 4 image.jpg
bash
Enhance without upscaling
venice-upscaler.exe -s 1 -e image.jpgEnhance with gold style
venice-upscaler.exe -s 1 -e -p "gold" image.jpg
bash
Enhance with custom parameters
venice-upscaler.exe -e -c 0.8 -p "marble" -r 0.5 image.jpg4x upscale with enhancement
venice-upscaler.exe -s 4 -e -c 0.7 -p "angry" image.jpg
bash
Show detailed processing information
venice-upscaler.exe -v image.jpgVerbose with all options
venice-upscaler.exe -v -s 4 -e -c 0.7 -p "marble" image.jpg
The script handles various error conditions:
All errors are reported in JSON format with descriptive messages.
The script provides two levels of logging:
1. Standard (default): - Basic progress information - Error messages - Success confirmations
2. Verbose (-v
):
- Detailed API request information
- Image processing details
- Parameter validation
- Response headers
- Debug information
Common issues and solutions:
1. API Error: 401 Unauthorized
- Check your API key in the .env
file
- Ensure the .env
file is in the correct location
- Verify the API key is valid
2. File too large - The script will automatically resize large files - Check the logs for resizing information
3. Invalid dimensions - Ensure your image meets the minimum size requirement - Check the logs for dimension information
4. Enhancement not working
- Ensure you're using -e
flag
- For scale 1.0, enhancement is required
5. Executable not working
- Ensure you have the latest Visual C++ Redistributable installed
- Try running from command prompt to see error messages
- Check if your antivirus is blocking the executable
- Verify the .env
file exists and contains a valid API key
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details.