  from lib.faces_detect import DetectedFace
  from lib.gpu_stats import GPUStats
  from lib.multithreading import MultiThread, PoolProcess, total_cpus
  from lib.queue_manager import queue_manager, QueueEmpty
  from lib.utils import get_folder, get_image_paths, hash_image_file
  from plugins.extract.pipeline import Extractor
  from plugins.plugin_loader import PluginLoader
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
 
</s> remove         # queue_manager.debug_monitor(3)
        self.convert_images()
        self.disk_io.save_thread.join()
        queue_manager.terminate_queues()

        Utils.finalize(self.images.images_found,
                       self.predictor.faces_count,
                       self.predictor.verify_output)
        logger.debug("Completed Conversion")
 </s> add         queue_manager.debug_monitor(5)
        try:
            self.convert_images()
            self.disk_io.save_thread.join()
            queue_manager.terminate_queues()

            Utils.finalize(self.images.images_found,
                           self.predictor.faces_count,
                           self.predictor.verify_output)
            logger.debug("Completed Conversion")
        except MemoryError as err:
            msg = ("Faceswap ran out of RAM running convert. Conversion is very system RAM "
                   "heavy, so this can happen in certain circumstances when you have a lot of "
                   "cpus but not enough RAM to support them all."
                   "\nYou should lower the number of processes in use by either setting the "
                   "'singleprocess' flag (-sp) or lowering the number of parallel jobs (-j).")
            raise FaceswapError(msg) from err </s> remove             retval = total_cpus() * 2
 </s> add             retval = 32 </s> remove             retval = 2
 </s> add             retval = 16 </s> remove         """ Set q-size to double number of cpus available """
 </s> add         """ Set 16 for singleprocess otherwise 32 """
from lib.utils import FaceswapError, get_folder, get_image_paths, hash_image_file
  from lib.faces_detect import DetectedFace
  from lib.gpu_stats import GPUStats
  from lib.multithreading import MultiThread, PoolProcess, total_cpus
  from lib.queue_manager import queue_manager, QueueEmpty
from lib.utils import FaceswapError, get_folder, get_image_paths, hash_image_file
  from plugins.extract.pipeline import Extractor
  from plugins.plugin_loader import PluginLoader
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
keep keep keep keep replace keep keep keep keep keep
 Add jobs parameter to convert for limiting parallel processes 
scripts/convert.py