Unverified Commit e35d8b49 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #4778 from leppie/fix_unbounded_prompt_growth

Fix unbounded prompt growth/determinism in scripts that loop
parents 0d702930 9bbe1e3c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -453,6 +453,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
    modules.sd_hijack.model_hijack.clear_comments()
    modules.sd_hijack.model_hijack.clear_comments()


    comments = {}
    comments = {}
    prompt_tmp = p.prompt
    negative_prompt_tmp = p.negative_prompt


    shared.prompt_styles.apply_styles(p)
    shared.prompt_styles.apply_styles(p)


@@ -599,6 +601,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
    if p.scripts is not None:
    if p.scripts is not None:
        p.scripts.postprocess(p, res)
        p.scripts.postprocess(p, res)


    p.prompt = prompt_tmp
    p.negative_prompt = negative_prompt_tmp

    return res
    return res