Jonseed / ComfyUI-Detail-Daemon

A port of muerrilla's sd-webui-Detail-Daemon as a node for ComfyUI, to adjust sigmas that control detail.
MIT License
366 stars 9 forks source link

DetailDaemon-example

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.

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

Screenshot 2024-10-29 124741

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 Daemon Graph Sigmas

Screenshot 2024-10-29 131939

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

Screenshot 2024-10-29 124833

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:

Lying Sigma Sampler

Screenshot 2024-10-29 124803

A simpler version of Detail Daemon Sampler, with only amount adjustment and start and end values.

Parameters:

Example and testing workflows

Screenshot 2024-10-29 134541

Credits