Skip to content

Commit

Permalink
Update ddetailer.py
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
Judongsung committed Feb 24, 2023
1 parent ff580eb commit 96b7801
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scripts/ddetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ def run(self, p, info,
)
p.do_not_save_grid = True
p.do_not_save_samples = True
p.raw_prompt = p_txt.prompt
p.raw_neg_prompt = p_txt.negative_prompt
output_images = []
state.job_count = ddetail_count
for n in range(ddetail_count):
Expand Down Expand Up @@ -330,6 +328,8 @@ def run(self, p, info,
processed = processing.process_images(p)
if initial_info is None:
initial_info = processed.info
if is_txt2img:
initial_info += f", raw prompt: {p_txt.prompt}, raw negative prompt: {p_txt.negative_prompt}"
p.seed = processed.seed + 1
p.init_images = processed.images

Expand Down Expand Up @@ -547,10 +547,4 @@ def inference_mmdet_bbox(image, modelname, conf_thres, label):

return results

def on_before_image_saved(params):
p = params.p
pnginfo = params.pnginfo
pnginfo['parameters'] += f', Raw prompt: {p.raw_prompt}, Raw negative prompt: {p.raw_neg_prompt}'

script_callbacks.on_before_image_saved(on_before_image_saved)
script_callbacks.on_ui_settings(on_ui_settings)

0 comments on commit 96b7801

Please sign in to comment.