mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix issue with embeddings being loaded twice
- as noted by JPPhoto
This commit is contained in:
parent
9536ba22af
commit
5ac0316c62
@ -1229,15 +1229,15 @@ def load_pipeline_from_original_stable_diffusion_ckpt(
|
|||||||
# If a replacement VAE path was specified, we'll incorporate that into
|
# If a replacement VAE path was specified, we'll incorporate that into
|
||||||
# the checkpoint model and then convert it
|
# the checkpoint model and then convert it
|
||||||
if vae_path:
|
if vae_path:
|
||||||
print(f" | Converting VAE {vae_path}")
|
print(f" | Converting VAE {vae_path}")
|
||||||
replace_checkpoint_vae(checkpoint,vae_path)
|
replace_checkpoint_vae(checkpoint,vae_path)
|
||||||
# otherwise we use the original VAE, provided that
|
# otherwise we use the original VAE, provided that
|
||||||
# an externally loaded diffusers VAE was not passed
|
# an externally loaded diffusers VAE was not passed
|
||||||
elif not vae:
|
elif not vae:
|
||||||
print(" | Using checkpoint model's original VAE")
|
print(" | Using checkpoint model's original VAE")
|
||||||
|
|
||||||
if vae:
|
if vae:
|
||||||
print(" | Using replacement diffusers VAE")
|
print(" | Using replacement diffusers VAE")
|
||||||
else: # convert the original or replacement VAE
|
else: # convert the original or replacement VAE
|
||||||
vae_config = create_vae_diffusers_config(
|
vae_config = create_vae_diffusers_config(
|
||||||
original_config, image_size=image_size
|
original_config, image_size=image_size
|
||||||
|
@ -434,7 +434,6 @@ class ModelManager(object):
|
|||||||
height = width
|
height = width
|
||||||
print(f" | Default image dimensions = {width} x {height}")
|
print(f" | Default image dimensions = {width} x {height}")
|
||||||
|
|
||||||
self._add_embeddings_to_model(pipeline)
|
|
||||||
return pipeline, width, height, model_hash
|
return pipeline, width, height, model_hash
|
||||||
|
|
||||||
def _load_ckpt_model(self, model_name, mconfig):
|
def _load_ckpt_model(self, model_name, mconfig):
|
||||||
@ -476,7 +475,6 @@ class ModelManager(object):
|
|||||||
pipeline.enable_offload_submodels(self.device)
|
pipeline.enable_offload_submodels(self.device)
|
||||||
else:
|
else:
|
||||||
pipeline.to(self.device)
|
pipeline.to(self.device)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
pipeline,
|
pipeline,
|
||||||
width,
|
width,
|
||||||
|
Loading…
Reference in New Issue
Block a user