kijai / ComfyUI-MochiWrapper

Apache License 2.0
638 stars 53 forks source link

object of type 'float' has no len() #60

Closed mikeyimer closed 2 weeks ago

mikeyimer commented 2 weeks ago

ComfyUI Error Report

Error Details

## System Information
- **ComfyUI Version:** v0.2.2-50-g0bfc7cc
- **Arguments:** main.py --port=6006
- **OS:** posix
- **Python Version:** 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0]
- **Embedded Python:** false
- **PyTorch Version:** 2.3.1+cu121
## Devices

- **Name:** cuda:0 NVIDIA A100-PCIE-40GB : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 42285268992
  - **VRAM Free:** 30114435428
  - **Torch VRAM Total:** 11609833472
  - **Torch VRAM Free:** 18862436

## Logs

2024-11-04 17:46:09,917 - root - INFO - Total VRAM 40326 MB, total RAM 644982 MB 2024-11-04 17:46:09,920 - root - INFO - pytorch version: 2.3.1+cu121 2024-11-04 17:46:11,301 - root - INFO - xformers version: 0.0.27 2024-11-04 17:46:11,301 - root - INFO - Set vram state to: NORMAL_VRAM 2024-11-04 17:46:11,301 - root - INFO - Device: cuda:0 NVIDIA A100-PCIE-40GB : cudaMallocAsync 2024-11-04 17:46:11,412 - root - INFO - Using xformers cross attention 2024-11-04 17:46:12,066 - root - INFO - [Prompt Server] web root: /root/autodl-tmp/ComfyUI/web 2024-11-04 17:46:13,130 - root - INFO - Total VRAM 40326 MB, total RAM 644982 MB 2024-11-04 17:46:13,131 - root - INFO - pytorch version: 2.3.1+cu121 2024-11-04 17:46:13,131 - root - INFO - xformers version: 0.0.27 2024-11-04 17:46:13,131 - root - INFO - Set vram state to: NORMAL_VRAM 2024-11-04 17:46:13,131 - root - INFO - Device: cuda:0 NVIDIA A100-PCIE-40GB : cudaMallocAsync 2024-11-04 17:46:15,823 - root - INFO - Import times for custom nodes: 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/websocket_image_save.py 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/AIGODLIKE-COMFYUI-TRANSLATION 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-mxToolkit 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-WD14-Tagger 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-MochiEdit 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-KJNodes 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-ToolBox 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-IC-Light 2024-11-04 17:46:15,823 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus 2024-11-04 17:46:15,824 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/comfyui_controlnet_aux 2024-11-04 17:46:15,824 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-AnimateDiff 2024-11-04 17:46:15,824 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale 2024-11-04 17:46:15,824 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Crystools 2024-11-04 17:46:15,824 - root - INFO - 0.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Manager 2024-11-04 17:46:15,824 - root - INFO - 0.1 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/comfyui-reactor-node 2024-11-04 17:46:15,824 - root - INFO - 0.1 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite 2024-11-04 17:46:15,824 - root - INFO - 0.2 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI_InstantID 2024-11-04 17:46:15,824 - root - INFO - 0.3 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/rgthree-comfy 2024-11-04 17:46:15,824 - root - INFO - 0.4 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-Impact-Pack 2024-11-04 17:46:15,824 - root - INFO - 0.4 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-MochiWrapper 2024-11-04 17:46:15,824 - root - INFO - 0.6 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-FluxTrainer 2024-11-04 17:46:15,824 - root - INFO - 1.0 seconds: /root/autodl-tmp/ComfyUI/custom_nodes/was-node-suite-comfyui 2024-11-04 17:46:15,824 - root - INFO - 2024-11-04 17:46:15,836 - root - INFO - Starting server

2024-11-04 17:46:15,836 - root - INFO - To see the GUI go to: http://127.0.0.1:6006 2024-11-04 17:46:44,822 - root - INFO - got prompt 2024-11-04 17:47:06,433 - ComfyUI-MochiWrapper.nodes - INFO - Downloading mochi VAE to: /root/autodl-tmp/ComfyUI/models/vae/mochi/mochi_preview_vae_decoder_bf16.safetensors 2024-11-04 17:47:35,226 - root - INFO - Initializing model... 2024-11-04 17:47:35,339 - root - INFO - Loading model state_dict from /root/autodl-tmp/ComfyUI/models/diffusion_models/mochi/mochi_preview_dit_bf16.safetensors... 2024-11-04 17:47:35,421 - root - INFO - Using accelerate to load and assign model weights to device... 2024-11-04 17:47:43,337 - root - INFO - Using cfg schedule: 0.0 2024-11-04 17:47:43,365 - root - ERROR - !!! Exception during processing !!! object of type 'float' has no len() 2024-11-04 17:47:43,366 - root - ERROR - Traceback (most recent call last): File "/root/autodl-tmp/ComfyUI/execution.py", line 323, 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 "/root/autodl-tmp/ComfyUI/execution.py", line 198, 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 "/root/autodl-tmp/ComfyUI/execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "/root/autodl-tmp/ComfyUI/execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-MochiWrapper/nodes.py", line 519, in process latents = model.run(args) File "/root/autodl-tmp/ComfyUI/custom_nodes/ComfyUI-MochiWrapper/mochi_preview/t2v_synth_mochi.py", line 204, in run len(cfg_schedule) == sample_steps TypeError: object of type 'float' has no len()

2024-11-04 17:47:43,366 - root - INFO - Prompt executed in 58.53 seconds

## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

{"last_node_id":12,"last_link_id":15,"nodes":[{"id":10,"type":"MochiDecode","pos":{"0":1306,"1":158},"size":{"0":315,"1":222},"flags":{},"order":6,"mode":0,"inputs":[{"name":"vae","type":"MOCHIVAE","link":11,"label":"vae"},{"name":"samples","type":"LATENT","link":12,"label":"samples"}],"outputs":[{"name":"images","type":"IMAGE","links":[14],"slot_index":0,"label":"images"}],"properties":{"Node name for S&R":"MochiDecode"},"widgets_values":[true,false,10,160,312,0.25,0.25]},{"id":11,"type":"GetImageSizeAndCount","pos":{"0":1385,"1":441},"size":{"0":222.00714111328125,"1":86},"flags":{},"order":7,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":14,"label":"图像"}],"outputs":[{"name":"image","type":"IMAGE","links":[15],"slot_index":0,"label":"图像"},{"name":"width","type":"INT","links":null,"label":"宽度"},{"name":"height","type":"INT","links":null,"label":"高度"},{"name":"count","type":"INT","links":null,"label":"数量"}],"properties":{"Node name for S&R":"GetImageSizeAndCount"}},{"id":9,"type":"VHS_VideoCombine","pos":{"0":1683,"1":63},"size":[1261.0787353515625,310],"flags":{},"order":8,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":15,"label":"图像"},{"name":"audio","type":"AUDIO","link":null,"shape":7,"label":"音频"},{"name":"meta_batch","type":"VHS_BatchManager","link":null,"shape":7,"label":"批次管理"},{"name":"vae","type":"VAE","link":null,"shape":7}],"outputs":[{"name":"Filenames","type":"VHS_FILENAMES","links":null,"label":"文件名"}],"properties":{"Node name for S&R":"VHS_VideoCombine"},"widgets_values":{"frame_rate":24,"loop_count":0,"filename_prefix":"Mochi_preview","format":"video/h264-mp4","pix_fmt":"yuv420p","crf":19,"save_metadata":true,"pingpong":false,"save_output":false,"videopreview":{"hidden":false,"paused":false,"params":{"filename":"Mochi_preview_00005.mp4","subfolder":"","type":"temp","format":"video/h264-mp4","frame_rate":24},"muted":false}}},{"id":12,"type":"Note","pos":{"0":1271,"1":-119},"size":{"0":365.5867919921875,"1":208.3488311767578},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["VAE decoding is extremely heavy so tiling is necessary, I have not found best settings for it yet so testing help is appreciated, you can keep decoding after sampling as the latents are still in memory to see what works.\n\nEither adjust frame_batch_size to decode less frames at once, this tends to cause frame skipping though.\n\nOr use higher batch and smaller tiles to still fit it in memory."],"color":"#432","bgcolor":"#653"},{"id":8,"type":"MochiTextEncode","pos":{"0":455,"1":598},"size":{"0":400,"1":200},"flags":{},"order":4,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":8,"label":"clip"}],"outputs":[{"name":"conditioning","type":"CONDITIONING","links":[9],"slot_index":0,"label":"conditioning"},{"name":"clip","type":"CLIP","links":null,"shape":3,"label":"clip"}],"properties":{"Node name for S&R":"MochiTextEncode"},"widgets_values":["bad image,worse quality,blurry",1,true]},{"id":5,"type":"MochiSampler","pos":{"0":960,"1":243},"size":{"0":315,"1":306},"flags":{},"order":5,"mode":0,"inputs":[{"name":"model","type":"MOCHIMODEL","link":3,"label":"model"},{"name":"positive","type":"CONDITIONING","link":7,"label":"positive"},{"name":"negative","type":"CONDITIONING","link":9,"label":"negative"},{"name":"opt_sigmas","type":"SIGMAS","link":null,"label":"opt_sigmas","shape":7},{"name":"samples","type":"LATENT","link":null,"label":"samples","shape":7}],"outputs":[{"name":"samples","type":"LATENT","links":[12],"slot_index":0,"label":"samples"}],"properties":{"Node name for S&R":"MochiSampler"},"widgets_values":[848,480,31,50,4.5,403586862112946,"randomize",0]},{"id":1,"type":"MochiTextEncode","pos":{"0":456,"1":249},"size":{"0":413.45361328125,"1":268.5947265625},"flags":{},"order":3,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":1,"label":"clip"}],"outputs":[{"name":"conditioning","type":"CONDITIONING","links":[7],"slot_index":0,"label":"conditioning"},{"name":"clip","type":"CLIP","links":null,"shape":3,"label":"clip"}],"properties":{"Node name for S&R":"MochiTextEncode"},"widgets_values":["Wonder Woman, adorned in her iconic red, blue, and gold armor, gracefully dances in a lush, moonlit forest. Her silver tiara glints under the soft glow of the moon, and her golden lasso swirls around her as she moves with fluid elegance. The forest is alive with bioluminescent flowers and ethereal fireflies, creating a magical ambiance. Her eyes sparkle with determination and joy, reflecting the enchanting surroundings. The scene transitions to her leaping into the air, her cape billowing behind her, capturing a moment of pure freedom and power, all set against the mystical backdrop of the enchanted forest.",1,true]},{"id":2,"type":"CLIPLoader","pos":{"0":-3,"1":462},"size":{"0":429.837646484375,"1":82},"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"CLIP","type":"CLIP","links":[1,8],"label":"CLIP"}],"properties":{"Node name for S&R":"CLIPLoader"},"widgets_values":["t5xxl_fp16.safetensors","sd3"]},{"id":4,"type":"DownloadAndLoadMochiModel","pos":{"0":339,"1":-109},"size":{"0":437.7432556152344,"1":174},"flags":{},"order":2,"mode":0,"inputs":[{"name":"trigger","type":"CONDITIONING","link":null,"label":"trigger","shape":7},{"name":"compile_args","type":"MOCHICOMPILEARGS","link":null,"label":"compile_args","shape":7}],"outputs":[{"name":"mochi_model","type":"MOCHIMODEL","links":[3],"slot_index":0,"label":"mochi_model"},{"name":"mochi_vae","type":"MOCHIVAE","links":[11],"slot_index":1,"label":"mochi_vae"}],"properties":{"Node name for S&R":"DownloadAndLoadMochiModel"},"widgets_values":["mochi_preview_dit_bf16.safetensors","mochi_preview_vae_decoder_bf16.safetensors","fp8_e4m3fn","sdpa",false]}],"links":[[1,2,0,1,0,"CLIP"],[3,4,0,5,0,"MOCHIMODEL"],[7,1,0,5,1,"CONDITIONING"],[8,2,0,8,0,"CLIP"],[9,8,0,5,2,"CONDITIONING"],[11,4,1,10,0,"MOCHIVAE"],[12,5,0,10,1,"LATENT"],[14,10,0,11,0,"IMAGE"],[15,11,0,9,0,"IMAGE"]],"groups":[],"config":{},"extra":{"ds":{"scale":1.1,"offset":[147.26446280991817,-20.958677685950516]}},"version":0.4}



## Additional Context
(Please add any additional context or steps to reproduce the error here)
![图片](https://github.com/user-attachments/assets/6de549db-de17-4556-8ae2-01513964a3f8)
kijai commented 2 weeks ago

the cfg_schedule is not supposed to be a widget, but an input, try remaking the node and it should become an input.