QuadraMuse — Four artistic voices, one canvas.
What it does
Turn a single photo into a single composite artwork by reimagining different parts of the image in different art styles (cubist, modern abstract, impressionist, surrealist) and blending those parts together into one unified piece.
Quickstart (PowerShell)
- Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install dependencies
pip install -r requirements.txt- Set your Hugging Face API key (recommended) — do NOT hardcode keys in the script
$env:HF_API_KEY = "your_hf_api_key_here"- Run the tool
python .\try.py input.jpg output.png --max_calls 4Options
--max_calls(0-4): limit how many regions are sent to the remote stylization API. Default: 4.--randomize: choose regions randomly when--max_callsis less than the number of non-empty regions.--seed: optional deterministic seed for mask generation and random selection.
Notes
- Each stylized region makes an API request to the image-to-image model; watch your quota and costs.
- The script currently uses
huggingface_hub.InferenceClientfor remote image-to-image calls. If you want to run models locally, installtorchanddiffusersand adapt the code. - The script intentionally avoids caching so each run reflects the current input and parameters.
License
Use this code as you like for experimentation and prototyping.