Support for 6gb cards
This commit is contained in:
parent
ed4d5f6c1b
commit
dafa2c16bf
11
README.md
11
README.md
|
@ -24,8 +24,9 @@ c. Create a write token/Copy an existing Token key and enter in the cmd window.
|
|||
5. You can find output files in .\\data\\out\\%Timestamp% folder. Jpeg contain commentaries in metadata with some settings used while generating.
|
||||
|
||||
## Requirements
|
||||
* 11GB of free space.
|
||||
* Nvidia card with 8GB+ video memory.
|
||||
* Currently min dalle can run in 6gb. Testing purpose
|
||||
## Additional info
|
||||
Tested on RTX3070. One picture was making 12 - 14 seconds.
|
||||
* 10GB of free space.
|
||||
* Nvidia card with 6GB+ video memory.
|
||||
|
||||
## Tests
|
||||
RTX3070: 12 - 14 seconds per picture.
|
||||
RTX2060_Laptop: 21 - 25 seconds per picture.
|
|
@ -20,9 +20,9 @@ from diffusers import (
|
|||
from diffusers import StableDiffusionImg2ImgPipeline
|
||||
|
||||
t = torch.cuda.get_device_properties(0).total_memory
|
||||
if t <=8500000000:
|
||||
print("Not enough GPU memory to generate pictures")
|
||||
else:
|
||||
if t<=6400000000:
|
||||
print("Running with less than 6gb memory. Working is not garanted")
|
||||
|
||||
file1 = open("prompt.txt","r+")
|
||||
text = file1.read()
|
||||
print(text)
|
||||
|
@ -43,7 +43,8 @@ else:
|
|||
torch_dtype=torch.float16,
|
||||
use_auth_token=True
|
||||
).to(device)
|
||||
if t <= 10500000000:
|
||||
if t <= 11000000000:
|
||||
print("Less then 11gb video memory. Running with attention slicing.")
|
||||
pipe.enable_attention_slicing()
|
||||
|
||||
def dummy_checker(images, **kwargs):
|
||||
|
@ -85,7 +86,7 @@ else:
|
|||
|
||||
counterr=0
|
||||
allwork=0
|
||||
directory="./data/out/" + strftime("%Y-%m-%d_%H-%M-%S", gmtime()) + "/"
|
||||
directory="./data/out/" + strftime("%Y-%m-%d_%H-%M-%S") + "/"
|
||||
if not os.path.exists(directory):
|
||||
os.makedirs(directory)
|
||||
with open(directory+"prompt.txt", 'w') as f:
|
||||
|
|
Loading…
Reference in New Issue