Nodes Browser
ComfyDeploy: How ComfyUI-Detail-Daemon works in ComfyUI?
What is ComfyUI-Detail-Daemon?
A port of muerrilla's [a/sd-webui-Detail-Daemon](https://github.com/muerrilla/sd-webui-detail-daemon) as a node for ComfyUI, to adjust sigmas that control detail.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-Detail-Daemon
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI-Detail-Daemon
A port of muerrilla's sd-webui-Detail-Daemon as a node for ComfyUI, to adjust sigmas that generally enhance details, and possibly remove unwanted bokeh or background blurring, particularly with Flux models (but also works with SDXL, SD1.5, and likely other models). If the values are taken too far it results in an oversharpened and/or HDR effect. There are four nodes here. Multiply Sigmas and Lying Sigma Sampler are also included as alternative methods of generally enhancing details.
- Detail Daemon Sampler
- Detail Daemon Graph Sigmas (to graph the sigmas adjustment visually)
- Multiply Sigmas (stateless)
- Lying Sigma Sampler
Note that Detail Daemon and Lying Sigma Sampler nodes work by default with custom sampler nodes such as SamplerCustomAdvanced
. If you want to use them with non-custom sampler nodes such as KSampler
or KSamplerAdvanced
, then you'll need to make a custom sampler preset using the BlehSetSamplerPreset
node, so you can select the preset from the list in the sampler node, as discussed here.
Example and testing workflows are also available.
Nodes
Detail Daemon Sampler
Allows sampling with the Detail Daemon schedule adjustment, which keeps the noise levels injected the same while lowering the amount of noise removed at each step, which effectively adds detail. Detail_amounts between 0 and 1.0 work best. See muerrilla's Detail Daemon repo for full explanation of inputs and methodology. Generally speaking, large features are established in earlier steps and small details take shape in later steps. So adjusting the amount in earlier steps will affect bigger shapes, and adjusting it in later steps will influence smaller fine details. The default adjusts mostly in the middle steps.
Parameters (the graphing node below can help visualize these parameters):
detail_amount
: the main value that adjusts the detail in the middle of the generation process. Positive values lower the sigmas, reducing noise removed at each step, which increases detail. For Flux models, you'll probably want between 0.1–1.0 range. For SDXL models, probably less than 0.25. You can also use negative values if you want to decrease detail or simplify the image.start
: when do you want the adjustment to start, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step. Recommended: 0.1–0.5end
: when do you want the adjustment to end, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step. Recommended: 0.5–0.9bias
: shifts the detail_amount in the middle steps forward or back in the generation process.exponent
: changes the curvature of the adjustment. 0 is no curvature, 1 is smoothly curved.start_offset
: start the detail_amount at a particular value at the beginning of the generation process. Not recommended.end_offset
: end the detail_amount at a particular value at the end of the generation process.fade
: reduce the entire adjustment curve by a particular value.smooth
: (true/false), do you want the adjustment curve to be smooth or not.cfg_scale_override
: if set to 0 (default), the sampler will automatically determine the CFG scale (if possible). Set to some other value to override (should probably match the CFG used in your workflow).
Detail Daemon Graph Sigmas
Allows graphing adjusted sigmas to visually see the effects of different parameters on a graphed curve. This had to be a separate node from the Detail Daemon Sampler node in order to function properly. Just set the values the same as that node, or set inputs on separate primitive nodes that input into both the Detail Daemon Sampler and this Graph Sigmas node. You'll need to run the queue in order to see the graph on the node. Please note: this node doesn't actually change the sigmas used when generating, it only graphs them.
Multiply Sigmas
Simple node to multiply all sigmas (noise levels) by the supplied factor. It multiplies both the noise levels added and denoised by the factor, which somehow adds detail with a factor less than 1. It is stateless, meaning it calculates the sigmas fresh on every queue (other multiply sigmas nodes seem to calculate on prior run sigmas).
Parameters:
factor
: the amount that you want to multiply the sigma (noise level) by at each step. So, for example, if the first step has a sigma of 1, then using a factor of 0.95 would make this sigma 0.95. If a step has a sigma of 0.7, then a factor of 0.95 would make it 0.665. You probably want to keep this factor between 0.95–0.99. Lower values increase detail, but might also increasingly change the composition of the image, or introduce noisy grain. Setting it to 1.0 effectively disables the node.start
: when do you want the adjustment to start, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step.end
: when do you want the adjustment to end, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step.
Lying Sigma Sampler
A simpler version of Detail Daemon Sampler, with only amount adjustment and start and end values.
Parameters:
dishonesty_factor
: similar todetail_amount
in the Detail Daemon node, this adjusts the amount of detail. It is on a different scale though, for example, -0.05dishonesty_factor
is the equivalent of 0.5 indetail_amount
of Detail Daemon (or 0.95 of Multiply Sigmas). Negative values adjust the sigmas down, increasing detail. You probably want to stay between -0.1 and -0.01. Positive values would increase the sigmas, decreasing detail.start_percent
: when do you want the adjustment to start, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step. Recommended: 0.1–0.5end_percent
: when do you want the adjustment to end, in a percent range from 0–1.0, 0 being the first step, 1.0 being the last step. Recommended: 0.5–0.9
Example and testing workflows
- Flux: the Comparing Detailers.json workflow will allow you to compare all these various detailer nodes on the same prompt and seed.
- Flux img2img: the Flux img2img-DetailDaemon.json is an example of using Detail Daemon in a Flux img2img workflow.
- Flux upscale: the Flux upscale-DetailDaemon.json is an example of using Detail Daemon in a Flux upscale workflow.
- Flux inpainting: the Flux inpainting-DetailDaemon.json is an example of using Detail Daemon in a Flux inpainting workflow.
- SDXL: the SDXL txt2img-DetailDaemon.json is an example of using Detail Daemon in a SDXL workflow.
Credits
- Detail Daemon concept and schedule generation function from muerrilla: https://github.com/muerrilla/sd-webui-detail-daemon/
- ComfyUI sampler implementation and schedule interpolation, as well as Lying Sigma Sampler, by https://github.com/blepping/
- Multiply Sigmas node based on the one included here: https://github.com/Extraltodeus/sigmas_tools_and_the_golden_scheduler