Comments (6)
Hi @milochen0418 great this is a great point. I am just about to submit a PR that will also allow you to run this with only a CPU on a mac. It will take about 4/5 minutes per image if running on a cpu only and running for 30 inference steps.
To speed this up further you can make the image smaller, by changing the width parameter in image_style inside of styles.py, or you can reduce the number of inference steps further.
Hope this helps.
from reflex-examples.
Some question related to this issue
https://stackoverflow.com/questions/72313510/runtimeerror-the-mps-backend-is-supported-on-macos-12-3-current-os-version-can
from reflex-examples.
More reference
oobabooga/text-generation-webui#1337
from reflex-examples.
After click Generate New Image, it will use img2img_mac.py
Right now, the current code only support mps
Apple Metal Performance Shaders (MPS)
The MPS backend extends the PyTorch framework by providing scripts and capabilities to set up and run operations on Mac. MPS optimizes compute performance with kernels that are fine-tuned for the unique characteristics of each Metal GPU family.
Hi @tgberkeley , Is it possible to run on the CPU?
from reflex-examples.
Hi @milochen0418 great this is a great point. I am just about to submit a PR that will also allow you to run this with only a CPU on a mac. It will take about 4/5 minutes per image if running on a cpu only and running for 30 inference steps.
To speed this up further you can make the image smaller, by changing the width parameter in image_style inside of styles.py, or you can reduce the number of inference steps further. Hope this helps.
Hi @tgberkeley,
You are so nice.
It's wonderful to have your code. Let everyone enjoy the stable diffusion of pynecone app.
It works on my old Mac with CPU only from this PR
And the following is my testing result
You say it takes 0.8 minutes for 30 inference steps.
In my case, I set Number of inference steps
as 100 and Strength of diffusion
as 70 in the running app.
Does that mean it needs 100*70 inference steps?
Is my understanding correct?
Thanks
from reflex-examples.
Bug solved by
from reflex-examples.
Related Issues (20)
- nba example: all UI function failed after clicking Menu -> 20Dataset (0.1.33)
- nba example: loading time is too long (>3min) when first time to run (0.1.33) HOT 1
- gpt example: the link Sign Out disappear (0.1.33) HOT 1
- upload exmaple: click upload button will block everything if there is no any selected file (0.1.33) HOT 2
- Error: Hydration failed because the initial UI does not match what was rendered on the server. HOT 1
- stable_diffusion example: pc run failed on on Mac (0.1.33) HOT 1
- counter example: reflex (0.1.34) run failed for the first version of reflex counter HOT 3
- counter example: reflex don't support rx command after install reflex 0.1.34 HOT 2
- Update all examples with forms to use `rx.form` and `on_submit` handler
- nba: pagination doesn't reset when filtering the table HOT 1
- Unable to launch app using reflex run, failing on bun installation
- Example Clock bug : the hour value is 0 at noon
- Fix all examples that yield/return events incorrectly
- rx.button color disapper when page reload
- Update Qr-Scanner example for 0.2.8 HOT 1
- Managing multiple states using redux like tool
- Axis titles not showing up in rx.plotly component
- GPT example should not need OPENAI_API_KEY at export time. HOT 2
- counter example: why response is slow, when click really fast, the counter takes seconds to catch up HOT 2
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 reflex-examples.