Skip to content

Remove gen_img_diffusers.py, the old SD1.x / SD2.x image generation script - #2439

Merged
kohya-ss merged 2 commits into
devfrom
remove-gen-img-diffusers
Sep 24, 2026
Merged

kohya-ss merged 2 commits into
devfrom
remove-gen-img-diffusers

Conversation

@kohya-ss

Copy link
Copy Markdown
Owner

Summary

Removes gen_img_diffusers.py, the old image generation script for SD1.x / SD2.x, and points the remaining doc references to gen_img.py.

  • The script has not worked since the refactoring removed train_util.load_tokenizer (it fails with AttributeError right after loading the models). This was found while checking the sampler fixes of Fix the dpmsolver / dpmsingle samplers and give a clear error for lms without scipy #2438.
  • Making it run again would take only a couple of lines (the tokenizer line, plus the dpmsolver fix of Fix the dpmsolver / dpmsingle samplers and give a clear error for lms without scipy #2438), and with that patch applied txt2img, LoRA, SD2 v-prediction and Textual Inversion were confirmed to work locally. But no user has reported the breakage, gen_img.py supports everything it did except the experimental CLIP / VGG16 guidance (--clip_guidance_scale, --clip_image_guidance_scale, --vgg16_guidance_scale, --vgg16_guidance_layer), and keeping 4,000 lines of duplicated code alive would only add maintenance cost. The file remains available in the previous releases.

Changes

  • Delete gen_img_diffusers.py.
  • docs/train_network_README-ja.md, docs/train_network_README-zh.md, docs/train_ti_README-ja.md: the "generate with the script in this repository" sections now refer to gen_img.py (and link to gen_img_README). The English docs already did.
  • library/sampling.py: a comment referring to the old script.
  • README / README-ja: change history entry.

🤖 Generated with Claude Code

kohya-ss and others added 2 commits September 24, 2026 18:58
…cript

It has not worked since the refactoring removed `train_util.load_tokenizer`
(the only thing it needed to run again), and gen_img.py supports everything
it did except the experimental CLIP / VGG16 guidance. No user has reported
the breakage, so rather than keeping 4,000 lines of duplicated code alive,
remove it. The file remains available in the previous releases.

The remaining references in the docs (train_network_README-ja / -zh and
train_ti_README-ja) now point to gen_img.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@kohya-ss
kohya-ss merged commit 0205d63 into dev Sep 24, 2026
3 checks passed
@kohya-ss
kohya-ss deleted the remove-gen-img-diffusers branch September 24, 2026 10:02
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.

1 participant