Add DirectML support#177
Add DirectML support#177Looong01 wants to merge 2 commits intochenfei-wu:dependabot/pip/torch-1.13.1from
Conversation
|
@microsoft-github-policy-service agree |
486465f to
ad394e1
Compare
|
Awesome. Really need this |
visual_chatgpt.py
Outdated
| def __init__(self, device): | ||
| print("Initializing ScribbleText2Image to %s" % device) | ||
| self.torch_dtype = torch.float16 if 'cuda' in device else torch.float32 | ||
| if isinstance(device, str): |
There was a problem hiding this comment.
you can refractor these duplicate lines into a function
def get_touch_dtype(device):
if isinstance(device, str):
torch_dtype = torch.float16 if 'cuda' in device else torch.float32
else:
torch_dtype = torch.float32
return torch_dtype
ezioruan
left a comment
There was a problem hiding this comment.
Thank you for adding this amazing feature. There is some high code repetition inside, it would be even better if it could be addressed.
Revised. |
Hey, would you like to merge these codes? I have revised my codes under your criterion. |
I don't have the permission to do that, maybe ask the project owner |
|
@shengming-yin @BinayakJha @chenfei-wu Could you please merge this branch? This can help the users run it on Windows with AMD & Intel GPUs. |
|
@Wang-Xiaodong1899 @CODINNLG @rupeshs @bojieli @heysujal @WeizhenQ Could you please merge this branch? This can help the users run it on Windows with AMD & Intel GPUs. |
Hi , sorry but I am not the maintainer of the project |
You can create a new branch to save this.