                  self.write_zipfile(response)
                  break
              except (socket_error, socket_timeout,
                      urllib.error.HTTPError, urllib.error.URLError) as err:
                  if attempt + 1 < attempts:
                      logger.warning("Error downloading model (%s). Retrying %s of %s...",
                                     str(err), attempt + 2, attempts)
                  else:
                      logger.error("Failed to download model. Exiting. (Error: '%s', URL: '%s')",
                                   str(err), self._url_download)
 
</s> remove                                    str(err), attempt + 2, attempts)
 </s> add                                    str(err), attempt + 2, self.retries) </s> remove                 self.write_zipfile(response)
 </s> add                 self.write_zipfile(response, downloaded_size) </s> remove                     logger.info("You can manually download the model from: %s and unzip the "
                                "contents to: %s", self._url_download, self.cache_dir)
 </s> add                     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) </s> remove                 response = urllib.request.urlopen(self._url_download, timeout=10)
 </s> add                 downloaded_size = self._url_partial_size
                req = urllib.request.Request(self._url_download)
                if downloaded_size != 0:
                    req.add_header("Range", "bytes={}-".format(downloaded_size))
                response = urllib.request.urlopen(req, timeout=10) </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):
                if attempt + 1 < self.retries:
                  self.write_zipfile(response)
                  break
              except (socket_error, socket_timeout,
                      urllib.error.HTTPError, urllib.error.URLError) as err:
                if attempt + 1 < self.retries:
                      logger.warning("Error downloading model (%s). Retrying %s of %s...",
                                     str(err), attempt + 2, attempts)
                  else:
                      logger.error("Failed to download model. Exiting. (Error: '%s', URL: '%s')",
                                   str(err), self._url_download)
keep keep keep keep 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