fix pulid

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-01-10 08:00:17 -05:00
parent 6030e95016
commit 465d7caa3a
4 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+2
View File
@@ -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