Skip to content

Conversation

@ojasaar
Copy link

@ojasaar ojasaar commented Sep 28, 2025

Summary

Fixes #441

  • ensure multi-control models load every available control image when encoding prompts
  • handle batches where control tensors are stored as per-sample lists and map them into the shapes Qwen expects
  • keep behaviour unchanged when no control images are present

Testing

  • python3 -m compileall extensions_built_in/sd_trainer/SDTrainer.py toolkit/models/base_model.py
  • sampling + training with qwen image 2509 on a dataset with 3 control images

@lucusmax
Copy link

lucusmax commented Oct 1, 2025

im still getting pixel value errors after merging - training without samples seems to be working. is there any update coming for this? thanks

@ojasaar
Copy link
Author

ojasaar commented Oct 2, 2025

im still getting pixel value errors after merging - training without samples seems to be working. is there any update coming for this? thanks

I've tested it with having all 3 control datasets. How many are you using? Do you get errors during sampling or training?

@lucusmax
Copy link

lucusmax commented Oct 2, 2025

I got it to work - through remembering to add control images to the sample prompts....forgot about that. Adding one control image to each of the sample prompts allowed it to go through - running now and seems to be training well.
thanks for all your help.

@Tristan-mc-q
Copy link

Tristan-mc-q commented Oct 3, 2025

hey @ojasaar im still getting errors using 2 different control images on a 143 image triplet dataset. All images are labeled the same and I even disabled sampling to see if I could get things running. Im running on an h100 on runpod. When inspecting further I found Preprocessing shows 100% 143/143 and "Found 143 images", but only ~23 UUID files get bucketed in /data/images

the "preprocessing" phase doesnt seem to be finishing completely. It's only processing ~23 out of my 143 images, creating temporary files with random names (like "03868a7c-...png") that don't match my original numbered files (001.png, etc.).

Edit: Hold on didnt properly test your merge. Let me double check this is solved

@Astroburner
Copy link

Summary

Fixes #441

  • ensure multi-control models load every available control image when encoding prompts
  • handle batches where control tensors are stored as per-sample lists and map them into the shapes Qwen expects
  • keep behaviour unchanged when no control images are present

Testing

  • python3 -m compileall extensions_built_in/sd_trainer/SDTrainer.py toolkit/models/base_model.py
  • sampling + training with qwen image 2509 on a dataset with 3 control images

Well, I have 1 dataset and just one set of control images.
you said you was using 3 sets of control images?

It dident fix my issue.

My plan was a simple switch LoRA for qwen2509.
Also i uploaded for sampling just one image because i dont need 3.

Do you have other ideas how to solve it?

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

Successfully merging this pull request may close these issues.

KeyError: 'pixel_values' in Qwen-Image-Edit-2509

4 participants