Remove onnx changes from canvas img2img, inpaint, and linear image2image

This commit is contained in:
Brandon Rising
2023-07-27 10:08:45 -04:00
parent d2a46b4308
commit 989d3d7f3c
5 changed files with 33 additions and 50 deletions

View File

@ -458,6 +458,7 @@ class Generator:
dtype=samples.dtype,
device=samples.device,
)
latent_image = samples[0].permute(1, 2, 0) @ v1_5_latent_rgb_factors
latents_ubyte = (
((latent_image + 1) / 2)

View File

@ -267,18 +267,16 @@ class DiffusersModel(ModelBase):
try:
# TODO: set cache_dir to /dev/null to be sure that cache not used?
model = self.child_types[child_type].from_pretrained(
os.path.join(self.model_path, child_type.value),
#subfolder=child_type.value,
self.model_path,
subfolder=child_type.value,
torch_dtype=torch_dtype,
variant=variant,
local_files_only=True,
)
break
except Exception as e:
print("====ERR LOAD====")
print(f"{variant}: {e}")
import traceback
traceback.print_exc()
# print("====ERR LOAD====")
# print(f"{variant}: {e}")
pass
else:
raise Exception(f"Failed to load {self.base_model}:{self.model_type}:{child_type} model")