File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
python_coreml_stable_diffusion Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import argparse
7
7
8
+ from diffusers import StableDiffusionPipeline , StableDiffusionXLPipeline
8
9
from diffusers .pipelines .pipeline_utils import DiffusionPipeline
9
10
from diffusers .pipelines .stable_diffusion import StableDiffusionPipelineOutput
10
11
from diffusers .schedulers import (
@@ -517,7 +518,7 @@ def __call__(
517
518
control_net_additional_residuals = {}
518
519
519
520
# predict the noise residual
520
- unet_additional_kwargs = unet_additional_kwargs | control_net_additional_residuals
521
+ unet_additional_kwargs . update ( control_net_additional_residuals )
521
522
522
523
noise_pred = self .unet (
523
524
sample = latent_model_input .astype (np .float16 ),
@@ -697,7 +698,6 @@ def main(args):
697
698
698
699
logger .info ("Initializing PyTorch pipe for reference configuration" )
699
700
700
- from diffusers import StableDiffusionPipeline , StableDiffusionXLPipeline
701
701
SDP = StableDiffusionXLPipeline if 'xl' in args .model_version else StableDiffusionPipeline
702
702
703
703
pytorch_pipe = SDP .from_pretrained (
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ def convert_vae_decoder(pipe, args):
480
480
1 , # B
481
481
pipe .vae .config .latent_channels , # C
482
482
args .latent_h or pipe .unet .config .sample_size , # H
483
- args .latent_w or pipe .unet .config .sample_size , # w
483
+ args .latent_w or pipe .unet .config .sample_size , # W
484
484
)
485
485
486
486
if args .custom_vae_version is None and args .xl_version :
You can’t perform that action at this time.
0 commit comments