-
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
A few small quality of life changes #44
Conversation
I see #43 also adds a gitignore with a few differences. Can harmonize this PR with 43, or you can choose 43's gitignore. |
I tested this PR since I cannot run original code from my Macbook pro because of cuda device, i tested with the option you added note: I have configured a virtual environment with pipenv, not using conda. |
I missed some hardcoded cuda sections. Fixed those, but the k_diffusion package still appears to have them. This should allow users with multiple GPUs to pick which GPU to use by setting device if they are not using k_lms. This doesn't appear to allow CPU generation, though, I get a |
Thanks for the PR! IMO there's more community need for folding in the basunjindal VRAM optimizations than getting the thing to run on CPU (tho' that would be nice). If someone out there wants to work on an optimization port in a way that lets the user select whether or not to use them, I'd be totally grateful. Also, as a heads up, I'm about to do two things:
Lastly, I was playing around with the hugging face Diffusion modules last night and they're really elegant! I am strongly tempted to base a new version of dream.py on the HF libraries. Do they have (or plan to have) the features that the community has been pasting into the various CompViz derivatives (including this one) such as textual inversion and support for all the k_* samplers? |
I agree. Setting the device was more about allowing users to pick which GPU to run it on if they have two, and I was hoping it would also just work on CPU since PyTorch-CPU is more mature than ROCm or MIPs. |
Issue #69 reports img2img reporting dying with an error message about not knowing which GPU device to use. When I check img2img myself, I'm getting "sqrt" "_vml_cpu" not implemented for 'Half' . I suspect these problems are related to your PR? I appreciate your looking into it. |
…ith the message 'sqrt _vml_cpu not implemented for 'Half'
I was able to fix the sqrt error message by backing out the changes to ddim.py, lines 20-23. Still do not have confirmation on issue #69. |
I thought I had chased down all the orphan device settings that were not respecting the Lightning model's device. But I clearly missed some. Looking into it. |
I see you beat me to resolving it using a similar method to my approach. |
…to fail with the message 'sqrt _vml_cpu not implemented for 'Half'
A few small quality of life changes:
so should run on CPU with bfloat16 accelerated ops if device='cpu'Changes tested and working with text2img.