switch processing class not restoring params

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-01-07 11:35:13 +01:00
parent fa85b267a5
commit 1a39b82fea
4 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
# Change Log for SD.Next
## Update for 2025-01-06
## Update for 2025-01-07
- **Models**
- [Qwen-Image-2512](https://huggingface.co/Qwen/Qwen-Image-2512)
@@ -22,6 +22,7 @@
- sdnq improvements
- startup sequence optimizations
- rocm/hip/hipblast detection and initialization improvements
- zluda detection and initialization improvements
- new env variable `SD_VAE_DEFAULT` to force default vae processing
- **Fixes**
- extension tab: update checker, date handling, formatting etc., thanks @awsr
@@ -32,6 +33,8 @@
- hip device name detection
- force align width/height to vae scale factor
- meituan-longca-image-edit missing image param
- mobile auto-collapse when using side panel, thanks @awsr
- switch processing class not restoring params
## Update for 2025-12-26
+1
View File
@@ -47,6 +47,7 @@
TODO: *Prioritize*!
- [LTXVideo 0.98 LongMulti](https://github.com/huggingface/diffusers/pull/12614)
- [Cosmos-Predict-2.5](https://huggingface.co/nvidia/Cosmos-Predict2.5-2B)
- [NewBie Image Exp0.1](https://github.com/huggingface/diffusers/pull/12803)
- [Sana-I2V](https://github.com/huggingface/diffusers/pull/12634#issuecomment-3540534268)
+8 -3
View File
@@ -592,13 +592,18 @@ class StableDiffusionProcessingControl(StableDiffusionProcessingImg2Img):
def switch_class(p: StableDiffusionProcessing, new_class: type, dct: dict = None):
signature = inspect.signature(type(new_class).__init__, follow_wrapped=True)
possible = list(signature.parameters)
kwargs = {}
signature = inspect.signature(StableDiffusionProcessing.__init__, follow_wrapped=True) # base class
possible = list(signature.parameters)
for k, v in p.__dict__.copy().items():
if k in possible:
kwargs[k] = v
if dct is not None:
signature = inspect.signature(type(new_class).__init__, follow_wrapped=True) # target class
possible = list(signature.parameters)
for k, v in p.__dict__.copy().items():
if k in possible:
kwargs[k] = v
if dct is not None: # overrides
for k, v in dct.items():
if k in possible:
kwargs[k] = v