Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api for new backend #794

Merged
merged 18 commits into from
May 15, 2024
Merged

api for new backend #794

merged 18 commits into from
May 15, 2024

Conversation

hjchen2
Copy link
Contributor

@hjchen2 hjchen2 commented Apr 9, 2024

No description provided.

@hjchen2 hjchen2 requested review from clackhan, ccssu and chengzeyi April 9, 2024 04:21
@doombeaker
Copy link
Contributor

这个分支里,comfyui 跑不起来了

  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/data/home/yaochi/onediff/ComfyUI/comfy/ops.py", line 20, in <module>
    import comfy.model_management
  File "/data/home/yaochi/onediff/ComfyUI/comfy/model_management.py", line 121, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/data/home/yaochi/onediff/ComfyUI/comfy/model_management.py", line 90, in get_torch_device
    return torch.device(a)
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. oneflow._oneflow_internal.device(arg0: str)
    2. oneflow._oneflow_internal.device(type: str, index: int)
    3. oneflow._oneflow_internal.device(arg0: oneflow._oneflow_internal.device)

Invoked with: 0

表面上直接原因是 mock 机制出了点问题,貌似 fake 的那个 torch_device 没有正常 fake 成功(调用了 torch 的,所以得到了整型而不是字符串)。不过本质上还是因为 oneflow.device 没有和 torch.deice 对齐。

我觉得还是趁这个机会把 flow.device 给修了吧,不再修修补补了,会在这个 issue 里解决:https://github.com/siliconflow/sd-team/issues/350

@hjchen2
Copy link
Contributor Author

hjchen2 commented Apr 9, 2024

这个分支里,comfyui 跑不起来了

  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/data/home/yaochi/onediff/ComfyUI/comfy/ops.py", line 20, in <module>
    import comfy.model_management
  File "/data/home/yaochi/onediff/ComfyUI/comfy/model_management.py", line 121, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/data/home/yaochi/onediff/ComfyUI/comfy/model_management.py", line 90, in get_torch_device
    return torch.device(a)
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. oneflow._oneflow_internal.device(arg0: str)
    2. oneflow._oneflow_internal.device(type: str, index: int)
    3. oneflow._oneflow_internal.device(arg0: oneflow._oneflow_internal.device)

Invoked with: 0

表面上直接原因是 mock 机制出了点问题,貌似 fake 的那个 torch_device 没有正常 fake 成功(调用了 torch 的,所以得到了整型而不是字符串)。不过本质上还是因为 oneflow.device 没有和 torch.deice 对齐。

我觉得还是趁这个机会把 flow.device 给修了吧,不再修修补补了,会在这个 issue 里解决:siliconflow/sd-team#350

应该是有一个文件延迟导入导致的,我看看哈

@hjchen2 hjchen2 force-pushed the dev_integrate_nexfort_backend branch from ede18e7 to 381a38e Compare April 9, 2024 09:11
@hjchen2 hjchen2 force-pushed the dev_integrate_nexfort_backend branch from 381a38e to 29801f6 Compare April 9, 2024 09:50
@hjchen2 hjchen2 force-pushed the dev_integrate_nexfort_backend branch from 5fa9e9f to e025cb0 Compare April 15, 2024 03:01
@strint strint changed the title integrate nexfort api for new backend May 14, 2024
Copy link
Collaborator

@strint strint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@strint strint merged commit c94fd68 into main May 15, 2024
4 of 5 checks passed
@strint strint deleted the dev_integrate_nexfort_backend branch May 15, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants