mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
print status message at startup when xformers is available
This commit is contained in:
parent
371edc993a
commit
b9cc56593e
@ -20,6 +20,7 @@ import torch
|
|||||||
import transformers
|
import transformers
|
||||||
from PIL import Image, ImageOps
|
from PIL import Image, ImageOps
|
||||||
from diffusers.pipeline_utils import DiffusionPipeline
|
from diffusers.pipeline_utils import DiffusionPipeline
|
||||||
|
from diffusers.utils.import_utils import is_xformers_available
|
||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from pytorch_lightning import seed_everything, logging
|
from pytorch_lightning import seed_everything, logging
|
||||||
|
|
||||||
@ -203,6 +204,14 @@ class Generate:
|
|||||||
self.precision = choose_precision(self.device)
|
self.precision = choose_precision(self.device)
|
||||||
Globals.full_precision = self.precision=='float32'
|
Globals.full_precision = self.precision=='float32'
|
||||||
|
|
||||||
|
if is_xformers_available():
|
||||||
|
if not Globals.disable_xformers:
|
||||||
|
print('>> xformers memory-efficient attention is available and enabled')
|
||||||
|
else:
|
||||||
|
print('>> xformers memory-efficient attention is available but disabled')
|
||||||
|
else:
|
||||||
|
print('>> xformers not installed')
|
||||||
|
|
||||||
# model caching system for fast switching
|
# model caching system for fast switching
|
||||||
self.model_manager = ModelManager(mconfig,self.device,self.precision,max_loaded_models=max_loaded_models)
|
self.model_manager = ModelManager(mconfig,self.device,self.precision,max_loaded_models=max_loaded_models)
|
||||||
# don't accept invalid models
|
# don't accept invalid models
|
||||||
|
Loading…
x
Reference in New Issue
Block a user