Skip to content

Commit

Permalink
Merge pull request #96 from pythias/multi-prompts
Browse files Browse the repository at this point in the history
support multi prompts
  • Loading branch information
ototadana authored Jun 16, 2023
2 parents 9ddeed8 + eb6a1f9 commit 601efd0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/use_cases/image_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def proc_images(self, o: StableDiffusionProcessing, res: Processed, option: Opti
if subseed_index < len(res.all_subseeds):
p.subseed = res.all_subseeds[subseed_index]
subseed_index += 1

if type(p.prompt) == list:
p.prompt = p.prompt[i]

proc = self.proc_image(p, option, image)
edited_images.extend(proc.images)
all_seeds.extend(proc.all_seeds)
Expand Down Expand Up @@ -79,9 +83,7 @@ def __init_processing(self, p: StableDiffusionProcessingImg2Img, o: StableDiffus
p.width, p.height = image.size
p.sample = sample

def proc_image(
self, p: StableDiffusionProcessingImg2Img, option: Option, pre_proc_image: Image = None
) -> Processed:
def proc_image(self, p: StableDiffusionProcessingImg2Img, option: Option, pre_proc_image: Image = None) -> Processed:
params = option.to_dict()

if hasattr(p.init_images[0], "mode") and p.init_images[0].mode != "RGB":
Expand Down

0 comments on commit 601efd0

Please sign in to comment.