Update sdfile.py
Browse files
sdfile.py
CHANGED
@@ -43,7 +43,7 @@ def get_pipelines( name:PIPELINES, enable_cpu_offload = False, ) -> StableDiffus
|
|
43 |
def generate(
|
44 |
prompt,
|
45 |
pipeline_name: PIPELINES,
|
46 |
-
|
47 |
num_inference_steps = 30,
|
48 |
negative_prompt = None,
|
49 |
width = 512,
|
@@ -67,7 +67,7 @@ def generate(
|
|
67 |
print("kwargs",kwargs)
|
68 |
|
69 |
if pipeline_name =="sketch2img" and sketch_pil:
|
70 |
-
kwargs.update(
|
71 |
elif pipeline_name == "txt2img":
|
72 |
kwargs.update(width = width, height = height)
|
73 |
else:
|
|
|
43 |
def generate(
|
44 |
prompt,
|
45 |
pipeline_name: PIPELINES,
|
46 |
+
image = None,
|
47 |
num_inference_steps = 30,
|
48 |
negative_prompt = None,
|
49 |
width = 512,
|
|
|
67 |
print("kwargs",kwargs)
|
68 |
|
69 |
if pipeline_name =="sketch2img" and sketch_pil:
|
70 |
+
kwargs.update(image=sketch_pil,controlnet_conditioning_scale=controlnet_conditioning_scale)
|
71 |
elif pipeline_name == "txt2img":
|
72 |
kwargs.update(width = width, height = height)
|
73 |
else:
|