from os.path import basename
from diffusers import StableDiffusionPipeline
from diffusers.utils import logging
-from torch import Generator
+from torch import Generator, float16
from exiftool import ExifToolHelper # type: ignore
SAFETY_CHECKER_WARNING_PATTERN = 'You have disabled the safety checker'
FilterOut(SAFETY_CHECKER_WARNING_PATTERN))
captureWarnings(True)
logging.disable_progress_bar()
- self.pipe = StableDiffusionPipeline.from_single_file(
- model_path, local_files_only=True)
+ self.pipe = StableDiffusionPipeline.from_single_file(model_path, torch_dtype=float16,
+ local_files_only=True)
self.pipe.to('cuda')
self.generator = Generator()
print('PIPELINE READY\n')