Upload dc.py
Browse files
dc.py
CHANGED
@@ -677,6 +677,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
677 |
import numpy as np
|
678 |
MAX_SEED = np.iinfo(np.int32).max
|
679 |
|
|
|
680 |
load_lora_cpu = False
|
681 |
verbose_info = False
|
682 |
gpu_duration = 59
|
@@ -705,8 +706,8 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
705 |
progress(1, desc="Preparation completed. Starting inference...")
|
706 |
|
707 |
progress(0, desc="Loading model...")
|
708 |
-
for
|
709 |
-
|
710 |
progress(1, desc="Model loaded.")
|
711 |
progress(0, desc="Starting Inference...")
|
712 |
images = None
|
@@ -716,13 +717,12 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
716 |
height, width, model_name, vae, TASK_MODEL_LIST[0], None, "Canny", 512, 1024,
|
717 |
None, None, None, 0.35, 100, 200, 0.1, 0.1, 1.0, 0., 1., False, "Classic", None,
|
718 |
1.0, 100, 10, 30, 0.55, "Use same sampler", "", "",
|
719 |
-
False, True, 1, True, False,
|
720 |
False, False, False, True, False, "Use same sampler", False, "", "", 0.35, True, True, False, 4, 4, 32,
|
721 |
False, "", "", 0.35, True, True, False, 4, 4, 32,
|
722 |
True, None, None, "plus_face", "original", 0.7, None, None, "base", "style", 0.7, 0.0,
|
723 |
load_lora_cpu, verbose_info, gpu_duration
|
724 |
):
|
725 |
-
print(info_state)
|
726 |
images = stream_images
|
727 |
progress(1, desc="Inference completed.")
|
728 |
output_image = images[0][0] if images else None
|
|
|
677 |
import numpy as np
|
678 |
MAX_SEED = np.iinfo(np.int32).max
|
679 |
|
680 |
+
image_previews = True
|
681 |
load_lora_cpu = False
|
682 |
verbose_info = False
|
683 |
gpu_duration = 59
|
|
|
706 |
progress(1, desc="Preparation completed. Starting inference...")
|
707 |
|
708 |
progress(0, desc="Loading model...")
|
709 |
+
for _ in sd_gen.load_new_model(model_name, vae, TASK_MODEL_LIST[0]):
|
710 |
+
pass
|
711 |
progress(1, desc="Model loaded.")
|
712 |
progress(0, desc="Starting Inference...")
|
713 |
images = None
|
|
|
717 |
height, width, model_name, vae, TASK_MODEL_LIST[0], None, "Canny", 512, 1024,
|
718 |
None, None, None, 0.35, 100, 200, 0.1, 0.1, 1.0, 0., 1., False, "Classic", None,
|
719 |
1.0, 100, 10, 30, 0.55, "Use same sampler", "", "",
|
720 |
+
False, True, 1, True, False, image_previews, False, False, "./images", False, False, False, True, 1, 0.55,
|
721 |
False, False, False, True, False, "Use same sampler", False, "", "", 0.35, True, True, False, 4, 4, 32,
|
722 |
False, "", "", 0.35, True, True, False, 4, 4, 32,
|
723 |
True, None, None, "plus_face", "original", 0.7, None, None, "base", "style", 0.7, 0.0,
|
724 |
load_lora_cpu, verbose_info, gpu_duration
|
725 |
):
|
|
|
726 |
images = stream_images
|
727 |
progress(1, desc="Inference completed.")
|
728 |
output_image = images[0][0] if images else None
|