sky-admin
commited on
Commit
·
195e56f
1
Parent(s):
42f366f
fix:lora
Browse files- modules/scripts.py +0 -1
- predict.py +3 -3
modules/scripts.py
CHANGED
|
@@ -181,7 +181,6 @@ def list_scripts(scriptdirname, extension):
|
|
| 181 |
|
| 182 |
scripts_list = [x for x in scripts_list if os.path.splitext(x.path)[1].lower() == extension and os.path.isfile(x.path)]
|
| 183 |
|
| 184 |
-
print("111111111 scripts_list", scripts_list)
|
| 185 |
return scripts_list
|
| 186 |
|
| 187 |
|
|
|
|
| 181 |
|
| 182 |
scripts_list = [x for x in scripts_list if os.path.splitext(x.path)[1].lower() == extension and os.path.isfile(x.path)]
|
| 183 |
|
|
|
|
| 184 |
return scripts_list
|
| 185 |
|
| 186 |
|
predict.py
CHANGED
|
@@ -42,7 +42,7 @@ import modules.textual_inversion.textual_inversion
|
|
| 42 |
import modules.progress
|
| 43 |
|
| 44 |
import modules.ui
|
| 45 |
-
from modules import modelloader
|
| 46 |
from modules.shared import cmd_opts, opts
|
| 47 |
import modules.hypernetworks.hypernetwork
|
| 48 |
|
|
@@ -50,6 +50,7 @@ from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusion
|
|
| 50 |
|
| 51 |
|
| 52 |
def initialize():
|
|
|
|
| 53 |
modelloader.cleanup_models()
|
| 54 |
modules.sd_models.setup_model()
|
| 55 |
codeformer.setup_model(cmd_opts.codeformer_models_path)
|
|
@@ -94,7 +95,7 @@ class Predictor(BasePredictor):
|
|
| 94 |
self,
|
| 95 |
prompt: str = Input(description="prompt en", default="lora:koreanDollLikeness_v15:0.66, best quality, ultra high res, (photorealistic:1.4), 1girl, beige sweater, black choker, smile, laughing, bare shoulders, solo focus, ((full body), (brown hair:1), looking at viewer"),
|
| 96 |
negative_prompt: str = Input(description="negative prompt", default="paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, 3hands,4fingers,3arms, bad anatomy, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts,poorly drawn face,mutation,deformed"),
|
| 97 |
-
sampler_name: str = Input(description="sampler name", default="DPM++
|
| 98 |
steps: int = Input(description="steps", default=20),
|
| 99 |
cfg_scale: int = Input(description="cfg scale", default=8),
|
| 100 |
width: int = Input(description="width", default=512),
|
|
@@ -102,7 +103,6 @@ class Predictor(BasePredictor):
|
|
| 102 |
seed: int = Input(description="seed", default=-1),
|
| 103 |
) -> Path:
|
| 104 |
"""Run a single prediction on the model"""
|
| 105 |
-
modules.script_callbacks.before_ui_callback()
|
| 106 |
args = {
|
| 107 |
"do_not_save_samples": True,
|
| 108 |
"do_not_save_grid": True,
|
|
|
|
| 42 |
import modules.progress
|
| 43 |
|
| 44 |
import modules.ui
|
| 45 |
+
from modules import modelloader, extensions
|
| 46 |
from modules.shared import cmd_opts, opts
|
| 47 |
import modules.hypernetworks.hypernetwork
|
| 48 |
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
def initialize():
|
| 53 |
+
extensions.list_extensions()
|
| 54 |
modelloader.cleanup_models()
|
| 55 |
modules.sd_models.setup_model()
|
| 56 |
codeformer.setup_model(cmd_opts.codeformer_models_path)
|
|
|
|
| 95 |
self,
|
| 96 |
prompt: str = Input(description="prompt en", default="lora:koreanDollLikeness_v15:0.66, best quality, ultra high res, (photorealistic:1.4), 1girl, beige sweater, black choker, smile, laughing, bare shoulders, solo focus, ((full body), (brown hair:1), looking at viewer"),
|
| 97 |
negative_prompt: str = Input(description="negative prompt", default="paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, 3hands,4fingers,3arms, bad anatomy, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts,poorly drawn face,mutation,deformed"),
|
| 98 |
+
sampler_name: str = Input(description="sampler name", default="DPM++ 2M Karras", choices=["DPM++ SDE Karras", "DPM++ 2M Karras", "DPM++ 2S a Karras", "DPM2 a Karras", "DPM2 Karras", "LMS Karras", "DPM adaptive", "DPM fast", "DPM++ SDE", "DPM++ 2M", "DPM++ 2S a", "DPM2 a", "DPM2", "Heun", "LMS", "Euler", "Euler a"]),
|
| 99 |
steps: int = Input(description="steps", default=20),
|
| 100 |
cfg_scale: int = Input(description="cfg scale", default=8),
|
| 101 |
width: int = Input(description="width", default=512),
|
|
|
|
| 103 |
seed: int = Input(description="seed", default=-1),
|
| 104 |
) -> Path:
|
| 105 |
"""Run a single prediction on the model"""
|
|
|
|
| 106 |
args = {
|
| 107 |
"do_not_save_samples": True,
|
| 108 |
"do_not_save_grid": True,
|