diff --git a/README.md b/README.md index 8e7e60e..7938b36 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ Differences may be less or more pronounced for different inputs. Please see the
- Q3: My Mac has 8GB RAM and I am converting models to Core ML using the example command. The process is geting killed because of memory issues. How do I fix this issue? + Q3: My Mac has 8GB RAM and I am converting models to Core ML using the example command. The process is getting killed because of memory issues. How do I fix this issue? A3: In order to minimize the memory impact of the model conversion process, please execute the following command instead: @@ -291,7 +291,7 @@ python -m python_coreml_stable_diffusion.torch2coreml --convert-unet --chunk-une 4. Weights and Activations Data Type - When quantizing models from float32 to lower-precision data types such as float16, the generated images are [known to vary slightly](https://lambdalabs.com/blog/inference-benchmark-stable-diffusion) in semantics even when using the same PyTorch model. Core ML models generated by coremltools have float16 weights and activations by default [unless explicitly overriden](https://github.com/apple/coremltools/blob/main/coremltools/converters/_converters_entry.py#L256). This is not expected to be a major source of difference. + When quantizing models from float32 to lower-precision data types such as float16, the generated images are [known to vary slightly](https://lambdalabs.com/blog/inference-benchmark-stable-diffusion) in semantics even when using the same PyTorch model. Core ML models generated by coremltools have float16 weights and activations by default [unless explicitly overridden](https://github.com/apple/coremltools/blob/main/coremltools/converters/_converters_entry.py#L256). This is not expected to be a major source of difference.
diff --git a/python_coreml_stable_diffusion/torch2coreml.py b/python_coreml_stable_diffusion/torch2coreml.py index f079d00..6d6c2fa 100644 --- a/python_coreml_stable_diffusion/torch2coreml.py +++ b/python_coreml_stable_diffusion/torch2coreml.py @@ -576,7 +576,7 @@ def convert_unet(pipe, args): # Set the output descriptions coreml_unet.output_description["noise_pred"] = \ "Same shape and dtype as the `sample` input. " \ - "The predicted noise to faciliate the reverse diffusion (denoising) process" + "The predicted noise to facilitate the reverse diffusion (denoising) process" _save_mlpackage(coreml_unet, out_path) logger.info(f"Saved unet into {out_path}") diff --git a/swift/StableDiffusion/pipeline/StableDiffusionPipeline+Resources.swift b/swift/StableDiffusion/pipeline/StableDiffusionPipeline+Resources.swift index 19c8bcf..4aad5bb 100644 --- a/swift/StableDiffusion/pipeline/StableDiffusionPipeline+Resources.swift +++ b/swift/StableDiffusion/pipeline/StableDiffusionPipeline+Resources.swift @@ -59,7 +59,7 @@ public extension StableDiffusionPipeline { safetyChecker = SafetyChecker(model: checkerModel) } - // Construct pipelien + // Construct pipeline self.init(textEncoder: textEncoder, unet: unet, decoder: decoder, diff --git a/tests/test_stable_diffusion.py b/tests/test_stable_diffusion.py index b5e79dc..a2e42a1 100644 --- a/tests/test_stable_diffusion.py +++ b/tests/test_stable_diffusion.py @@ -74,23 +74,23 @@ class TestStableDiffusionForTextToImage(unittest.TestCase): with self.subTest(model="vae_decoder"): logger.info("Converting vae_decoder") torch2coreml.convert_vae_decoder(self.pytorch_pipe, self.cli_args) - logger.info("Successfuly converted vae_decoder") + logger.info("Successfully converted vae_decoder") with self.subTest(model="unet"): logger.info("Converting unet") torch2coreml.convert_unet(self.pytorch_pipe, self.cli_args) - logger.info("Successfuly converted unet") + logger.info("Successfully converted unet") with self.subTest(model="text_encoder"): logger.info("Converting text_encoder") torch2coreml.convert_text_encoder(self.pytorch_pipe, self.cli_args) - logger.info("Successfuly converted text_encoder") + logger.info("Successfully converted text_encoder") with self.subTest(model="safety_checker"): logger.info("Converting safety_checker") torch2coreml.convert_safety_checker(self.pytorch_pipe, self.cli_args) - logger.info("Successfuly converted safety_checker") + logger.info("Successfully converted safety_checker") def test_end_to_end_image_generation_speed(self): """ Tests: