Merge branch 'development' into development

This commit is contained in:
Peter Baylies 2022-09-10 10:31:32 -04:00 committed by GitHub
commit c6be8f320d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -528,6 +528,12 @@ This will create stable-diffusion folder where you will follow the rest of the s
After these steps, your command prompt will be prefixed by "(ldm)" as shown above.
Note: If necessary, you can update the environment via this command:
```sh
(ldm) ~/stable-diffusion$ conda env update --file environment.yaml
```
6. Load a couple of small machine-learning models required by stable diffusion:
```

View File

@ -78,6 +78,4 @@ class PromptFormatter:
if opt.with_variations:
formatted_variations = ','.join(f'{seed}:{weight}' for seed, weight in opt.with_variations)
switches.append(f'-V{formatted_variations}')
if t2i.full_precision:
switches.append('-F')
return ' '.join(switches)

View File

@ -540,9 +540,6 @@ class Generate:
sd = pl_sd['state_dict']
model = instantiate_from_config(config.model)
m, u = model.load_state_dict(sd, strict=False)
model.to(self.device)
model.eval()
if self.full_precision:
print(
@ -553,6 +550,8 @@ class Generate:
'>> Using half precision math. Call with --full_precision to use more accurate but VRAM-intensive full precision.'
)
model.half()
model.to(self.device)
model.eval()
# usage statistics
toc = time.time()