Time to try another ControlNet for Stable Diffusion XL - QR Code Monster v1 in ComfyUI. This ControlNet can influence SDXL such that the generated image “hides” a scan-able QR code, which at first glance, looks like a photo!


I am using vanilla ComfyUI, with SDXL and LCM LoRA for SDXL.

All that is needed is to download QR monster diffusion_pytorch_model.safetensors, rename it e.g. to control_v1p_sdxl_qrcode_monster.safetensors, and save it to comfyui/controlnet.


Here is the workflow with full SDXL:

ComfyUI workflow for QR Code Monster ControlNet for SDXL LCM LoRA

  • Start off with the usual SDXL workflow - CheckpointLoaderSimple > CLIPTextEncodeSDXL prompt and CLIPTextEncode negative prompt
  • Use ControlNetLoader to load the QR Monster ControlNet
  • And use LoadImage to load a PNG QR code, sized 1024x1024 - I created my QR codes using the iPhone’s Shortcuts app with the highest Error Correction level selected.
  • And insert a ControlNetApplyAdvanced node to take the conditioning outputs from both CLIP Text Encoders and pass the conditioning output to a KSamplerAdvanced node
  • The trick is adjusting the Apply Control Net strength (0.8 to 0.9) and perhaps the KSampler cfg value so that you have a creative image that makes the QR code less obvious but that can still be read - the higher the closer to the original source image.

And here is another with the SDXL LCM LoRA - I go from 20 steps to just 7!

ComfyUI workflow for QR Code Monster ControlNet for SDXL

I tested these QR codes on my iPhone - for some images, the Camera app simply could not locate the QR code, but the dedicated (QR) Code scanner could! Add it to the Control Center from the Settings.


Here are a few beautiful QR codes I generated containing a URL:

And here is the same workflow, used to “hide” a famous painting in plain sight - squint and view from a distance!