Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e31449c99a | ||
|
|
ad78464341 | ||
|
|
ae639c69c1 | ||
|
|
959dcfa062 | ||
|
|
aa35c8feb0 | ||
|
|
6b1b83b4a5 | ||
|
|
3b16771cf7 | ||
|
|
29cd12358e | ||
|
|
5818bdf812 | ||
|
|
7cb0d7de12 | ||
|
|
7f60e01b9a | ||
|
|
f70b527f7c | ||
|
|
4f45656976 | ||
|
|
310f576108 | ||
|
|
849bba41ad | ||
|
|
cb7726221e | ||
|
|
e91f331652 | ||
|
|
2de40a517e | ||
|
|
fc2b20ad38 | ||
|
|
ab262513df |
@@ -0,0 +1,22 @@
|
||||
name: Publish to Comfy registry
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
jobs:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@main
|
||||
with:
|
||||
## Add your own personal access token to your Github Repository secrets and reference it here.
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
@@ -1,12 +1,12 @@
|
||||
# comfy-qr
|
||||
# ComfyQR
|
||||
|
||||
A set of ComfyUI nodes to dynamically create QR image layers for generative QR art without the hassle of leaving the webui.
|
||||
|
||||
Everything in this pack is primarily focused on the creation of patterns. While the `Mask QR Errors` does some basic statistics on the differences bwtween pixels, a more definative node on determining scannability can be found in the companion project [Comfy QR Validation Nodes](https://gitlab.com/sofuego-comfy-nodes/comfy-qr-validation-nodes) which uses additional dependencies for the reading of QRs.
|
||||
Everything in this pack is primarily focused on the creation of patterns. While the `Mask QR Errors` does some basic statistics on the differences between pixels, a more definative node on determining scannability can be found in the companion project [ComfyQR-scanning-nodes](https://gitlab.com/sofuego-comfy-nodes/ComfyQR-scanning-nodes) which uses additional dependencies for the reading of QRs.
|
||||
|
||||
This repository is managed publicly on [Gitlab](https://gitlab.com/sofuego-comfy-nodes/comfy-qr), but also mirrored on [Github](https://github.com/coreyryanhanson/comfy-qr). Please submit any [issues](https://gitlab.com/sofuego-comfy-nodes/comfy-qr/-/issues) or [pull requests](https://gitlab.com/sofuego-comfy-nodes/comfy-qr/-/merge_requests) to the gitlab repo.
|
||||
This repository is managed publicly on [Gitlab](https://gitlab.com/sofuego-comfy-nodes/ComfyQR), but also mirrored on [Github](https://github.com/coreyryanhanson/ComfyQR). Please submit any [issues](https://gitlab.com/sofuego-comfy-nodes/ComfyQR/-/issues) or [pull requests](https://gitlab.com/sofuego-comfy-nodes/ComfyQR/-/merge_requests) to the gitlab repo.
|
||||
|
||||

|
||||

|
||||
|
||||
## Getting started
|
||||
|
||||
@@ -35,6 +35,7 @@ A dynamically sized QR code without any resampling scaled by the text length, th
|
||||
* `Quartile` - 25% error correction.
|
||||
* `High` - 30% error correction.
|
||||
* `border` - The border size (In multiples of `module` widths)
|
||||
* `module_drawer` - The shape the QR code modules should be. The default is `square`, but see [Alternate Module Drawers](#alternate-module-drawers) below for new examples.
|
||||
|
||||
#### Outputs
|
||||
|
||||
@@ -74,6 +75,7 @@ A QR code fixed to specific output dimensions through image resampling.
|
||||
* `Hamming` - Hamming interpolation
|
||||
* `Lanczos` - Lanczos interpolation
|
||||
* `Nearest` - Nearest Neighbor interpolation
|
||||
* `module_drawer` - The shape the QR code modules should be. The default is `square`, but see [Alternate Module Drawers](#alternate-module-drawers) below for new examples.
|
||||
|
||||
#### Outputs
|
||||
|
||||
@@ -99,6 +101,7 @@ A node that that will analyze the differences between a modified QR and create a
|
||||
* `module_size` - The size in pixels of each QR module (the individual blocks that make up a qr code) in the provided images.
|
||||
* `grayscale_method` - How to convert the RGB color channels to a single grayscale value.
|
||||
* `mean` - A simple average of the RGB values.
|
||||
* `luminance` - Converts colors to grayscale using a [more advanced formula](https://en.wikipedia.org/wiki/Grayscale#Colorimetric_(perceptual_luminance-preserving)_conversion_to_grayscale) to better match percieved brightness.
|
||||
* `aggregate_method` - How to aggregate the many pixels that make up a QR module into a single value.
|
||||
* `mean` - Within each module a simple average is taken of all constituent pixels.
|
||||
* `evaluate` - Which part of the QR to examine.
|
||||
@@ -107,6 +110,7 @@ A node that that will analyze the differences between a modified QR and create a
|
||||
* `finder_pattern` - Ignores the modules while examining only the 3 finder patterns at the corners of the QR.
|
||||
* `error_difficulty` - It is possible that while using the same reader a QR code could be easily scannable on one monitor, but not on another. The way the colors are displayed can have a major effect on unsability. By increasing this threshold, you are simulating inability to distinguish midrange pixels for both the `PERCENT_ERROR` and `QR_ERROR_MASK` outputs. It ranges from 0 to 1 where 0 only automatically fails perfect grays while 1 accepts only exactly matched modules that are perfectly black or white.
|
||||
* `inverted_pattern` - If set to `True` this assumes that the QR code has inverted colors (a black background with white modules.)
|
||||
* `gamma` - If using the `grayscale` method based on `luminance`, this will influence the formula by appending the gamma expansion and compression formulas before and after the color conversion. A gamma of 2.2 will use the [formula specific to srgb](qr_nodes.py#0.04045), while other gamma values will simply use the gamma amount as an exponent.
|
||||
|
||||
#### Outputs
|
||||
|
||||
@@ -125,7 +129,17 @@ And then aggressively increasing the strength of the ControlNet on only the erro
|
||||
|
||||

|
||||
|
||||
Any workflow in the example that ends with "validated" (and a few image examples) assume the installation of the [validation pack](https://gitlab.com/sofuego-comfy-nodes/comfy-qr-validation-nodes) as well.
|
||||
Any workflow in the example that ends with "validated" (and a few image examples) assume the installation of the [scanning pack](https://gitlab.com/sofuego-comfy-nodes/ComfyQR-scanning-nodes) as well.
|
||||
|
||||
## Alternate Module Drawers
|
||||
|
||||
The QR generation nodes now support alternate module styles. Experiment using different ones for greater flexibility during generation.
|
||||
|
||||
| Square | Gapped Square | Circle | Rounded | Vertical bars | Horizontal bars |
|
||||
|:---: | :---: | :---: | :---: | :---: | :---: |
|
||||
|  |  |  |  |  |  |
|
||||
|
||||
**Note** _Even unaltered non square styles will inherently register small deviations from RMSE values and possible minute deviations for correlations when using the [Mask QR Errors](#mask-qr-errors) node. When information is extracted, the `source_qr` values are rounded so that they can only be 0 or 1 (to allow alternate drawers to be used as inputs) and matched against the unrounded aggregation of the `modified_qr` values._
|
||||
|
||||
## Future updates
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 924 KiB After Width: | Height: | Size: 924 KiB |
|
Before Width: | Height: | Size: 909 KiB After Width: | Height: | Size: 907 KiB |
|
Before Width: | Height: | Size: 961 KiB After Width: | Height: | Size: 961 KiB |
@@ -342,7 +342,8 @@
|
||||
"#DDDDDD",
|
||||
"High",
|
||||
1,
|
||||
"Nearest"
|
||||
"Nearest",
|
||||
"Square"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -440,4 +441,4 @@
|
||||
"config": {},
|
||||
"extra": {},
|
||||
"version": 0.4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +477,8 @@
|
||||
"#000000",
|
||||
"#FFFFFF",
|
||||
"Medium",
|
||||
1
|
||||
1,
|
||||
"Square"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -524,7 +524,8 @@
|
||||
"#000000",
|
||||
"#FFFFFF",
|
||||
"High",
|
||||
1
|
||||
1,
|
||||
"Square"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -394,7 +394,8 @@
|
||||
"#000000",
|
||||
"#FFFFFF",
|
||||
"High",
|
||||
1
|
||||
1,
|
||||
"Square"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -357,7 +357,8 @@
|
||||
"#000000",
|
||||
"#FFFFFF",
|
||||
"High",
|
||||
1
|
||||
1,
|
||||
"Square"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -423,4 +424,4 @@
|
||||
"config": {},
|
||||
"extra": {},
|
||||
"version": 0.4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
"FF0",
|
||||
"High",
|
||||
1,
|
||||
"Nearest"
|
||||
"Nearest",
|
||||
"Circle"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -88,4 +89,4 @@
|
||||
"config": {},
|
||||
"extra": {},
|
||||
"version": 0.4
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,16 @@
|
||||
[project]
|
||||
name = "comfyqr"
|
||||
description = "QR generation within ComfyUI. Contains nodes suitable for workflows from generating basic QR images to techniques with advanced QR masking."
|
||||
version = "0.4.1"
|
||||
license = "LICENSE"
|
||||
dependencies = ["qrcode >= 7.1"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/coreyryanhanson/ComfyQR"
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = "coreyryanhanson"
|
||||
DisplayName = "ComfyQR"
|
||||
Icon = ""
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
qrcode >= 7.1
|
||||
qrcode >= 7.1
|
||||
pillow >= 9.0
|
||||
|
||||