Skip to content

Commit

Permalink
change args copy to image-only
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Mandic <[email protected]>
  • Loading branch information
vladmandic committed Jan 12, 2025
1 parent b4575ad commit 583e4b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/processing_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t
debug_log(f'Diffusers pipeline args: {args}')

_args = {}
print(args['image'])
for k, v in args.items():
_args[k] = copy.deepcopy(v) if not torch.is_tensor(v) else v # pipeline may modify underlying args
if isinstance(v, Image.Image):
_args[k] = v.copy() # pipeline may modify underlying args
elif (isinstance(v, list) and len(v) > 0 and isinstance(v[0], Image.Image)):
_args[k] = [i.copy() for i in v]
else:
_args[k] = v
return _args

0 comments on commit 583e4b8

Please sign in to comment.