akatz-ai / ComfyUI-Depthflow-Nodes

An implementation of Depthflow in ComfyUI
GNU Affero General Public License v3.0
112 stars 5 forks source link

ShaderScene.main() got an unexpected keyword argument 'freewheel' #13

Open slmonker opened 5 days ago

slmonker commented 5 days ago

just updated my torch to 2.4.1+cuda 12.4.then this come out.

akatz-ai commented 5 days ago

Hi @slmonker, did you install the node pack through the manager or manually via git clone? If using the manager can you please try uninstalling the custom node and reinstalling?

mwoody450 commented 4 days ago

I'm trying DepthFlow for the first time and am getting this same error. More info below. I tried an uninstall, restart, reinstall using the manager; no change. Inputs are a 1024x1024 image, same resolution depth map generated by MiDaS, and the input from any of the depthflow motion control nodes.

│DepthFlow├┤23'41.279├┤INFO   │ ▸ OpenGL Renderer: NVIDIA GeForce RTX 4070 Ti/PCIe/SSE2
!!! Exception during processing !!! ShaderScene.main() got an unexpected keyword argument 'freewheel'
Traceback (most recent call last):
  File "G:\AI\ComfyUI_windows_portable\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 "G:\AI\ComfyUI_windows_portable\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 "G:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Depthflow-Nodes\src\depthflow.py", line 320, in apply_depthflow
    scene.main(
TypeError: ShaderScene.main() got an unexpected keyword argument 'freewheel'

Screenshot of the relevant section of the workflow, if it's useful, attached. image

slmonker commented 3 days ago

Hi @slmonker, did you install the node pack through the manager or manually via git clone? If using the manager can you please try uninstalling the custom node and reinstalling?

i installed it by gitclone and in the manager install with GitURL,ok i will try to reinstall it ,thx

slmonker commented 3 days ago

Hi @slmonker, did you install the node pack through the manager or manually via git clone? If using the manager can you please try uninstalling the custom node and reinstalling?

ShaderScene.main() got an unexpected keyword argument 'freewheel'

still not working

mwoody450 commented 3 days ago

Yeah I uninstalled it, installed it fresh via manager; no change. Uninstalled again, updated comfy and all dependencies, installed again, no change. Uninstalled, installed via GIT rather than manager; no change. Uploaded depthflow.py to chatgpt and asked it; most useless answer ever. 😅

akatz-ai commented 3 days ago

I just updated the node pack with #14 to detect a depthflow version mismatch (the cause of the "freewheel" error) and install the latest version. Please try updating the node pack once again and then rebooting comfyui once or twice to see if the issue persists.

slmonker commented 3 days ago

I just updated the node pack with #14 to detect a depthflow version mismatch (the cause of the "freewheel" error) and install the latest version. Please try updating the node pack once again and then rebooting comfyui once or twice to see if the issue persists.

roger that!

mwoody450 commented 3 days ago

Thanks but... something definitely went very wrong there. Admittedly, I updated a few things at once (ImpactPack, Manager, Depthflow) but it rendered Comfy unbootable. I'm working to fix it now, just warning anyone else to not update. I've managed to get it to boot, though DepthFlow is listed as "IMPORT FAILED"

EDIT: Cut from current boot logs, relevant lines:

G:\AI\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --lowvram
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-10-16 16:15:55.386359
** Platform: Windows
** Python version: 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
** Python executable: G:\AI\ComfyUI_windows_portable\python_embeded\python.exe
** ComfyUI Path: G:\AI\ComfyUI_windows_portable\ComfyUI
** Log path: G:\AI\ComfyUI_windows_portable\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
   1.3 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 12282 MB, total RAM 65367 MB
pytorch version: 2.5.0+cu121
Set vram state to: LOW_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4070 Ti : cudaMallocAsync
Using pytorch cross attention
[Prompt Server] web root: G:\AI\ComfyUI_windows_portable\ComfyUI\web
G:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\kornia\feature\lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)
sageattn not found, using sdpa
sageattn not found, using sdpa
sageattn not found, using sdpa
Traceback (most recent call last):
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2001, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Depthflow-Nodes\__init__.py", line 8, in <module>
    from .src.motion.depthflow_motion_components import DepthflowMotionSine, DepthflowMotionCosine, DepthflowMotionLinear, DepthflowMotionExponential, DepthflowMotionArc, DepthflowMotionSetTarget
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Depthflow-Nodes\src\motion\depthflow_motion_components.py", line 1, in <module>
    from .depthflow_motion_base import DepthflowMotion, Target
  File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Depthflow-Nodes\src\motion\depthflow_motion_base.py", line 2, in <module>
    from DepthFlow.Motion import Preset
ModuleNotFoundError: No module named 'DepthFlow'

Cannot import G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Depthflow-Nodes module for custom nodes: No module named 'DepthFlow'
slmonker commented 3 days ago

Thanks but... something definitely went very wrong there. Admittedly, I updated a few things at once (ImpactPack, Manager, Depthflow) but it rendered Comfy unbootable. I'm working to fix it now, just warning anyone else to not update. I've managed to get it to boot, though DepthFlow is listed as "IMPORT FAILED"

me too,i just repaired my comfyui requirements 5mins ago,i had to update_comfyui_and_python_dependencies 1st then reinstall Pytorch 2.4.1+cu124........

mwoody450 commented 3 days ago

Thanks but... something definitely went very wrong there. Admittedly, I updated a few things at once (ImpactPack, Manager, Depthflow) but it rendered Comfy unbootable. I'm working to fix it now, just warning anyone else to not update. I've managed to get it to boot, though DepthFlow is listed as "IMPORT FAILED"

me too,i just repaired my comfyui requirements 5mins ago,i had to update_comfyui_and_python_dependencies 1st then reinstall Pytorch 2.4.1+cu124........

Yeah I got it to boot again by removing all updated folders from custom_notes and running the comfyui + python update script. Glad it wasn't something I just screwed up.

slmonker commented 3 days ago

Thanks but... something definitely went very wrong there. Admittedly, I updated a few things at once (ImpactPack, Manager, Depthflow) but it rendered Comfy unbootable. I'm working to fix it now, just warning anyone else to not update. I've managed to get it to boot, though DepthFlow is listed as "IMPORT FAILED"

me too,i just repaired my comfyui requirements 5mins ago,i had to update_comfyui_and_python_dependencies 1st then reinstall Pytorch 2.4.1+cu124........

Yeah I got it to boot again by removing all updated folders from custom_notes and running the comfyui + python update script. Glad it wasn't something I just screwed up.

No matter how messy it is ,comfyui+python update script always fix it,wat we have to do next just simply update pytorch,cuda and xfromers……

akatz-ai commented 3 days ago

Yeah the unfortunate reality in comfyui is there's no good version management system in place, so everyone has different versions of custom nodes, python packages, etc. and it's impossible for developers to test against all of those combinations. I know the developers of comfy and the manager are working on a solution, but it may take some time to get it integrated. Until then we have to put up with errors like this which are frustrating for everyone involved.

mwoody450 commented 3 days ago

I've tried everything including rolling back pytorch versions; I can't make Depthflow work, though all other node packs seem alright. I'll try it again if a fix is found; thank you for your time.

akatz-ai commented 3 days ago

Just pushed another change #17 that fixes an import issue with importlib_metadata. After this change I was successfully able to get depthflow working in the windows standalone portable version of ComfyUI. Please let me know if this fixes the issue.

slmonker commented 2 days ago

Just pushed another change #17 that fixes an import issue with importlib_metadata. After this change I was successfully able to get depthflow working in the windows standalone portable version of ComfyUI. Please let me know if this fixes the issue.

I reinstall it and failed to import……Pytroch 2.4.1+Cuda12.4 +xformers 0.0.28

akatz-ai commented 2 days ago

My recommendation now would be to try creating a fresh ComfyUI environment and trying to install the node there through the manager. If you are able to get the node installed in a new environment it means there is an issue with your current environment that is preventing Depthflow from installing the correct pip packages.