Prevent config script from trying to set vram on macs (#4412)

## What type of PR is this? (check all applicable)

- [X] Bug Fix

## Have you discussed this change with the InvokeAI team?
- [X] Yes
      
## Have you updated all relevant documentation?
- [X] Yes


## Description

Running the config script on Macs triggered an error due to absence of
VRAM on these machines! VRAM setting is now skipped.

## Added/updated tests?

- [ ] Yes
- [X] No : Will add this test in the near future.
This commit is contained in:
Lincoln Stein 2023-09-05 07:15:30 -04:00 committed by GitHub
commit ba2ce72584
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -507,7 +507,7 @@ Use cursor arrows to make a checkbox selection, and space to toggle.
scroll_exit=True, scroll_exit=True,
) )
else: else:
self.vram_cache_size = DummyWidgetValue.zero self.vram = DummyWidgetValue.zero
self.nextrely += 1 self.nextrely += 1
self.outdir = self.add_widget_intelligent( self.outdir = self.add_widget_intelligent(
FileBox, FileBox,
@ -605,7 +605,8 @@ https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENS
"vram", "vram",
"outdir", "outdir",
]: ]:
setattr(new_opts, attr, getattr(self, attr).value) if hasattr(self, attr):
setattr(new_opts, attr, getattr(self, attr).value)
for attr in self.autoimport_dirs: for attr in self.autoimport_dirs:
directory = Path(self.autoimport_dirs[attr].value) directory = Path(self.autoimport_dirs[attr].value)