AIFSH / PyramidFlow-ComfyUI

MIT License
15 stars 4 forks source link

TypeError: expected np.ndarray (got Tensor) #5

Open vird opened 1 month ago

vird commented 1 month ago

Installed with comfyUI manager

workflow: https://gist.github.com/vird/680f7209020acf05fa753d717d711873

terminal error:

got prompt
using half precision
Using temporal causal attention
We interp the position embedding of condition latents
You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:11<00:00,  5.86s/it]
The latent dimmension channes is 16
!!! Exception during processing !!! expected np.ndarray (got Tensor)
Traceback (most recent call last):
  File "/opt/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 "/opt/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 "/opt/ComfyUI/execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/opt/ComfyUI/execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "/opt/ComfyUI/custom_nodes/PyramidFlow-ComfyUI/__init__.py", line 71, in gen_video
    model = PyramidDiTForVideoGeneration(
  File "/opt/ComfyUI/custom_nodes/PyramidFlow-ComfyUI/pyramid_dit/pyramid_dit_for_video_gen_pipeline.py", line 129, in __init__
    self.scheduler = PyramidFlowMatchEulerDiscreteScheduler(
  File "/opt/ComfyUI/local_venv/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 653, in inner_init
    init(self, *args, **init_kwargs)
  File "/opt/ComfyUI/custom_nodes/PyramidFlow-ComfyUI/diffusion_schedulers/scheduling_flow_matching.py", line 66, in __init__
    self.init_sigmas_for_each_stage()
  File "/opt/ComfyUI/custom_nodes/PyramidFlow-ComfyUI/diffusion_schedulers/scheduling_flow_matching.py", line 146, in init_sigmas_for_each_stage
    self.timesteps_per_stage[i_s] = torch.from_numpy(timesteps[:-1])
TypeError: expected np.ndarray (got Tensor)

Prompt executed in 22.35 seconds

comfyUI runned in local venv installed packages https://gist.github.com/vird/724f15fe04a4d75ea64c12791387f519

N.b. VideoSys-ComfyUI works. So problem is probably with Pyramid flow, and maybe not with my setup in general