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

LLM_local: Separate device and dtype in the node #13

Closed
bigcat88 opened this issue May 12, 2024 · 2 comments
Closed

LLM_local: Separate device and dtype in the node #13

bigcat88 opened this issue May 12, 2024 · 2 comments

Comments

@bigcat88
Copy link
Contributor

bigcat88 commented May 12, 2024

elif device == "cuda-fp16":
    qwen_device = "cuda"
    qwen_model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True).half().cuda()

Can we also separate device and tensor type(dtype)?

This is screen from the SUPIR node:

image

Otherwise you will have to make a huge list like:

cuda-fp32
cuda-bf16
cuda-fp16
cuda-fp8

mps-fp32
mps-bf16
mps-fp16

and so on probably for other Hardware Accelerators(like xpu) too.

Selecting separatly device and DType will be the best option, imho.

Also usually Node should use that device that is used by ComfyUI - maybe we can add an "auto" option for device and set it as default one.

@heshengtao
Copy link
Owner

That makes sense, it should indeed be separated. I’ll make the change when I have time. Thank you for your suggestion!

@heshengtao
Copy link
Owner

Solved!

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

No branches or pull requests

2 participants