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

The parameter type of batch in TrainSliderProcess.py does not match the receiving type. #219

Open
Ando-Lin opened this issue Nov 12, 2024 · 1 comment

Comments

@Ando-Lin
Copy link

This is for bugs only

Did you already ask in the discord?

No

You verified that this is a bug and not a feature request or question by asking in the discord?

No

Describe the bug

The partial content printed to the console is as follows:

#############################################

Running job: detail_slider_v1

#############################################

Running 1 process
Loading pipeline components...: 100%|█████████████| 7/7 [00:01<00:00, 4.82it/s]
create LoRA network. base dim (rank): 8, alpha: 4
neuron dropout: p=None, rank dropout: p=None, module dropout: p=None
create LoRA for Text Encoder: 0 modules.
create LoRA for U-Net: 722 modules.
enable LoRA for U-Net
Building prompt cache
Prompt tensors not found. Encoding prompts..
Generating baseline samples before training
detail_slider_v1: 0%| | 0/500 [00:00<?, ?it/s]Error running job: 'list' object has no attribute 'get_caption_list'

========================================
Result:

  • 0 completed jobs
  • 1 failure
    ========================================
    Traceback (most recent call last):
    File "/kaggle/working/ai-toolkit/run.py", line 90, in
    main()
    File "/kaggle/working/ai-toolkit/run.py", line 86, in main
    raise e
    File "/kaggle/working/ai-toolkit/run.py", line 78, in main
    job.run()
    File "/kaggle/working/ai-toolkit/jobs/TrainJob.py", line 49, in run
    process.run()
    File "/kaggle/working/ai-toolkit/jobs/process/BaseSDTrainProcess.py", line 1741, in run
    loss_dict = self.hook_train_loop(batch_list)
    File "/kaggle/working/ai-toolkit/jobs/process/TrainSliderProcess.py", line 338, in hook_train_loop
    noisy_latents, noise, timesteps, conditioned_prompts, imgs = self.process_general_training_batch(batch)
    File "/kaggle/working/ai-toolkit/jobs/process/BaseSDTrainProcess.py", line 777, in process_general_training_batch
    prompts = batch.get_caption_list()
    AttributeError: 'list' object has no attribute 'get_caption_list'

When I modified the judgment statement on line 335 of ai-toolkit/jobs/process/TrainSliderProcess.py, it worked normally for a while, then another bug occurred:

Result:

  • 0 completed jobs
  • 1 failure
    ========================================
    Traceback (most recent call last):
    File "/kaggle/working/ai-toolkit/run.py", line 90, in
    main()
    File "/kaggle/working/ai-toolkit/run.py", line 86, in main
    raise e
    File "/kaggle/working/ai-toolkit/run.py", line 78, in main
    job.run()
    File "/kaggle/working/ai-toolkit/jobs/TrainJob.py", line 49, in run
    process.run()
    File "/kaggle/working/ai-toolkit/jobs/process/BaseSDTrainProcess.py", line 1741, in run
    loss_dict = self.hook_train_loop(batch_list)
    File "/kaggle/working/ai-toolkit/jobs/process/TrainSliderProcess.py", line 419, in hook_train_loop
    if batch and batch.mask_tensor is not None:
    AttributeError: 'list' object has no attribute 'mask_tensor'
@Volnovik
Copy link

Bump

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