additional python 3.12 compatibility

This commit is contained in:
Vladimir Mandic
2024-06-08 14:14:48 -04:00
parent d4fead09a6
commit 6d6f1de295
7 changed files with 9 additions and 6 deletions
-1
View File
@@ -28,7 +28,6 @@ class UpscalerSD(Upscaler):
shared.log.debug(f"Upscaler cached: type={scaler.name} model={path}")
return self.models[path]
else:
devices.set_cuda_params()
model = diffusers.DiffusionPipeline.from_pretrained(path, cache_dir=shared.opts.diffusers_dir, torch_dtype=devices.dtype)
if hasattr(model, "set_progress_bar_config"):
model.set_progress_bar_config(bar_format='Progress {rate_fmt}{postfix} {bar} {percentage:3.0f}% {n_fmt}/{total_fmt} {elapsed} {remaining} ' + '\x1b[38;5;71m' + 'Upscale', ncols=80, colour='#327fba')