def blend_models(low, high, model_res, level):
    levels = [x for x in range(level)]
    low_names = extract_conv_names(low)
    high_names = extract_conv_names(high)
    assert all(((x == y) for (x, y) in zip(low_names, high_names)))
    model_out = copy.deepcopy(low)
    for name in high.keys():
        if any(((f'convs.{lvl}' in name) for lvl in levels)):
            continue
        if any(((f'to_rgbs.{(lvl // 2)}' in name) for lvl in levels)):
            continue
        if any(((f'noises.noise_{lvl}' in name) for lvl in levels)):
            continue
        if ('style' in name):
            continue
        if ('conv1' in name):
            continue
        if ('to_rgb1' in name):
            continue
        if ('input.input' in name):
            continue
        model_out[name] = high[name].clone()
    return model_out
def blend_models(low, high, model_res, level):
    levels = [x for x in range(level)]
    low_names = extract_conv_names(low)
    high_names = extract_conv_names(high)
    assert all(((x == y) for (x, y) in zip(low_names, high_names)))
    model_out = copy.deepcopy(low)
    for name in high.keys():
        if any(((f'convs.{lvl}' in name) for lvl in levels)):
            continue
        if any(((f'to_rgbs.{(lvl // 2)}' in name) for lvl in levels)):
            continue
        if any(((f'noises.noise_{lvl}' in name) for lvl in levels)):
            continue
        if ('style' in name):
            continue
        if ('conv1' in name):
            continue
        if ('to_rgb1' in name):
            continue
        if ('input.input' in name):
            continue
        model_out[name] = high[name].clone()
    return model_out