Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in generate_img_dataset.py #135

Open
bimsarapathiraja opened this issue Sep 20, 2024 · 1 comment
Open

Error in generate_img_dataset.py #135

bimsarapathiraja opened this issue Sep 20, 2024 · 1 comment

Comments

@bimsarapathiraja
Copy link

I wanted to create my own dataset and followed Creating your own dataset section. I went straight to step 2 since I wanted to use your captions and edit instructions. But when I ran python dataset_creation/generate_img_dataset.py --out_dir data/instruct-pix2pix-dataset-000 --prompts_file path/to/generated_prompts.jsonl I get this error -

Prompts:   0%|          | 0/452148 [00:00<?, ?it/s]
Prompts:   0%|          | 0/452148 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "dataset_creation/generate_img_dataset.py", line 315, in <module>
    main()
  File "dataset_creation/generate_img_dataset.py", line 250, in main
    cond = model.get_learned_conditioning([prompt["caption"], prompt["output"]])
KeyError: 'caption'

What can I do here?

@alwinkai
Copy link

If you are using gpt-generated-prompts.jsonl, replace prompt["caption"] with prompt["input"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants