mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
@@ -410,7 +410,9 @@ def control_run(state: str = '',
|
||||
blended_image = None
|
||||
|
||||
# set pipeline
|
||||
if pipe.__class__.__name__ != shared.sd_model.__class__.__name__:
|
||||
if pipe is None:
|
||||
return [], '', '', 'Pipeline not set'
|
||||
elif pipe.__class__.__name__ != shared.sd_model.__class__.__name__:
|
||||
original_pipeline = shared.sd_model
|
||||
shared.sd_model = pipe
|
||||
sd_models.move_model(shared.sd_model, shared.device)
|
||||
|
||||
@@ -365,5 +365,7 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t
|
||||
if debug_enabled:
|
||||
debug_log(f'Diffusers pipeline args: {args}')
|
||||
|
||||
_args = copy.deepcopy(args) # pipeline may modify underlying args
|
||||
_args = {}
|
||||
for k, v in args.items():
|
||||
_args[k] = copy.deepcopy(v) if not torch.is_tensor(v) else v # pipeline may modify underlying args
|
||||
return _args
|
||||
|
||||
@@ -175,7 +175,7 @@ def process_hires(p: processing.StableDiffusionProcessing, output):
|
||||
if shared.opts.samples_save and not p.do_not_save_samples and shared.opts.save_images_before_highres_fix and hasattr(shared.sd_model, 'vae'):
|
||||
save_intermediate(p, latents=output.images, suffix="-before-hires")
|
||||
shared.state.update('Upscale', 0, 1)
|
||||
output.images = resize_hires(p, latents=output.images)
|
||||
output.images = resize_hires(p, latents=output.images) if output is not None else []
|
||||
sd_hijack_hypertile.hypertile_set(p, hr=True)
|
||||
|
||||
latent_upscale = shared.latent_upscale_modes.get(p.hr_upscaler, None)
|
||||
|
||||
@@ -1085,6 +1085,8 @@ def get_signature(cls):
|
||||
|
||||
|
||||
def get_call(cls):
|
||||
if cls is None:
|
||||
return []
|
||||
signature = inspect.signature(cls.__call__, follow_wrapped=True, eval_str=True)
|
||||
return signature.parameters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user