                                     str(err), attempt + 2, attempts)
                  else:
                      logger.error("Failed to download model. Exiting. (Error: '%s', URL: '%s')",
                                   str(err), self._url_download)
                      logger.info("You can manually download the model from: %s and unzip the "
                                  "contents to: %s", self._url_download, self.cache_dir)
                      exit(1)
  
      def write_zipfile(self, response):
          """ Write the model zip file to disk """
          length = int(response.getheader("content-length"))
 
</s> remove                                    str(err), attempt + 2, attempts)
 </s> add                                    str(err), attempt + 2, self.retries) </s> remove     def write_zipfile(self, response):
 </s> add     def write_zipfile(self, response, downloaded_size): </s> remove                 if attempt + 1 < attempts:
 </s> add                 if attempt + 1 < self.retries: </s> remove         length = int(response.getheader("content-length"))
        with open(self._model_zip_path, "wb") as out_file:
 </s> add         length = int(response.getheader("content-length")) + downloaded_size
        if length == downloaded_size:
            logger.info("Zip already exists. Skipping download")
            return
        write_type = "wb" if downloaded_size == 0 else "ab"
        with open(self._model_zip_path, write_type) as out_file: </s> remove         logger.info("Downloading model: '%s'", self._model_name)
        attempts = 3
        for attempt in range(attempts):
 </s> add         logger.info("Downloading model: '%s' from: %s", self._model_name, self._url_download)
        for attempt in range(self.retries):
                    logger.info("You can try running again to resume the download.")
                    logger.info("Alternatively, you can manually download the model from: %s and "
                                "unzip the contents to: %s", self._url_download, self.cache_dir)
                                     str(err), attempt + 2, attempts)
                  else:
                      logger.error("Failed to download model. Exiting. (Error: '%s', URL: '%s')",
                                   str(err), self._url_download)
                    logger.info("You can try running again to resume the download.")
                    logger.info("Alternatively, you can manually download the model from: %s and "
                                "unzip the contents to: %s", self._url_download, self.cache_dir)
                    logger.info("You can try running again to resume the download.")
                    logger.info("Alternatively, you can manually download the model from: %s and "
                                "unzip the contents to: %s", self._url_download, self.cache_dir)
                      exit(1)
  
      def write_zipfile(self, response):
          """ Write the model zip file to disk """
          length = int(response.getheader("content-length"))
keep keep keep keep replace replace keep keep keep keep keep
 Face filter vgg face (#724)

* Implement extraction pipeline

* Face filter to vgg_face. Resume partial model downloads

* On-the-fly conversion to extraction pipeline

* Move git model ids from get_model to model definition 
lib/utils.py