ColossalAI
ColossalAI copied to clipboard
KeyError: 'txt'
Hello
Thanks for your interesting works!
I want to use colossalAI to train a model on lsun bedroom dataset, and my config is as follow:
When i run the train.sh, somethong was wrong with it:
Keyerror 'caption'
When i reoplace caption with txt , proplem is that keyerror 'txt'
@ryanrussell @xcnick @feifeibear @junxu @jimmieliu
The bug is:
if you want to use your own datasets please refer to https://github.com/hpcaitech/ColossalAI/blob/main/examples/images/diffusion/ldm/data/base.py, the data format should be same as your yaml config
for example if the YAML file , first_stage_key
: image, cond_stage_key
: caption, your dataset should also return { caption,image}
if you want to use your own datasets please refer to https://github.com/hpcaitech/ColossalAI/blob/main/examples/images/diffusion/ldm/data/base.py, the data format should be same as your yaml config
I know, but the lsun.py you provide is suitable for lsun bedroom right? The config on data
is shown as follow:
Shuold I change the target
: ldm.data.lsun.LSUNBedroomsTrain to ldm.data.lsun.LSUNBedroomsTrain?
But I want to use ldm.data.lsun.LSUNBedroomsTrain to train lsun bedroom dataset.
yes, the target
in the yaml will create a python object with params
, you should make it be a make it like a common torch data loadder
But I want to use ldm.data.lsun.LSUNBedroomsTrain to train lsun bedroom dataset.
But I want to use ldm.data.lsun.LSUNBedroomsTrain to train lsun bedroom dataset.
If i use ldm.data.lsun.LSUNBedroomsTrain, it has a wrong:
text input must of type
str(single example),
List[str](batch or single pretokenized example) or
List[List[str]] (batch of pretokenized examples).
The lsun.py is shown as follow:
the lsun is an uncondition example, which means only an image without a text prompt, you should also change the model config in your train yaml. It was not recommend for training your own model
I think the base.py is an good example to train image with text caption
I think the base.py is an good example to train image with text caption
Can you give me a example for text? I want to kown the content in txt
I think the base.py is an good example to train image with text caption
you mean the cifar10 is the conditional example?
you can try teyvat.py and the datasets are here https://huggingface.co/datasets/Fazzie/Teyvat
image with text is a right format
We have updated a lot. This issue was closed due to inactivity. Thanks.