Update externalmod.py
Browse files- externalmod.py +2 -2
externalmod.py
CHANGED
@@ -585,11 +585,11 @@ def find_model_list(author: str="", tags: list[str]=[], not_tag="", sort: str="l
|
|
585 |
return models
|
586 |
|
587 |
|
588 |
-
def save_image(image, savefile, modelname, prompt, nprompt, height=0, width=0, steps=
|
589 |
from PIL import Image, PngImagePlugin
|
590 |
import json
|
591 |
try:
|
592 |
-
metadata = {"prompt": prompt, "negative_prompt": nprompt, "Model": {"Model": modelname.split("/")[-1]}}
|
593 |
if steps > 0: metadata["num_inference_steps"] = steps
|
594 |
if cfg > 0: metadata["guidance_scale"] = cfg
|
595 |
if seed != -1: metadata["seed"] = seed
|
|
|
585 |
return models
|
586 |
|
587 |
|
588 |
+
def save_image(image, savefile, modelname, prompt, nprompt, height=0, width=0, steps=25, cfg=5, seed=-1):
|
589 |
from PIL import Image, PngImagePlugin
|
590 |
import json
|
591 |
try:
|
592 |
+
metadata = {"prompt": prompt, "scheduler":"sgm_uniform", "sampler":"dpmpp_2m", "negative_prompt": nprompt, "Model": {"Model": modelname.split("/")[-1]}}
|
593 |
if steps > 0: metadata["num_inference_steps"] = steps
|
594 |
if cfg > 0: metadata["guidance_scale"] = cfg
|
595 |
if seed != -1: metadata["seed"] = seed
|