Comments (7)
You can try this, edit the txt2img.py script.
Look for this code:
def load_model_from_config(config, ckpt, verbose=False):
print(f"Loading model from {ckpt}")
pl_sd = torch.load(ckpt, map_location="cpu")
if "global_step" in pl_sd:
Change it to:
def load_model_from_config(config, ckpt, verbose=False):
print(f"Loading model from {ckpt}")
pl_sd = torch.load(ckpt, map_location="cuda")
if "global_step" in pl_sd:
The difference here is "cuda" instead of "cpu". This will load the model directly to the GPU (vram) instead of loading it to the CPU (system ram) first.
This should reduce the system ram requirement.
from stablediffusion.
Not enough RAM, I believe.
from stablediffusion.
Yes, same error when I used a T4 16Go on GCP.
Same command on a A100 40Go run well.
from stablediffusion.
Thanks for the update! I ordered more RAM for my computer, and I'm hoping once I get it installed it will work for me!
from stablediffusion.
Yeah, seems like need more than 16GB of RAM. A system with 32 GB runs fine.
from stablediffusion.
Can you confirm if adding RAM solved the issue for you? I also have 16gbs of RAM, and a RTX 3090 and it keeps killing the process
from stablediffusion.
Can you confirm if adding RAM solved the issue for you? I also have 16gbs of RAM, and a RTX 3090 and it keeps killing the process
I can confirm this. I used AWS EC2 and changing to the next step higher instance type with more RAM (16->32) solved the issue. Or you can apply the modifications above, since not moving model weights to CPU first and directly to CUDA directly would also help with the issue.
from stablediffusion.
Related Issues (20)
- install failed HOT 2
- Forbidden Embedded
- error when building docker HOT 1
- xformers installs overwrites torch with 2.2.1 HOT 1
- ERROR: Cannot activate python venv, aborting...
- Stable diffusion does not start
- Repo
- Missing imports
- x4-upscaler get very bad results
- Unable to Locate 'imwatermark' Module HOT 1
- ControlNet wot working after update
- RuntimeError: Input type (c10::Half) and bias type (float) should be the same
- FutureWarning: 'resume_download' error
- How to use DDPM to convert a low-resolution image into a high-resolution image?
- [algorithm suggestion] "Foveated" image representation when sampling?
- Generated images
- Switching between Inpaint maked and not masked is broken
- update to 3.0
- English Resume
- English Resume
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 stablediffusion.