Type | Workflows |
Stats | 293 0 |
Reviews | (12) |
Published | Apr 20, 2024 |
Base Model | |
Hash | AutoV2 0876EDA311 |
(check v1.0 page for more scannable QR code images)
Each time you press "Queue Prompt", it will return more and more readable QR!
Installation and dependencies
The archive contains two workflows:
QR_Base_NoCycles
QR_Base_NoCycles is a traditional workflow to generate QR Code in one go. It's fine-tuned, but may require trial-and-error anyway.
Install ComfyQR custom nodes;
Download ControlNet QR Pattern and put it in "/models/ControlNet" folder;
Download Latent Cat Brightness model and put it in "/models/ControlNet" folder;
(recommended) Download blessed2 VAE and put it in "/models/vae" folder;
(recommended) Install WAS Node Suite custom nodes;
(recommended) Install Masquerade custom nodes;
(optional) Install Allor custom nodes.
It is possible to go without WAS and Masquerade, but you'd have to delete "Error Correction" group.
Allor is a very heavy plugin (90+ nodes), and you can skip it, just shortcut ImageFilterNode (it's for rounding corners).
QR_Cycles
QR_Cycles is an improved workflow that starts generating a barely readable QR, but applies more and more strict conditions every time you press "Queue Prompt".
Same requirenments as the QR_base_NoCycles workflow;
Install Cyclist custom nodes;
(optional) Install ComfyQR-scanning-nodes.
How to use
Input QR Code text.
Select model.
Write prompt. Mention details which tend to fragment: mosaic, waves, leaves, etc.
(optional) Write keywords for big squares in corners, example: "(box, tree branch, stone:0.6)". Weights must be halved. Connect prompt to nearest ControlNet node.
Press "Queue prompt". Most likely, first result will not be readable.
Scan the result with your phone. If not readable, queue prompt again. Each subsequent result will be better! It will take from 1 to 5 iterations.
Press "New Cycle" when result is good enough! Otherwise, workflow will continue to improve readability, overwriting your result!
If you go with automatic scanning (see below), you don't need to worry about pressing "New Cycle", it updates automatically. It also updates when you cancel the queue in panic.
Scanning
Method 1: Phone
Most likely, your phone browser can scan QR Codes. Tap on an address bar and look for QR icon.
By the way, you can attach your phone to some stand, directed towards monitor.
Method 2: Automatic
It is possible for this workflow to automatically detect QR and stop when it's readable!
Unmute "Test QR to Stop" group;
Check "Extra Options" and "Auto Queue" in ComfyUI menu.
Press "Queue Prompt".
This way, generation will automatically repeat itself until QR Code is readable.
The problem is, it relies on zbar library, which is incredibly outdated. It will successfully read QR only when it's very readable. It might also be tricky to install, you might have to search for the best python implementation (pyzbar? zbarlight?). It might also require MVSC installation. This installation guide might help (didn't try): Install zbarlight on Windows.
Resources
Model: It's unpredictable to say how model will perform at making QR Codes. But my recommendations are:
High contast cartoonish models (DisneyPixar, ToonYou)
VAE: For some reason, blessed2 VAE greatly improves scannability.
Notes
If result is too good first try, lower "Starting Iteration" to zero (bottom left node).
Face detailer is not included. I assume you already have your favourite workflow to improve faces.
Keywords for square corners will inevitably bleed to the whole picture. Keep theirs weights low.