lllyasviel / lllyasviel/stable-diffusion-webui-forge

Switching checkpoints on 50 Series (5090?) with Torch 2.7.0 Cu12.8 generates black squares or distorts image output

Open
#2,960 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

After switching back to a model, the image is either different on the same seed or completely black.
Generating with batch size 4, loras, and hi-res fix.
`processing.py:1040: RuntimeWarning: invalid value encountered in cast
x_sample = x_sample.astype(np.uint8)`

I do have xformers on.

I do have ADetailer but it's not related to the similar issue there.
It happens regardless of whether or not ADetailer is on after swapping a checkpoint.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at processing.py:1040 and reproduce the problem with checkpoint switching, Torch 2.7.0, CUDA 12.8, batch size 4, LoRAs, and hi-res fix. Compare output after switching back to a model and investigate the reported invalid-value warning; done means images are not black or distorted and same-seed output is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.