XLabs-AI / x-flux-comfyui

Apache License 2.0
771 stars 55 forks source link

XlabsSampler list index out of range #107

Closed martintomov closed 1 week ago

martintomov commented 1 week ago

Hi,

I tried to fix it myself before writing this issue by updating Comfy and all nodes to latest version. However, the issue persists.

ComfyUI Error Report

Error Details

## System Information
- **ComfyUI Version:** v0.2.0-2-g00a5d08
- **Arguments:** ComfyUI\main.py --windows-standalone-build
- **OS:** nt
- **Python Version:** 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
- **Embedded Python:** true
- **PyTorch Version:** 2.3.1+cu121
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 25756696576
  - **VRAM Free:** 5200378322
  - **Torch VRAM Total:** 18756927488
  - **Torch VRAM Free:** 144476626

## Logs

2024-09-03 14:54:14,585 - root - INFO - Total VRAM 24564 MB, total RAM 65389 MB 2024-09-03 14:54:14,585 - root - INFO - pytorch version: 2.3.1+cu121 2024-09-03 14:54:14,589 - xformers - WARNING - WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.3.1+cu121) Python 3.11.3 (you have 3.11.9) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details 2024-09-03 14:54:14,600 - root - INFO - xformers version: 0.0.20 2024-09-03 14:54:14,600 - root - INFO - Set vram state to: NORMAL_VRAM 2024-09-03 14:54:14,600 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync 2024-09-03 14:54:15,338 - root - INFO - Using pytorch cross attention 2024-09-03 14:54:16,103 - root - INFO - [Prompt Server] web root: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\web 2024-09-03 14:54:18,179 - root - INFO - Total VRAM 24564 MB, total RAM 65389 MB 2024-09-03 14:54:18,179 - root - INFO - pytorch version: 2.3.1+cu121 2024-09-03 14:54:18,179 - root - INFO - xformers version: 0.0.20 2024-09-03 14:54:18,179 - root - INFO - Set vram state to: NORMAL_VRAM 2024-09-03 14:54:18,179 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync 2024-09-03 14:54:20,308 - root - INFO - -------------- 2024-09-03 14:54:20,308 - root - INFO -  ### Mixlab Nodes: Loaded 2024-09-03 14:54:20,308 - root - INFO - ChatGPT.available True 2024-09-03 14:54:20,309 - root - INFO - editmask.available True 2024-09-03 14:54:20,430 - root - INFO - ClipInterrogator.available True 2024-09-03 14:54:20,552 - root - INFO - PromptGenerate.available True 2024-09-03 14:54:20,552 - root - INFO - ChinesePrompt.available True 2024-09-03 14:54:20,552 - root - INFO - RembgNode.available True 2024-09-03 14:54:20,785 - root - INFO - TripoSR.available 2024-09-03 14:54:20,786 - root - INFO - MiniCPMNode.available 2024-09-03 14:54:20,786 - root - INFO -  --------------  2024-09-03 14:54:22,722 - root - INFO - Import times for custom nodes: 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui-Minimap 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Universal-Styler 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\masquerade-nodes-comfyui 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Gaffer 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyLiterals 2024-09-03 14:54:22,722 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-lama-remover 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Miaoshouai-Tagger 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\mikey_nodes 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-various 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 2024-09-03 14:54:22,723 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes 2024-09-03 14:54:22,724 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_essentials 2024-09-03 14:54:22,724 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-IC-Light 2024-09-03 14:54:22,724 - root - INFO - 0.0 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_WordCloud 2024-09-03 14:54:22,724 - root - INFO - 0.1 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\CharacterFaceSwap 2024-09-03 14:54:22,724 - root - INFO - 0.1 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LayerStyle 2024-09-03 14:54:22,724 - root - INFO - 0.3 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager 2024-09-03 14:54:22,724 - root - INFO - 0.4 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Image-Filters 2024-09-03 14:54:22,724 - root - INFO - 0.6 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use 2024-09-03 14:54:22,724 - root - INFO - 0.8 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes 2024-09-03 14:54:22,724 - root - INFO - 0.8 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-art-venture 2024-09-03 14:54:22,724 - root - INFO - 1.1 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inspyrenet-Rembg 2024-09-03 14:54:22,724 - root - INFO - 1.7 seconds: C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui 2024-09-03 14:54:22,724 - root - INFO - 2024-09-03 14:54:22,769 - root - INFO -

2024-09-03 14:54:22,769 - root - INFO -

Starting server 2024-09-03 14:54:22,769 - root - INFO - To see the GUI go to: http://10.8.0.14:8188 or http://127.0.0.1:8188 2024-09-03 14:54:22,770 - root - INFO - To see the GUI go to: https://10.8.0.14:8189 or https://127.0.0.1:8189 2024-09-03 14:54:39,060 - root - INFO - got prompt 2024-09-03 14:54:39,196 - root - INFO - Using pytorch attention in VAE 2024-09-03 14:54:39,197 - root - INFO - Using pytorch attention in VAE 2024-09-03 14:54:44,892 - root - INFO - model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16 2024-09-03 14:54:44,893 - root - INFO - modeltype FLUX 2024-09-03 14:54:52,554 - root - INFO - Requested to load FluxClipModel 2024-09-03 14:54:52,554 - root - INFO - Loading 1 new model 2024-09-03 14:54:52,559 - root - INFO - loaded completely 0.0 4777.53759765625 True 2024-09-03 14:54:52,663 - root - WARNING - clip missing: ['text_projection.weight'] 2024-09-03 14:54:54,852 - root - INFO - Requested to load AutoencodingEngine 2024-09-03 14:54:54,852 - root - INFO - Loading 1 new model 2024-09-03 14:54:54,876 - root - INFO - loaded completely 0.0 159.87335777282715 True 2024-09-03 14:54:57,987 - root - INFO - Requested to load Flux 2024-09-03 14:54:57,987 - root - INFO - Loading 1 new model 2024-09-03 14:55:00,281 - root - INFO - loaded completely 0.0 11350.048889160156 True 2024-09-03 14:55:00,374 - root - ERROR - !!! Exception during processing !!! list index out of range 2024-09-03 14:55:00,375 - root - ERROR - Traceback (most recent call last): File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\nodes.py", line 379, in sampling x = denoise_controlnet( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\sampling.py", line 256, in denoise_controlnet t = timesteps[t_idx]


IndexError: list index out of range

2024-09-03 14:55:00,376 - root - INFO - Prompt executed in 21.23 seconds
2024-09-03 14:56:11,571 - root - INFO - got prompt
2024-09-03 14:56:11,830 - root - ERROR - !!! Exception during processing !!! list index out of range
2024-09-03 14:56:11,831 - root - ERROR - Traceback (most recent call last):
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\nodes.py", line 379, in sampling
    x = denoise_controlnet(
        ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\sampling.py", line 256, in denoise_controlnet
    t = timesteps[t_idx]
        ~~~~~~~~~^^^^^^^
IndexError: list index out of range

2024-09-03 14:56:11,833 - root - INFO - Prompt executed in 0.17 seconds
```
sunwei317 commented 1 week ago

changing the value of the image_to_image_strength to positive in the xlabs sampler solve the problem.

metamountain commented 1 week ago

Ah nice.
This is kind of foolish... Xlabs should change that behaviour....

grahamquest commented 1 week ago

Ah nice. This is kind of foolish... Xlabs should change that behaviour....

HAH for weeks I couldnt figure it out. WHAT?! Thanks @sunwei317 and 100% agreed @metamountain