Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

Fix the curr_cond_batch_idx when --no_prior_preservation is not used#34

Open
wendashi wants to merge 2 commits into
google:mainfrom
wendashi:main
Open

Fix the curr_cond_batch_idx when --no_prior_preservation is not used#34
wendashi wants to merge 2 commits into
google:mainfrom
wendashi:main

Conversation

@wendashi

Copy link
Copy Markdown

If --no_prior_preservation is not used, there will be a problem. batch["input_ids"] becomes torch.Size([1, 77]). At this time, in batch["input_ids"][curr_cond_batch_idx], curr_cond_batch_idx=1. The following error occurred:

index 1 is out of bounds for dimension 0 with size 1
  File "/path/break-a-scene/train.py", line 1206, in main
    batch["input_ids"][curr_cond_batch_idx]
  File "/path/break-a-scene/train.py", line 628, in __init__
    self.main()
  File "/path/break-a-scene/train.py", line 1525, in <module>
    SpatialDreambooth()
  File "/path/break-a-scene_wenda/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/path/break-a-scene_wenda/lib/python3.10/runpy.py", line 196, in _run_module_as_main (Current frame)
    return _run_code(code, main_globals, None,
IndexError: index 1 is out of bounds for dimension 0 with size 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant