Error converting (bad object header version number)

Converting source frames into swapped frames
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
Locked
User avatar
Antipope1
Posts: 33
Joined: Thu Jul 02, 2020 10:51 am
Has thanked: 6 times
Been thanked: 2 times

Error converting (bad object header version number)

Post by Antipope1 »

I tried to convert this evening and kept getting this error.

Code: Select all

1 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.dfl_sae
 2 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: dlight_defaults.py, module_path: plugins.train.model, plugin_type: model
 3 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.model.dlight_defaults
 4 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'model.dlight', info: 'A lightweight, high resolution Dfaker variant (Adapted from https://github.com/dfaker/df)\nNB: Unless specifically stated, values changed here will only take effect when creating a new model.')
 5 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.dlight', title: 'features', datatype: '<class 'str'>', default: 'best', info: 'Higher settings will allow learning more features such as tatoos, piercing,\nand wrinkles.\nStrongly affects VRAM usage.', rounding: 'None', min_max: None, choices: ['lowmem', 'fair', 'best'], gui_radio: True, fixed: True, group: None)
 6 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.dlight', title: 'details', datatype: '<class 'str'>', default: 'good', info: 'Defines detail fidelity. Lower setting can appear 'rugged' while 'good' might take onger time to train.\nAffects VRAM usage.', rounding: 'None', min_max: None, choices: ['fast', 'good'], gui_radio: True, fixed: True, group: None)
 7 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.dlight', title: 'output_size', datatype: '<class 'int'>', default: '256', info: 'Output image resolution (in pixels).\nBe aware that larger resolution will increase VRAM requirements.\nNB: Must be either 128, 256, or 384.', rounding: '128', min_max: (128, 384), choices: [], gui_radio: False, fixed: True, group: None)
 8 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.dlight
 9 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: original_defaults.py, module_path: plugins.train.model, plugin_type: model
 10 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.model.original_defaults
 11 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'model.original', info: 'Original Faceswap Model.\nNB: Unless specifically stated, values changed here will only take effect when creating a new model.')
 12 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.original', title: 'lowmem', datatype: '<class 'bool'>', default: 'False', info: 'Lower memory mode. Set to 'True' if having issues with VRAM useage.\nNB: Models with a changed lowmem mode are not compatible with each other.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
 13 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.original
 14 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: realface_defaults.py, module_path: plugins.train.model, plugin_type: model
 15 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.model.realface_defaults
 16 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'model.realface', info: 'An extra detailed variant of Original model.\nIncorporates ideas from Bryanlyon and inspiration from the Villain model.\nRequires about 6GB-8GB of VRAM (batchsize 8-16).\n\nNB: Unless specifically stated, values changed here will only take effect when creating a new model.')
 17 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.realface', title: 'input_size', datatype: '<class 'int'>', default: '64', info: 'Resolution (in pixels) of the input image to train on.\nBE AWARE Larger resolution will dramatically increase VRAM requirements.\nHigher resolutions may increase prediction accuracy, but does not effect the resulting output size.\nMust be between 64 and 128 and be divisible by 16.', rounding: '16', min_max: (64, 128), choices: [], gui_radio: False, fixed: True, group: size)
 18 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.realface', title: 'output_size', datatype: '<class 'int'>', default: '128', info: 'Output image resolution (in pixels).\nBe aware that larger resolution will increase VRAM requirements.\nNB: Must be between 64 and 256 and be divisible by 16.', rounding: '16', min_max: (64, 256), choices: [], gui_radio: False, fixed: True, group: size)
 19 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.realface', title: 'dense_nodes', datatype: '<class 'int'>', default: '1536', info: 'Number of nodes for decoder. Might affect your model's ability to learn in general.\nNote that: Lower values will affect the ability to predict details.', rounding: '64', min_max: (768, 2048), choices: [], gui_radio: False, fixed: True, group: network)
 20 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.realface', title: 'complexity_encoder', datatype: '<class 'int'>', default: '128', info: 'Encoder Convolution Layer Complexity. sensible ranges: 128 to 150.', rounding: '4', min_max: (96, 160), choices: [], gui_radio: False, fixed: True, group: network)
 21 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.realface', title: 'complexity_decoder', datatype: '<class 'int'>', default: '512', info: 'Decoder Complexity.', rounding: '4', min_max: (512, 544), choices: [], gui_radio: False, fixed: True, group: network)
 22 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.realface
 23 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: unbalanced_defaults.py, module_path: plugins.train.model, plugin_type: model
 24 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.model.unbalanced_defaults
 25 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'model.unbalanced', info: 'An unbalanced model with adjustable input size options.\nThis is an unbalanced model so b>a swaps may not work well\n\nNB: Unless specifically stated, values changed here will only take effect when creating a new model.')
 26 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'input_size', datatype: '<class 'int'>', default: '128', info: 'Resolution (in pixels) of the image to train on.\nBE AWARE Larger resolution will dramatically increaseVRAM requirements.\nMake sure your resolution is divisible by 64 (e.g. 64, 128, 256 etc.).\nNB: Your faceset must be at least 1.6x larger than your required input size.\n(e.g. 160 is the maximum input size for a 256x256 faceset).', rounding: '64', min_max: (64, 512), choices: [], gui_radio: False, fixed: True, group: size)
 27 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'lowmem', datatype: '<class 'bool'>', default: 'False', info: 'Lower memory mode. Set to 'True' if having issues with VRAM useage.\nNB: Models with a changed lowmem mode are not compatible with each other.\nNB: lowmem will override cutom nodes and complexity settings.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
 28 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'clipnorm', datatype: '<class 'bool'>', default: 'True', info: 'Controls gradient clipping of the optimizer. Can prevent model corruption at the expense of VRAM.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
 29 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'nodes', datatype: '<class 'int'>', default: '1024', info: 'Number of nodes for decoder. Don't change this unless you know what you are doing!', rounding: '64', min_max: (512, 4096), choices: [], gui_radio: False, fixed: True, group: network)
 30 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'complexity_encoder', datatype: '<class 'int'>', default: '128', info: 'Encoder Convolution Layer Complexity. sensible ranges: 128 to 160.', rounding: '16', min_max: (64, 1024), choices: [], gui_radio: False, fixed: True, group: network)
 31 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'complexity_decoder_a', datatype: '<class 'int'>', default: '384', info: 'Decoder A Complexity.', rounding: '16', min_max: (64, 1024), choices: [], gui_radio: False, fixed: True, group: network)
 32 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.unbalanced', title: 'complexity_decoder_b', datatype: '<class 'int'>', default: '512', info: 'Decoder B Complexity.', rounding: '16', min_max: (64, 1024), choices: [], gui_radio: False, fixed: True, group: network)
 33 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.unbalanced
 34 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: villain_defaults.py, module_path: plugins.train.model, plugin_type: model
 35 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.model.villain_defaults
 36 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'model.villain', info: 'A Higher resolution version of the Original Model by VillainGuy.\nExtremely VRAM heavy. Don't try to run this if you have a small GPU.\n\nNB: Unless specifically stated, values changed here will only take effect when creating a new model.')
 37 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'model.villain', title: 'lowmem', datatype: '<class 'bool'>', default: 'False', info: 'Lower memory mode. Set to 'True' if having issues with VRAM useage.\nNB: Models with a changed lowmem mode are not compatible with each other.', rounding: 'None', min_max: None, choices: [], gui_radio: False, fixed: True, group: settings)
 38 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: model.villain
 39 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Adding defaults: (filename: original_defaults.py, module_path: plugins.train.trainer, plugin_type: trainer
 40 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Importing defaults module: plugins.train.trainer.original_defaults
 41 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_section               DEBUG    Add section: (title: 'trainer.original', info: 'Original Trainer Options.\nWARNING: The defaults for augmentation will be fine for 99.9% of use cases. Only change them if you absolutely know what you are doing!')
 42 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'preview_images', datatype: '<class 'int'>', default: '14', info: 'Number of sample faces to display for each side in the preview when training.', rounding: '2', min_max: (2, 16), choices: None, gui_radio: False, fixed: True, group: evaluation)
 43 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'zoom_amount', datatype: '<class 'int'>', default: '5', info: 'Percentage amount to randomly zoom each training image in and out.', rounding: '1', min_max: (0, 25), choices: None, gui_radio: False, fixed: True, group: image augmentation)
 44 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'rotation_range', datatype: '<class 'int'>', default: '10', info: 'Percentage amount to randomly rotate each training image.', rounding: '1', min_max: (0, 25), choices: None, gui_radio: False, fixed: True, group: image augmentation)
 45 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'shift_range', datatype: '<class 'int'>', default: '5', info: 'Percentage amount to randomly shift each training image horizontally and vertically.', rounding: '1', min_max: (0, 25), choices: None, gui_radio: False, fixed: True, group: image augmentation)
 46 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'flip_chance', datatype: '<class 'int'>', default: '50', info: 'Percentage chance to randomly flip each training image horizontally.\nNB: This is ignored if the 'no-flip' option is enabled', rounding: '1', min_max: (0, 75), choices: None, gui_radio: False, fixed: True, group: image augmentation)
 47 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'disable_warp', datatype: '<class 'bool'>', default: 'False', info: 'Disable warp augmentation. Warping is integral to the Neural Network training. If you decide to disable warping, you should only do so towards the end of a model's training session.', rounding: 'None', min_max: None, choices: None, gui_radio: False, fixed: False, group: image augmentation)
 48 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'color_lightness', datatype: '<class 'int'>', default: '30', info: 'Percentage amount to randomly alter the lightness of each training image.\nNB: This is ignored if the 'no-flip' option is enabled', rounding: '1', min_max: (0, 75), choices: None, gui_radio: False, fixed: True, group: color augmentation)
 49 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'color_ab', datatype: '<class 'int'>', default: '8', info: 'Percentage amount to randomly alter the 'a' and 'b' colors of the L*a*b* color space of each training image.\nNB: This is ignored if the 'no-flip' option is enabled', rounding: '1', min_max: (0, 50), choices: None, gui_radio: False, fixed: True, group: color augmentation)
 50 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'color_clahe_chance', datatype: '<class 'int'>', default: '50', info: 'Percentage chance to perform Contrast Limited Adaptive Histogram Equalization on each training image.\nNB: This is ignored if the 'no-augment-color' option is enabled', rounding: '1', min_max: (0, 75), choices: None, gui_radio: False, fixed: False, group: color augmentation)
 51 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          add_item                  DEBUG    Add item: (section: 'trainer.original', title: 'color_clahe_max_size', datatype: '<class 'int'>', default: '4', info: 'The grid size dictates how much Contrast Limited Adaptive Histogram Equalization is performed on any training image selected for clahe. Contrast will be applied randomly with a gridsize of 0 up to the maximum. This value is a multiplier calculated from the training image size.\nNB: This is ignored if the 'no-augment-color' option is enabled', rounding: '1', min_max: (1, 8), choices: None, gui_radio: False, fixed: True, group: color augmentation)
 52 
 
09/28/2020 01:03:19 MainProcess     MainThread      _config         load_module               DEBUG    Added defaults: trainer.original
 53 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          handle_config             DEBUG    Handling config
 54 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          check_exists              DEBUG    Config file exists: 'I:\faceswap\config\train.ini'
 55 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          load_config               VERBOSE  Loading config: 'I:\faceswap\config\train.ini'
 56 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          validate_config           DEBUG    Validating config
 57 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          check_config_change       DEBUG    Default config has not changed
 58 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          check_config_choices      DEBUG    Checking config choices
 59 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          check_config_choices      DEBUG    Checked config choices
 60 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          validate_config           DEBUG    Validated config
 61 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          handle_config             DEBUG    Handled config
 62 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          __init__                  DEBUG    Initialized: Config
 63 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Getting config item: (section: 'global', option: 'learning_rate')
 64 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Returning item: (type: <class 'float'>, value: 5e-05)
 65 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Getting config item: (section: 'global', option: 'allow_growth')
 66 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Returning item: (type: <class 'bool'>, value: False)
 67 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Getting config item: (section: 'global', option: 'convert_batchsize')
 68 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          get                       DEBUG    Returning item: (type: <class 'int'>, value: 16)
 69 
 
09/28/2020 01:03:19 MainProcess     MainThread      config          changeable_items          DEBUG    Alterable for existing models: {'learning_rate': 5e-05, 'allow_growth': False, 'convert_batchsize': 16}
 70 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initializing State: (model_dir: 'I:\Faceswap Resources\sio1\FaceSwap\Models', model_name: 'realface', config_changeable_items: '{'learning_rate': 5e-05, 'allow_growth': False, 'convert_batchsize': 16}', no_logs: False, training_image_size: '256'
 71 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      get_serializer            DEBUG    <lib.serializer._JSONSerializer object at 0x000001CD3742BC40>
 72 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _load                     DEBUG    Loading State
 73 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      load                      DEBUG    filename: I:\Faceswap Resources\sio1\FaceSwap\Models\realface_state.json
 74 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      load                      DEBUG    stored data type: <class 'bytes'>
 75 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      unmarshal                 DEBUG    data type: <class 'bytes'>
 76 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      unmarshal                 DEBUG    returned data type: <class 'dict'>
 77 
 
09/28/2020 01:03:19 MainProcess     MainThread      serializer      load                      DEBUG    data type: <class 'dict'>
 78 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _load                     DEBUG    Loaded state: {'name': 'realface', 'sessions': {'1': {'timestamp': 1600818874.1031203, 'no_logs': False, 'loss_names': ['total', 'face_a', 'face_b'], 'batchsize': 16, 'iterations': 56680, 'config': {'learning_rate': 5e-05, 'allow_growth': False, 'convert_batchsize': 16}}, '2': {'timestamp': 1600880535.6287405, 'no_logs': False, 'loss_names': ['total', 'face_a', 'face_b'], 'batchsize': 16, 'iterations': 29031, 'config': {'learning_rate': 5e-05, 'allow_growth': False, 'convert_batchsize': 16}}, '3': {'timestamp': 1600893489.5451026, 'no_logs': False, 'loss_names': ['total', 'face_a', 'face_b'], 'batchsize': 16, 'iterations': 1, 'config': {'learning_rate': 5e-05, 'allow_growth': False, 'convert_batchsize': 16}}}, 'lowest_avg_loss': {'a': 0.03331407456099987, 'b': 0.03500699474662542}, 'iterations': 85712, 'training_size': 256, 'config': {'coverage': 84.68, 'optimizer': 'adam', 'learning_rate': 5e-05, 'allow_growth': False, 'mixed_precision': True, 'convert_batchsize': 16, 'loss_function': 'ssim', 'mask_loss_function': 'mse', 'l2_reg_term': 100, 'eye_multiplier': 6, 'mouth_multiplier': 4, 'penalized_mask_loss': True, 'mask_type': 'extended', 'mask_blur_kernel': 3, 'mask_threshold': 4, 'learn_mask': False, 'input_size': 64, 'output_size': 128, 'dense_nodes': 1536, 'complexity_encoder': 128, 'complexity_decoder': 512}}
 79 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _update_legacy_config     DEBUG    Checking for legacy state file update
 80 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _update_legacy_config     DEBUG    Legacy item 'dssim_loss' not in config. Skipping update
 81 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _update_legacy_config     DEBUG    State file updated for legacy config: False
 82 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _replace_config           DEBUG    Replacing config. Old config: {'coverage': 68.75, 'optimizer': 'adam', 'learning_rate': 5e-05, 'allow_growth': False, 'mixed_precision': False, 'convert_batchsize': 16, 'loss_function': 'ssim', 'mask_loss_function': 'mse', 'l2_reg_term': 100, 'eye_multiplier': 3, 'mouth_multiplier': 2, 'penalized_mask_loss': True, 'mask_type': 'extended', 'mask_blur_kernel': 3, 'mask_threshold': 4, 'learn_mask': False, 'input_size': 64, 'output_size': 128, 'dense_nodes': 1536, 'complexity_encoder': 128, 'complexity_decoder': 512}
 83 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _replace_config           DEBUG    Replaced config. New config: {'coverage': 84.68, 'optimizer': 'adam', 'learning_rate': 5e-05, 'allow_growth': False, 'mixed_precision': True, 'convert_batchsize': 16, 'loss_function': 'ssim', 'mask_loss_function': 'mse', 'l2_reg_term': 100, 'eye_multiplier': 6, 'mouth_multiplier': 4, 'penalized_mask_loss': True, 'mask_type': 'extended', 'mask_blur_kernel': 3, 'mask_threshold': 4, 'learn_mask': False, 'input_size': 64, 'output_size': 128, 'dense_nodes': 1536, 'complexity_encoder': 128, 'complexity_decoder': 512}
 84 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _replace_config           INFO     Using configuration saved in state file
 85 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _new_session_id           DEBUG    4
 86 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _create_new_session       DEBUG    Creating new session. id: 4
 87 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initialized State:
 88 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initializing _Settings: (arguments: Namespace(alignments_path='I:\\Faceswap Resources\\sio1\\FaceSwap\\InputA\\Video\\masshrt\\Untitled Project_alignments.fsa', colab=False, color_adjustment='avg-color', configfile=None, distributed=False, exclude_gpus=None, filter=None, frame_ranges=None, func=<bound method ScriptExecutor.execute_script of <lib.cli.launcher.ScriptExecutor object at 0x000001CD23C16DF0>>, input_aligned_dir=None, input_dir='I:\\Faceswap Resources\\sio1\\FaceSwap\\InputA\\Video\\masshrt\\Untitled Project.mp4', jobs=0, keep_unchanged=False, logfile=None, loglevel='INFO', mask_type='extended', model_dir='I:\\Faceswap Resources\\sio1\\FaceSwap\\Models', nfilter=None, on_the_fly=False, output_dir='I:\\Faceswap Resources\\sio1\\FaceSwap\\Convert', output_scale=100, redirect_gui=True, ref_threshold=0.4, reference_video=None, scaling='none', singleprocess=False, swap_model=False, trainer=None, writer='ffmpeg'), mixed_precision: True, allow_growth: False, is_predict: True)
 89 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _set_tf_settings          DEBUG    Not setting any specific Tensorflow settings
 90 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _set_keras_mixed_precision DEBUG    use_mixed_precision: False, skip_check: False
 91 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _set_keras_mixed_precision DEBUG    Not enabling 'mixed_precision' (backend: nvidia, use_mixed_precision: False)
 92 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _get_strategy             DEBUG    Using strategy: <tensorflow.python.distribute.distribute_lib._DefaultDistributionStrategy object at 0x000001CD3742B6D0>
 93 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initialized _Settings
 94 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initializing _Loss
 95 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initialized: _Loss
 96 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           __init__                  DEBUG    Initialized ModelBase (Model)
 97 
 
09/28/2020 01:03:19 MainProcess     MainThread      realface        check_input_output        DEBUG    Input and output sizes are valid
 98 
 
09/28/2020 01:03:19 MainProcess     MainThread      realface        get_dense_width_upscalers_numbers DEBUG    dense_width: 4, upscalers_no: 5
 99 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           strategy_scope            DEBUG    Using strategy scope: <tensorflow.python.distribute.distribute_lib._DefaultDistributionContext object at 0x000001CD320311C0>
 100 
 
09/28/2020 01:03:19 MainProcess     MainThread      _base           _load                     DEBUG    Loading model: I:\Faceswap Resources\sio1\FaceSwap\Models\realface.h5
 101 
 
Traceback (most recent call last):
 102 
 
  File "I:\faceswap\lib\cli\launcher.py", line 181, in execute_script
 103 
 
    process = script(arguments)
 104 
 
  File "I:\faceswap\scripts\convert.py", line 60, in __init__
 105 
 
    self._predictor = Predict(self._disk_io.load_queue, self._queue_size, arguments)
 106 
 
  File "I:\faceswap\scripts\convert.py", line 655, in __init__
 107 
 
    self._model = self._load_model()
 108 
 
  File "I:\faceswap\scripts\convert.py", line 734, in _load_model
 109 
 
    model.build()
 110 
 
  File "I:\faceswap\plugins\train\model\_base.py", line 260, in build
 111 
 
    model = self._io._load()  # pylint:disable=protected-access
 112 
 
  File "I:\faceswap\plugins\train\model\_base.py", line 521, in _load
 113 
 
    model = load_model(self._filename, compile=False)
 114 
 
  File "C:\Users\Matt\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\saving\save.py", line 184, in load_model
 115 
 
    return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile)
 116 
 
  File "C:\Users\Matt\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 166, in load_model_from_hdf5
 117 
 
    f = h5py.File(filepath, mode='r')
 118 
 
  File "C:\Users\Matt\MiniConda3\envs\faceswap\lib\site-packages\h5py\_hl\files.py", line 406, in __init__
 119 
 
    fid = make_fid(name, mode, userblock_size,
 120 
 
  File "C:\Users\Matt\MiniConda3\envs\faceswap\lib\site-packages\h5py\_hl\files.py", line 173, in make_fid
 121 
 
    fid = h5f.open(name, flags, fapl=fapl)
 122 
 
  File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
 123 
 
  File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
 124 
 
  File "h5py\h5f.pyx", line 88, in h5py.h5f.open
 125 
 
OSError: Unable to open file (bad object header version number)
 126 
 
 127 
 
============ System Information ============
 128 
 
encoding:            cp1252
 129 
 
git_branch:          master
 130 
 
git_commits:         8861101 Setup.py - Minor change to cudnn locator
 131 
 
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
 132 
 
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
 133 
 
gpu_devices:         GPU_0: GeForce RTX 2060 SUPER
 134 
 
gpu_devices_active:  GPU_0
 135 
 
gpu_driver:          456.38
 136 
 
gpu_vram:            GPU_0: 8192MB
 137 
 
os_machine:          AMD64
 138 
 
os_platform:         Windows-10-10.0.18362-SP0
 139 
 
os_release:          10
 140 
 
py_command:          I:\faceswap\faceswap.py convert -i I:/Faceswap Resources/sio1/FaceSwap/InputA/Video/masshrt/Untitled Project.mp4 -o I:/Faceswap Resources/sio1/FaceSwap/Convert -al I:/Faceswap Resources/sio1/FaceSwap/InputA/Video/masshrt/Untitled Project_alignments.fsa -m I:/Faceswap Resources/sio1/FaceSwap/Models -c avg-color -M extended -sc none -w ffmpeg -osc 100 -l 0.4 -j 0 -L INFO -gui
 141 
 
py_conda_version:    conda 4.8.5
 142 
 
py_implementation:   CPython
 143 
 
py_version:          3.8.5
 144 
 
py_virtual_env:      True
 145 
 
sys_cores:           4
 146 
 
sys_processor:       AMD64 Family 23 Model 17 Stepping 0, AuthenticAMD
 147 
 
sys_ram:             Total: 32715MB, Available: 27542MB, Used: 5172MB, Free: 27542MB
 148 
 
 149 
 
=============== Pip Packages ===============
 150 
 
absl-py==0.10.0
 151 
 
astunparse==1.6.3
 152 
 
cachetools==4.1.1
 153 
 
certifi==2020.6.20
 154 
 
chardet==3.0.4
 155 
 
cycler==0.10.0
 156 
 
fastcluster==1.1.26
 157 
 
ffmpy==0.2.3
 158 
 
gast==0.3.3
 159 
 
google-auth==1.21.3
 160 
 
google-auth-oauthlib==0.4.1
 161 
 
google-pasta==0.2.0
 162 
 
grpcio==1.32.0
 163 
 
h5py==2.10.0
 164 
 
idna==2.10
 165 
 
imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work
 166 
 
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
 167 
 
joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work
 168 
 
Keras-Preprocessing==1.1.2
 169 
 
kiwisolver==1.2.0
 170 
 
Markdown==3.2.2
 171 
 
matplotlib @ file:///C:/ci/matplotlib-base_1592837548929/work
 172 
 
mkl-fft==1.2.0
 173 
 
mkl-random==1.1.1
 174 
 
mkl-service==2.3.0
 175 
 
numpy==1.18.5
 176 
 
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
 177 
 
oauthlib==3.1.0
 178 
 
olefile==0.46
 179 
 
opencv-python==4.4.0.44
 180 
 
opt-einsum==3.3.0
 181 
 
pathlib==1.0.1
 182 
 
Pillow @ file:///C:/ci/pillow_1594298230227/work
 183 
 
protobuf==3.13.0
 184 
 
psutil @ file:///C:/ci/psutil_1598370330503/work
 185 
 
pyasn1==0.4.8
 186 
 
pyasn1-modules==0.2.8
 187 
 
pyparsing==2.4.7
 188 
 
python-dateutil==2.8.1
 189 
 
pywin32==227
 190 
 
requests==2.24.0
 191 
 
requests-oauthlib==1.3.0
 192 
 
rsa==4.6
 193 
 
scikit-learn @ file:///C:/ci/scikit-learn_1598377018496/work
 194 
 
scipy @ file:///C:/ci/scipy_1592916963468/work
 195 
 
sip==4.19.13
 196 
 
six==1.15.0
 197 
 
tensorboard==2.2.2
 198 
 
tensorboard-plugin-wit==1.7.0
 199 
 
tensorflow-gpu==2.2.1
 200 
 
tensorflow-gpu-estimator==2.2.0
 201 
 
termcolor==1.1.0
 202 
 
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
 203 
 
tornado==6.0.4
 204 
 
tqdm @ file:///tmp/build/80754af9/tqdm_1600709023549/work
 205 
 
urllib3==1.25.10
 206 
 
Werkzeug==1.0.1
 207 
 
wincertstore==0.2
 208 
 
wrapt==1.12.1
 209 
 
 210 
 
============== Conda Packages ==============
 211 
 
# packages in environment at C:\Users\Matt\MiniConda3\envs\faceswap:
 212 
 
#
 213 
 
# Name                    Version                   Build  Channel
 214 
 
absl-py                   0.10.0                   pypi_0    pypi
 215 
 
astunparse                1.6.3                    pypi_0    pypi
 216 
 
blas                      1.0                         mkl  
 217 
 
ca-certificates           2020.7.22                     0  
 218 
 
cachetools                4.1.1                    pypi_0    pypi
 219 
 
certifi                   2020.6.20                py38_0  
 220 
 
chardet                   3.0.4                    pypi_0    pypi
 221 
 
cudatoolkit               10.1.243             h74a9793_0  
 222 
 
cudnn                     7.6.5                cuda10.1_0  
 223 
 
cycler                    0.10.0                   py38_0  
 224 
 
fastcluster               1.1.26           py38hbe40bda_1    conda-forge
 225 
 
ffmpeg                    4.3.1                ha925a31_0    conda-forge
 226 
 
ffmpy                     0.2.3                    pypi_0    pypi
 227 
 
freetype                  2.10.2               hd328e21_0  
 228 
 
gast                      0.3.3                    pypi_0    pypi
 229 
 
git                       2.23.0               h6bb4b03_0  
 230 
 
google-auth               1.21.3                   pypi_0    pypi
 231 
 
google-auth-oauthlib      0.4.1                    pypi_0    pypi
 232 
 
google-pasta              0.2.0                    pypi_0    pypi
 233 
 
grpcio                    1.32.0                   pypi_0    pypi
 234 
 
h5py                      2.10.0                   pypi_0    pypi
 235 
 
icc_rt                    2019.0.0             h0cc432a_1  
 236 
 
icu                       58.2                 ha925a31_3  
 237 
 
idna                      2.10                     pypi_0    pypi
 238 
 
imageio                   2.9.0                      py_0  
 239 
 
imageio-ffmpeg            0.4.2                      py_0    conda-forge
 240 
 
intel-openmp              2020.2                      254  
 241 
 
joblib                    0.16.0                     py_0  
 242 
 
jpeg                      9b                   hb83a4c4_2  
 243 
 
keras-preprocessing       1.1.2                    pypi_0    pypi
 244 
 
kiwisolver                1.2.0            py38h74a9793_0  
 245 
 
libpng                    1.6.37               h2a8f88b_0  
 246 
 
libtiff                   4.1.0                h56a325e_1  
 247 
 
lz4-c                     1.9.2                h62dcd97_1  
 248 
 
markdown                  3.2.2                    pypi_0    pypi
 249 
 
matplotlib                3.2.2                         0  
 250 
 
matplotlib-base           3.2.2            py38h64f37c6_0  
 251 
 
mkl                       2020.2                      256  
 252 
 
mkl-service               2.3.0            py38hb782905_0  
 253 
 
mkl_fft                   1.2.0            py38h45dec08_0  
 254 
 
mkl_random                1.1.1            py38h47e9c7a_0  
 255 
 
numpy                     1.18.5                   pypi_0    pypi
 256 
 
nvidia-ml-py3             7.352.1                  pypi_0    pypi
 257 
 
oauthlib                  3.1.0                    pypi_0    pypi
 258 
 
olefile                   0.46                       py_0  
 259 
 
opencv-python             4.4.0.44                 pypi_0    pypi
 260 
 
openssl                   1.1.1h               he774522_0  
 261 
 
opt-einsum                3.3.0                    pypi_0    pypi
 262 
 
pathlib                   1.0.1                      py_1  
 263 
 
pillow                    7.2.0            py38hcc1f983_0  
 264 
 
pip                       20.2.2                   py38_0  
 265 
 
protobuf                  3.13.0                   pypi_0    pypi
 266 
 
psutil                    5.7.2            py38he774522_0  
 267 
 
pyasn1                    0.4.8                    pypi_0    pypi
 268 
 
pyasn1-modules            0.2.8                    pypi_0    pypi
 269 
 
pyparsing                 2.4.7                      py_0  
 270 
 
pyqt                      5.9.2            py38ha925a31_4  
 271 
 
python                    3.8.5                h5fd99cc_1  
 272 
 
python-dateutil           2.8.1                      py_0  
 273 
 
python_abi                3.8                      1_cp38    conda-forge
 274 
 
pywin32                   227              py38he774522_1  
 275 
 
qt                        5.9.7            vc14h73c81de_0  
 276 
 
requests                  2.24.0                   pypi_0    pypi
 277 
 
requests-oauthlib         1.3.0                    pypi_0    pypi
 278 
 
rsa                       4.6                      pypi_0    pypi
 279 
 
scikit-learn              0.23.2           py38h47e9c7a_0  
 280 
 
scipy                     1.5.0            py38h9439919_0  
 281 
 
setuptools                49.6.0                   py38_0  
 282 
 
sip                       4.19.13          py38ha925a31_0  
 283 
 
six                       1.15.0                     py_0  
 284 
 
sqlite                    3.33.0               h2a8f88b_0  
 285 
 
tensorboard               2.2.2                    pypi_0    pypi
 286 
 
tensorboard-plugin-wit    1.7.0                    pypi_0    pypi
 287 
 
tensorflow-gpu            2.2.1                    pypi_0    pypi
 288 
 
tensorflow-gpu-estimator  2.2.0                    pypi_0    pypi
 289 
 
termcolor                 1.1.0                    pypi_0    pypi
 290 
 
threadpoolctl             2.1.0              pyh5ca1d4c_0  
 291 
 
tk                        8.6.10               he774522_0  
 292 
 
tornado                   6.0.4            py38he774522_1  
 293 
 
tqdm                      4.49.0                     py_0  
 294 
 
urllib3                   1.25.10                  pypi_0    pypi
 295 
 
vc                        14.1                 h0510ff6_4  
 296 
 
vs2015_runtime            14.16.27012          hf0eaf9b_3  
 297 
 
werkzeug                  1.0.1                    pypi_0    pypi
 298 
 
wheel                     0.35.1                     py_0  
 299 
 
wincertstore              0.2                      py38_0  
 300 
 
wrapt                     1.12.1                   pypi_0    pypi
 301 
 
xz                        5.2.5                h62dcd97_0  
 302 
 
zlib                      1.2.11               h62dcd97_4  
 303 
 
zstd                      1.4.5                h04227a9_0  
 304 
 
 305 
 
================= Configs ==================
 306 
 
--------- .faceswap ---------
 307 
 
backend:                  nvidia
 308 
 
 309 
 
--------- convert.ini ---------
 310 
 
 311 
 
[color.color_transfer]
 312 
 
clip:                     True
 313 
 
preserve_paper:           True
 314 
 
 315 
 
[color.manual_balance]
 316 
 
colorspace:               HSV
 317 
 
balance_1:                0.0
 318 
 
balance_2:                0.0
 319 
 
balance_3:                0.0
 320 
 
contrast:                 0.0
 321 
 
brightness:               0.0
 322 
 
 323 
 
[color.match_hist]
 324 
 
threshold:                99.0
 325 
 
 326 
 
[mask.box_blend]
 327 
 
type:                     gaussian
 328 
 
distance:                 11.0
 329 
 
radius:                   5.0
 330 
 
passes:                   1
 331 
 
 332 
 
[mask.mask_blend]
 333 
 
type:                     normalized
 334 
 
kernel_size:              3
 335 
 
passes:                   4
 336 
 
threshold:                4
 337 
 
erosion:                  0.0
 338 
 
 339 
 
[scaling.sharpen]
 340 
 
method:                   unsharp_mask
 341 
 
amount:                   150
 342 
 
radius:                   0.3
 343 
 
threshold:                5.0
 344 
 
 345 
 
[writer.ffmpeg]
 346 
 
container:                mp4
 347 
 
codec:                    libx264
 348 
 
crf:                      23
 349 
 
preset:                   medium
 350 
 
tune:                     none
 351 
 
profile:                  auto
 352 
 
level:                    auto
 353 
 
skip_mux:                 False
 354 
 
 355 
 
[writer.gif]
 356 
 
fps:                      25
 357 
 
loop:                     0
 358 
 
palettesize:              256
 359 
 
subrectangles:            False
 360 
 
 361 
 
[writer.opencv]
 362 
 
format:                   png
 363 
 
draw_transparent:         False
 364 
 
jpg_quality:              75
 365 
 
png_compress_level:       3
 366 
 
 367 
 
[writer.pillow]
 368 
 
format:                   png
 369 
 
draw_transparent:         False
 370 
 
optimize:                 False
 371 
 
gif_interlace:            True
 372 
 
jpg_quality:              75
 373 
 
png_compress_level:       3
 374 
 
tif_compression:          tiff_deflate
 375 
 
 376 
 
--------- extract.ini ---------
 377 
 
 378 
 
[global]
 379 
 
allow_growth:             False
 380 
 
 381 
 
[align.fan]
 382 
 
batch-size:               12
 383 
 
 384 
 
[detect.cv2_dnn]
 385 
 
confidence:               50
 386 
 
 387 
 
[detect.mtcnn]
 388 
 
minsize:                  20
 389 
 
threshold_1:              0.6
 390 
 
threshold_2:              0.7
 391 
 
threshold_3:              0.7
 392 
 
scalefactor:              0.709
 393 
 
batch-size:               8
 394 
 
 395 
 
[detect.s3fd]
 396 
 
confidence:               70
 397 
 
batch-size:               4
 398 
 
 399 
 
[mask.unet_dfl]
 400 
 
batch-size:               8
 401 
 
 402 
 
[mask.vgg_clear]
 403 
 
batch-size:               6
 404 
 
 405 
 
[mask.vgg_obstructed]
 406 
 
batch-size:               2
 407 
 
 408 
 
--------- gui.ini ---------
 409 
 
 410 
 
[global]
 411 
 
fullscreen:               True
 412 
 
tab:                      extract
 413 
 
options_panel_width:      30
 414 
 
console_panel_height:     20
 415 
 
icon_size:                14
 416 
 
font:                     default
 417 
 
font_size:                9
 418 
 
autosave_last_session:    prompt
 419 
 
timeout:                  120
 420 
 
auto_load_model_stats:    True
 421 
 
 422 
 
--------- train.ini ---------
 423 
 
 424 
 
[global]
 425 
 
coverage:                 68.75
 426 
 
icnr_init:                False
 427 
 
conv_aware_init:          False
 428 
 
optimizer:                adam
 429 
 
learning_rate:            5e-05
 430 
 
reflect_padding:          False
 431 
 
allow_growth:             False
 432 
 
mixed_precision:          False
 433 
 
convert_batchsize:        16
 434 
 
 435 
 
[global.loss]
 436 
 
loss_function:            ssim
 437 
 
mask_loss_function:       mse
 438 
 
l2_reg_term:              100
 439 
 
eye_multiplier:           3
 440 
 
mouth_multiplier:         2
 441 
 
penalized_mask_loss:      True
 442 
 
mask_type:                extended
 443 
 
mask_blur_kernel:         3
 444 
 
mask_threshold:           4
 445 
 
learn_mask:               False
 446 
 
 447 
 
[model.dfl_h128]
 448 
 
lowmem:                   False
 449 
 
 450 
 
[model.dfl_sae]
 451 
 
input_size:               128
 452 
 
clipnorm:                 True
 453 
 
architecture:             df
 454 
 
autoencoder_dims:         0
 455 
 
encoder_dims:             42
 456 
 
decoder_dims:             21
 457 
 
multiscale_decoder:       False
 458 
 
 459 
 
[model.dlight]
 460 
 
features:                 best
 461 
 
details:                  good
 462 
 
output_size:              256
 463 
 
 464 
 
[model.original]
 465 
 
lowmem:                   False
 466 
 
 467 
 
[model.realface]
 468 
 
input_size:               64
 469 
 
output_size:              128
 470 
 
dense_nodes:              1536
 471 
 
complexity_encoder:       128
 472 
 
complexity_decoder:       512
 473 
 
 474 
 
[model.unbalanced]
 475 
 
input_size:               128
 476 
 
lowmem:                   False
 477 
 
clipnorm:                 True
 478 
 
nodes:                    1024
 479 
 
complexity_encoder:       128
 480 
 
complexity_decoder_a:     384
 481 
 
complexity_decoder_b:     512
 482 
 
 483 
 
[model.villain]
 484 
 
lowmem:                   False
 485 
 
 486 
 
[trainer.original]
 487 
 
preview_images:           14
 488 
 
zoom_amount:              5
 489 
 
rotation_range:           10
 490 
 
shift_range:              5
 491 
 
flip_chance:              50
 492 
 
disable_warp:             False
 
 
color_lightness:          30
 
 
color_ab:                 8

 
color_clahe_chance:       50

 
color_clahe_max_size:     4

What could be the problem?
I initially realised I needed an update so I did that and it didn't work, I tried deleting all of faceswap, conda etc. Reinstalled And that made no difference.
I also tried ffmpeg and opencv with no luck.
by bryanlyon » Mon Sep 28, 2020 2:58 am
This looks like a corrupt model file. Try using the restore tool to load from a backup.
Go to full post
The beginning of the end.

User avatar
bryanlyon
Site Admin
Posts: 468
Joined: Fri Jul 12, 2019 12:49 am
Answers: 39
Location: San Francisco
Has thanked: 3 times
Been thanked: 114 times
Contact:

Re: Error converting (bad object header version number)

Post by bryanlyon »

This looks like a corrupt model file. Try using the restore tool to load from a backup.

Locked