Open drewZZzz6 opened 11 months ago
Hi, what is your mmagic version? mmagic has implemented the LoadImageFromFile
transform so it should use the implementation from mmagic rather than mmcv.
If your mmagic version is less than 1.0.0, you could try to upgrade your mmagic version to 1.0.0+.
Prerequisite
Environment
OrderedDict([('sys.platform', 'linux'), ('Python', '3.9.16 (main, Mar 8 2023, 14:00:05) [GCC 11.2.0]'), ('CUDA available', True), ('numpy_random_seed', 2147483648), ('GPU 0', 'NVIDIA GeForce RTX 3090 Ti'), ('TorchVision', '0.14.1'), ('OpenCV', '4.8.1'), ('MMEngine', '0.6.0'), ('MMCV', '2.1.0'), ('MMCV Compiler', 'GCC 11.3'), ('MMCV CUDA Compiler', '11.7')])
Reproduces the problem - code sample
TypeError: class
ControlNetDataset
in mmagic/datasets/controlnet_dataset.py: classLoadImageFromFile
in mmcv/transforms/loading.py: init() got an unexpected keyword argument 'key' ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 888) of binary: /home/zyz/anaconda3/envs/py39/bin/pythonReproduces the problem - command or script
bash tools/dist_train.sh configs/controlnet/controlnet-1xb1-fill50k.py 1
Reproduces the problem - error message
TypeError: class
LoadImageFromFile
in mmcv/transforms/loading.py: init() got an unexpected keyword argument 'keys'Additional information
1、当我用Fill50K训练ControlNet时报错了,
Config for data loader
pipeline = [ dict(type='LoadImageFromFile', key='source', channel_order='rgb'), dict(type='LoadImageFromFile', key='target', channel_order='rgb'), dict( type='PackInputs', keys=['source', 'target'], data_keys='prompt', meta_keys=[ 'source_channel_order', 'source_color_type', 'target_channel_order', 'target_color_type' ])