Replies: 5 comments 27 replies
|
I've installed it through the script as above, but the custom node fails to import. The script created the folder with all the files as expected, no errors during installation. There is nothing in the startup logs to understand why it can't be imported, so I can't say what problem might be |
|
@galpt So far I found 3 issues:
This is the error I get:[ERROR] !!! Exception during processing !!! last element of sigmas must be 0
[ERROR] Traceback (most recent call last):
File "E:\ComfyUI\ComfyUI\execution.py", line 543, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\execution.py", line 342, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\execution.py", line 316, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "E:\ComfyUI\ComfyUI\execution.py", line 304, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\nodes.py", line 1641, in sample
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\nodes.py", line 1571, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\sample.py", line 74, in sample
samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 1444, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 1334, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 1316, in sample
output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 1254, in outer_sample
output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 1229, in inner_sample
samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\comfy\samplers.py", line 999, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\custom_nodes\infinity-diffusion\infinity_comfyui\integration.py", line 54, in sample_infinity
return sampler.sample(denoise_fn, x, sigmas, callback=callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI\ComfyUI\custom_nodes\infinity-diffusion\infinity_diffusion.py", line 223, in sample
raise ValueError("last element of sigmas must be 0")
ValueError: last element of sigmas must be 0I wanted to try your infinite sampler+scheduler in my Krea2 workflow, but I've several custom stuff going on there, like starting the generation with Raw model and then continues with Turbo, but doesn't work for me due to these problems. Here's a test workflow I made to find the possible cause of the 2nd and 3rd issues: |
|
I created a new branch here: This one aims to be a good alternative to DPM++ 2M Karras, which most people say is good for realistic images. The self-correcting logic might be beneficial for use cases that DPM++ 2M Karras does not cover. Infinity is meant to be used together as both the sampler and scheduler, so while you can use for example Euler A + Infinity scheduler, you do not get the self-correcting logic of Infinity. The self-correction is a sampler feature that happens to modify the sigma schedule at runtime. Making it work independently of the infinity sampler would require moving the invariant-tracking and insertion logic into a shared wrapper that any sampler could use, which might require making modifications to different areas in ComfyUI. |
|
Honestly, the idea of a sampler that remembers the direction of change over the last few steps is intriguing. Most samplers I've worked with, like The fact that you're checking for overshooting and scaling down the correction when needed is a good safeguard. I've seen similar techniques used in some RLHF (Reinforcement Learning from Human Feedback) implementations to stabilize the training process. One thing that caught my eye is the scheduler shifting step budget toward the end. I've experimented with similar step reallocation techniques when fine-tuning models with For example, in my own code, I've used a simple reallocation function like this: def reallocate_steps(steps, ratio=0.2):
initial_steps = int(steps * (1 - ratio))
final_steps = steps - initial_steps
return initial_steps, final_stepsThis reallocation can help the model refine details in the later stages. Curious to hear if you've experimented with different reallocation ratios or if there's a particular reason you chose to shift budget toward the end. Would love to know how this affects the overall quality and if you've noticed any trade-offs. |


















Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Repository: https://github.com/galpt/infinity-diffusion
If you have some free time and want to help test it with your use cases and provide feedback, that would be greatly appreciated.
How to try it
Note
I'd recommend trying the
aetherbranch directly. It shows promising results so far and currently it's set as the default branch.The other branches will stay as-is for a while as a comparison to the
aetherbranch.It installs as a custom node with one command:
Restart ComfyUI and "infinity" appears in both the sampler and scheduler dropdowns. Uninstall is the same command with uninstall instead of install. Nothing inside ComfyUI's own files is touched.
If there is enough interest from the community, I can look into submitting it as a built-in option, or other devs are welcome to add it to ComfyUI or their own projects.
All reactions