Skip to content

Commit

Permalink
use prompt parameters for sdxl
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jun 1, 2024
1 parent 257e2ad commit acb3d7f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def __init__(self, pipeline):
self.pipeline = pipeline

def __call__(self, **args):
prompt, prompt_parameters = self._extract_parameters(prompt)
# Get user_config and delete it from args, it doesn't get passed to the pipeline
user_config = args.get("user_config", None)
del args["user_config"]
Expand All @@ -31,6 +32,9 @@ def __call__(self, **args):
args["guidance_scale"] = float(args["guidance_scale"])
if "guidance_rescale" in args:
args["guidance_rescale"] = float(args["guidance_rescale"])

# Use the prompt parameters to override args now
args.update(prompt_parameters)

# Call the pipeline with arguments and return the images
return self.pipeline(**args).images

0 comments on commit acb3d7f

Please sign in to comment.