John6666 commited on
Commit
15a474c
1 Parent(s): 7b920c0

Upload dc.py

Browse files
Files changed (1) hide show
  1. dc.py +3 -3
dc.py CHANGED
@@ -320,13 +320,13 @@ class GuiSD:
320
 
321
  def infer_short(self, model, pipe_params, progress=gr.Progress(track_tqdm=True)):
322
  progress(0, desc="Start inference...")
323
- images, image_list = model(**pipe_params)
324
  progress(1, desc="Inference completed.")
325
  if not isinstance(images, list): images = [images]
326
  img = []
327
  for image in images:
328
  img.append((image, None))
329
- return img
330
 
331
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
332
 
@@ -734,7 +734,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
734
  progress(1, desc="Preparation completed. Starting inference preparation...")
735
 
736
  sd_gen.load_new_model(model_name, vae, task_model_list[0], progress)
737
- images, info = sd_gen.generate_pipeline(prompt, negative_prompt, 1, num_inference_steps,
738
  guidance_scale, True, generator, lora1, lora1_wt, lora2, lora2_wt, lora3, lora3_wt,
739
  lora4, lora4_wt, lora5, lora5_wt, sampler,
740
  height, width, model_name, vae, task_model_list[0], None, "Canny", 512, 1024,
 
320
 
321
  def infer_short(self, model, pipe_params, progress=gr.Progress(track_tqdm=True)):
322
  progress(0, desc="Start inference...")
323
+ images, image_list, metadata = model(**pipe_params)
324
  progress(1, desc="Inference completed.")
325
  if not isinstance(images, list): images = [images]
326
  img = []
327
  for image in images:
328
  img.append((image, None))
329
+ return img, metadata
330
 
331
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
332
 
 
734
  progress(1, desc="Preparation completed. Starting inference preparation...")
735
 
736
  sd_gen.load_new_model(model_name, vae, task_model_list[0], progress)
737
+ images, metadata, info = sd_gen.generate_pipeline(prompt, negative_prompt, 1, num_inference_steps,
738
  guidance_scale, True, generator, lora1, lora1_wt, lora2, lora2_wt, lora3, lora3_wt,
739
  lora4, lora4_wt, lora5, lora5_wt, sampler,
740
  height, width, model_name, vae, task_model_list[0], None, "Canny", 512, 1024,