mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix sag
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import cv2
|
||||
import math
|
||||
|
||||
|
||||
def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AREA):
|
||||
|
||||
@@ -397,7 +397,7 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
|
||||
update_sampler(shared.sd_model)
|
||||
supported = ['DDIMScheduler', 'PNDMScheduler', 'DDPMScheduler', 'DEISMultistepScheduler', 'UniPCMultistepScheduler', 'DPMSolverMultistepScheduler', 'DPMSolverSinlgestepScheduler']
|
||||
if sd_model.scheduler.__class__.__name__ in supported:
|
||||
sd_model = sd_models.switch_pipe(sd_model, diffusers.StableDiffusionSAGPipeline)
|
||||
sd_model = sd_models.switch_pipe(diffusers.StableDiffusionSAGPipeline, sd_model)
|
||||
p.extra_generation_params["SAG scale"] = p.sag_scale
|
||||
p.task_args['sag_scale'] = p.sag_scale
|
||||
else:
|
||||
|
||||
@@ -1008,7 +1008,7 @@ def switch_pipe(cls: diffusers.DiffusionPipeline, pipeline: diffusers.DiffusionP
|
||||
else:
|
||||
components_skipped.append(item)
|
||||
for item in possible:
|
||||
if item == 'self': # skip
|
||||
if item in ['self', 'args', 'kwargs']: # skip
|
||||
continue
|
||||
if signature.parameters[item].default != inspect._empty: # has default value so we dont have to worry about it # pylint: disable=protected-access
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user