mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
report errors on non-cuda systems rather than failing silently
This commit is contained in:
parent
617a029ae7
commit
05061a70b3
@ -20,6 +20,7 @@ from contextlib import contextmanager, nullcontext
|
|||||||
import transformers
|
import transformers
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
from ldm.util import instantiate_from_config
|
from ldm.util import instantiate_from_config
|
||||||
from ldm.models.diffusion.ddim import DDIMSampler
|
from ldm.models.diffusion.ddim import DDIMSampler
|
||||||
@ -540,6 +541,9 @@ class T2I:
|
|||||||
# model.to doesn't change the cond_stage_model.device used to move the tokenizer output, so set it here
|
# model.to doesn't change the cond_stage_model.device used to move the tokenizer output, so set it here
|
||||||
self.model.cond_stage_model.device = self.device
|
self.model.cond_stage_model.device = self.device
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
import traceback
|
||||||
|
print('Error loading model. Only the CUDA backend is supported',file=sys.stderr)
|
||||||
|
print(traceback.format_exc(),file=sys.stderr)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
self._set_sampler()
|
self._set_sampler()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user