Saltar al contenido
Node packVerificadoExterno
Abrir fuente

ComfyUI-sampler-lcm-alternative

ComfyUI Custom Sampler nodes that adds a new improved LCM sampler function

Responsable@jojkaartUnratedcalidad

Perfil del paquete

Estado
Verificado
Publicador
@jojkaart
Fuente
GitHub

Léeme

ComfyUI-sampler-lcm-alternative

节点及参数的详细中文解释请参考: https://plugin.aix.ink/archives/EOvN13uv

ComfyUI Custom Sampler nodes that add a new improved LCM sampler functions

This custom node repository adds three new nodes for ComfyUI to the Custom Sampler category. SamplerLCMAlternative, SamplerLCMCycle and LCMScheduler (just to save a few clicks, as you could also use the BasicScheduler and choose smg_uniform). Just clone it into your custom_nodes folder and you can start using it as soon as you restart ComfyUI.

Update 2024.07.08: I've added a new node SamplerLCMDuoFusion. It's very similar to DualNoise, but easier to use because weight parameter only requires tuning when you change the model rather than every time you adjust the number of steps. Might also be slightly better in terms of quality on average, but that's hard to verify. Update 2024.06.29: I've added more parameters to SamplerLCMDualNoise. normalize_steps, reuse_lcm_noise and parallel. Update 2024.06.24: I've added a new sampler SamplerLCMDualNoise. I consider the others obsolete now due to how stunnigly well this new sampler works. It achieves great results on SD1.5 (yes, the ORIGINAL!) plus LCM Lora with CFG 1.0 and only positive prompt.

SamplerLCMDuoFusion has two extra parameters.

  • weight, if this is 0.0, the sampler acts like Euler. Anything more and it's running two denoisers at once and combining the results. Different models (and maybe styles?) require different amount of weight for optimal results. So far my theory is that for photorealism 1.0 seems close to optimal while for anime 0.6 could work better, or something in between.
  • reuse_noise, whether to run the second denoiser with random noise for each step or whether to reuse the same noise every time. When true, the results tend to become a bit sharper and might end up requiring a reduction in weight for optimal results. Mainly good for img2img.

SamplerLCMDualNoise has four extra parameters.

  • weight, With default settings, this sampler does Euler sampling with an additional LCM sampling step after each Euler step. The results are then combined with a weighted average function. This parameter controls how strongly the results bias towards the Euler sampler. 0.0 means both samplers are applied in full. 1.0 makes this sampler the same as Euler. I've experimentally found that weights between 0.66 and 0.95 seem to work best. The best weight depends on the number of steps and might also be affected by the prompt, CFG and other parameters. Consider these as rough starting points: 50 steps -> weight 0.95, 4 steps -> weight 0.66, 16 steps -> weight 0.8
  • normalize_steps, this parameter runs the model normalize_steps times at the first sigma in the schedule and returns the original noise after each run. After that the normal sampling begins. The intention is to push the random distribution of the initial noise towards what the model tended to encounter during training. Hence, only do this for txt2img. img2img doesn't need it.
  • reuse_lcm_noise, When this is false, the LCM step always uses fresh noise. When this is true, all LCM steps apply the same noise as the first step. Mainly useful with img2img when you want to add fine details to the scene.
  • parallel, When false, euler and LCM samplings are done sequentially. LCM sampling processes the result of the Euler sampling after which the results are combined. When true, both samplers will process the result of the previous combined step.

SamplerLCMAlternative has two extra parameters.

  • euler_steps, which tells the sampler to use Euler sampling for the first n steps (or skip euler only for last n steps if n is negative).
  • ancestral, If you give this a value above 0.0, the Euler steps get some fresh randomness injected each step. The value controls how much.

With default parameters, this sampler acts exactly like the original LCM sampler from ComfyUI. When you start tuning, I recommend sta

Nodos de este paquete

6 nodos
  • LCMScheduler
  • SamplerLCMAlternative
  • SamplerLCMCycle
  • SamplerLCMDualNoise
  • SamplerLCMDuoFusion
  • SamplerLCMParallel

Recursos relacionados

2 conexiones

Fuentes

3 fuentes
GitHubFuenteVersión 883d4ec755aa4e107da9db4a46abbb4f243c81f4
github.com/jojkaart/ComfyUI-sampler-lcm-alternative

Verificado 19 oct

Extractos de fuentes

1 extracto

Source context: Repo jojkaart/ComfyUI-sampler-lcm-alternative