Comments (2)
Unfortunately I don't have an M1 Mac to test, but I believe you just have to change all the "cuda" device references in generate.py
to "mps". That would be on lines 42, 70, 84, 105.
I actually just updated the repo and removed another CUDA reference, so make sure you pull the latest commit. Hope that helps!
from stable-karlo.
Unfortunately still breaks. Honestly I think this might be an issue with Karlo on MPS, as I remember having this problem on the command line too. I replaced "cuda" with "mps" in the generator file (removed "torch.cuda.empty_cache()" as mps doesn't have an equivalent to this, but it threw the same error either way:
Fetching 20 files: 100%|█████████████████████| 20/20 [00:00<00:00, 17494.49it/s] /Users/jackwooldridge/StableDiffusion/stable-karlo/.env/lib/python3.9/site-packages/diffusers/pipelines/unclip/pipeline_unclip.py:144: UserWarning: The operator 'aten::repeat_interleave.self_int' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/mps/MPSFallback.mm:11.) text_embeddings = text_embeddings.repeat_interleave(num_images_per_prompt, dim=0) 100%|███████████████████████████████████████████| 25/25 [00:13<00:00, 1.86it/s] Assertion failed: (vals.isSplat()), function getConstantValue, file CommonRuntimeUtils.h, line 58. zsh: abort streamlit run app.py (.env) (base) jackwooldridge@Jacks-MBP stable-karlo % /Users/jackwooldridge/miniconda3/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d
I remember managing to get the diffusers version running on the cpu (switching the dtype away from half/float16) but couldn't get it to render anything but garbled noise. No pressure to fix this, as I don't think it's an easy lift.
from stable-karlo.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-karlo.