-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
changes to get dream.py working on M1 #268
Conversation
Thanks! Confirmed it works for me. (Clean install, M1 Max MBP, miniforge environment) |
- move all device init logic to T2I.__init__ - handle m1 specific edge case with autocast device type - check torch.cuda.is_available before using cuda
@Birch-san's k-diffusion prevents dream.py runs w/o crashing but produces black images, probably because of k-difusion. |
Try this: |
I confirm this works out of the box, for some reason I could make it work by just running |
I have it working now. I'll add some information to the README-Mac to address the hang. The seed isn't repeatable but I didn't see a quick and easy fix and so I say we just commit this. I'm afraid if it sticks around for long that, at least for me, it will get even more confusing because everything is moving so fast. I'm not sure how to get it merged though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get to leave a review. I should've put that comment here. So I will copy-paste it.
I have it working now. I'll add some information to the README-Mac to address the hang. The seed isn't repeatable but I didn't see a quick and easy fix and so I say we just commit this. I'm afraid if it sticks around for long that, at least for me, it will get even more confusing because everything is moving so fast. I'm not sure how to get it merged though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job everyone. This was a bear!
Crashes on CUDA systems during image generation with "expected scalar type Half but found Float". The problem is this line in choose_autocast_device():
Since the device can't be both cuda and cpu, this will always return "cpu". The fix is trivial, and I'll take care of it, but the take-home message is to always run the thing to make sure it is working! (I don't always follow that advice myself, so I know how it is). |
@lstein I only have a 2GB CUDA capable GPU and it's currently not installed in anything. It was easier for me to use my Mac :) However, I've actually been thinking of setting up GitHub actions. I don't think they provide GPU's though. Maybe they will because this is such a cool project. |
doh! should have been |
Besides these changes, there is still an open question about what to do will the requirement to useThis is now addressed in the second commit.--full_precision
for M1. See discussion here for details: #237