lllyasviel / lllyasviel/stable-diffusion-webui-forge

Using Lora Causes OOM And Fills Ram

Open
#2,891 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### **Problem**
**(Im talking about Ram Not Video Card Memory/Vram)**

When using Any Lora in Normal SD Caused OOM Or my Ram getting filled up not unloading then i tried forge and its happening here as well.
Normal generation without Lora is fine and it dose not use 90% of my memory and it can generate and unload ram fine.
But as soon as i put Any Kinda of Lora on any Model it will fill 85% to 90% of my ram and crash on generating.

### **What did i try?**
I tried --medvram and --lowvram didn't solve it.
I tried Deleting Venv Folder and reinstalling didn't solve it.
i tried Reinstalling Whole forge and everything didn't solve it.
i tried reinstalling windows didn't solve it.

### **System Spec**
Ram: 16Gb ddr4
Gpu: Rtx 3060 12gb

### **webui-user.bat Settings**
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --no-download-sd-model --opt-split-attention --no-gradio-queue --skip-torch-cuda-test --opt-channelslast --autolaunch --ckpt-dir "D:\Ai\stable-webui\webui\models\Stable-diffusion" --lora-dir "D:\Ai\stable-webui\webui\models\Lora"
set CUDA_LAUNCH_BLOCKING=1
set SAFETENSORS_FAST_GPU=1

call webui.bat

### **Questions**
1.How do i fix it?

2.Are there any solutions for it like going back to a more stable version.

3.what version of forge or stable Dif you recommend me using?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported webui-user.bat settings and reproduce generation with and without a LoRA on the stated 16 GB RAM and RTX 3060 system. Compare memory behavior and determine whether the issue can be isolated to LoRA loading; done means the RAM exhaustion is explained and a verified fix or clear reproducible finding is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.