TiinyPaint: create and edit images with Qwen-Image 2.1, right in your browser
Built with Tiiny
I built TiinyPaint, a small web app for creating and editing images with Qwen-Image 2.1 on the Tiiny.
There's nothing to install and no backend: download the repo, double-click web/index.html, then enter your Tiiny's address and API key. It runs in Chrome or Edge and talks directly to the Tiiny API, over USB or Wlan0. Your key stays in your browser.
What it does
Create and edit with up to 10 reference images
Follow each render in an animated graph, from your prompt through the model to the image
Preview during diffusion: Off, 1/8, 1/4, 1/2 or every step. The preview stays blurred while rendering, and hovering shows the decoded step. Stop really does stop the NPU.
Enhance your prompt with PE-I2I, PE-T2I or another installed LLM, then review and edit the result before rendering
Manage models: load and unload from the app, with a check against the NPU's real memory
Edit locally: masks, lasso, clone stamp, crop and canvas extension. In my test of localized diffusion, pixels outside the masked zone stayed identical.
Use it in 5 languages: English, French, Spanish, German, Italian
Current state
This is an early proof of concept, tested on my own Tiiny with TiinyOS 0.1.39. I've tried all the features on my device and they work, but it hasn't been used on other setups yet, so bug reports are welcome.
The app's code is Apache 2.0. The Qwen models and system prompts are under Qwen's research license, which is non-commercial.
Earlier previews: the stream decodes the still-noisy latent, so a pose usually becomes readable only around 75% of the steps. Has anyone found a way to judge a render sooner?
Repo: https://github.com/mcornier/TiinyPaint
Bug reports and feedback are welcome!
Hi! Thanks for developing TiinyPaint! Great project! Would you consider publishing the web interface on **GitHub Pages** so users can access it directly from their browsers without installing or hosting it locally? Since the application is already in the `web/` folder and uses HTML, CSS, and JavaScript, it should be easy to deploy. If you haven't used GitHub Pages before: 1. Go to **Settings → Pages** and select **GitHub Actions** as the deployment source. 2. Create a simple workflow using `actions/upload-pages-artifact` with `path: ./web` and `actions/deploy-pages`. The interface could then be available at: https://mcornier.github.io/TiinyPaint/ I think this would make TiinyPaint much easier for everyone to discover and use. Thanks!
One more suggestion for the GitHub Pages version of TiinyPaint: Could you set `http://tiinyhost.local` as the default Tiiny AI address? This hostname should work automatically when the user's device is on the same local network as Tiiny AI. Users should still be able to change the address to a custom URL or IP address, with their choice saved in the browser's `localStorage` for future visits. The API key should also be stored locally in the browser (`localStorage`), so users don't need to enter it every time. It should never be included in the public website's source code. This would make TiinyPaint much easier to use: open the website, enter the API key once, and start generating images without manually looking up the device's IP address.
Hi! Thanks for the suggestion, it's live on the GitHub Pages version: - The address now defaults to `http://tiinyhost.local`, so on the same local network you only need your API key. - You can still enter a custom URL or IP. The address and the API key are saved in your browser's localStorage, and the key never appears in the site's code. - I also fixed connecting from the HTTPS page. An address typed without `http://` was treated as a path of the site. In Chrome and Edge, allow local network access when the browser asks. Firefox and Safari block this, so use the local `web/index.html` with them.
Something went wrong, now the webpage https://mcornier.github.io/TiinyPaint/ shows an error when trying to connect to Tiiny using the URL http://tiinyhost.local. Here is the error message: "The browser blocked access to the Tiiny at http://tiinyhost.local. On a secure (https) page, Chrome and Edge ask for permission: allow local network access for this site (padlock icon, Site settings). Firefox and Safari do not allow it: open web/index.html from your computer instead." When I entered my Tiiny's local IP instead of http://tiinyhost.local, the connection worked. It also connects if I enter the URL http://tiinyhost without .local. Local network access is already allowed for this page in my browser (Chrome). I think other users are likely experiencing the same issue.
Hi @US4LKW, Thanks for sharing this great idea! It made total sense, and the interface is now live directly from: https://mcornier.github.io/TiinyPaint/ Edit : since GitHub Pages is served over HTTPS, make sure your browser doesn't block mixed-content requests when communicating with the local Tiiny HTTP IP
Cool! Tipped! What do you put in the address? I'm getting error when I put 192.168.2.131 I tries to GET https://mcornier.github.io/TiinyPaint/192.168.2.131/api/v1/sys/device_info
I just typed in this URL, 'http://tiinyhost.local', and everything worked fine.