Here is a minimal example:

import torch
import torch.nn as nn
from torch.quantization import QuantStub, DeQuantStub
import copy

class Block(nn.Module):
    def __init__(self):
        super(Block, self).__init__()
        self.conv1 = nn.Conv2d(1,1,3, padding=1, bias=False)
    def forward(self, x, conv_parameter):
        self.conv1.weight = torch.nn.parameter.Parameter(conv_parameter) 
        return self.conv1(x)
    
class BigBlock(nn.Module):
    def __init__(self):
        super(BigBlock, self).__init__()
        self.conv_parameter = torch.nn.parameter.Parameter(torch.rand((1,1,3,3)))
        self.block = Block()
        self.quant = QuantStub()
        self.dequant = DeQuantStub()
    def forward(self, x):
        x = self.quant(x)
        x = self.block(x, self.conv_parameter)
        x = self.dequant(x)
        return x

x = torch.rand((1,1,5,5))
net = BigBlock()
print(net(x)) # works fine

qnet = copy.deepcopy(net)
qnet = qnet.eval()
qnet.qconfig = torch.quantization.default_qconfig
torch.quantization.prepare(qnet, inplace=True)
net(torch.rand((1,1,5,5)))
torch.quantization.convert(qnet, inplace=True)
print(qnet)
print(qnet(x)) # throws an error


I am using pytorch-1.6.0.dev202, Python 3.8.1.