Skip to content

Commit 3db4afb

Browse files
feat: update submodule, add smoothstep scheduler
1 parent 6075bd3 commit 3db4afb

File tree

5 files changed

+43
-40
lines changed

5 files changed

+43
-40
lines changed

stable_diffusion_cpp/stable_diffusion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ def __del__(self) -> None:
11851185
"exponential": Scheduler.EXPONENTIAL,
11861186
"ays": Scheduler.AYS,
11871187
"gits": Scheduler.GITS,
1188+
"smoothstep": Scheduler.SMOOTHSTEP,
11881189
"schedule_count": Scheduler.SCHEDULE_COUNT,
11891190
}
11901191

stable_diffusion_cpp/stable_diffusion_cpp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class SampleMethod(IntEnum):
202202
# EXPONENTIAL,
203203
# AYS,
204204
# GITS,
205+
# SMOOTHSTEP,
205206
# SCHEDULE_COUNT
206207
# };
207208
class Scheduler(IntEnum):
@@ -211,7 +212,8 @@ class Scheduler(IntEnum):
211212
EXPONENTIAL = 3
212213
AYS = 4
213214
GITS = 5
214-
SCHEDULE_COUNT = 6
215+
SMOOTHSTEP = 6
216+
SCHEDULE_COUNT = 7
215217

216218

217219
# // same as enum ggml_type

tests/test_sd3.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,39 @@ def callback(step: int, steps: int, time: float):
5252
# C++ CLI
5353
# ===========================================
5454

55-
import subprocess
56-
57-
stable_diffusion = None # Clear model
58-
59-
SD_CPP_CLI = "C:\\Users\\Willi\\Documents\\GitHub\\stable-diffusion.cpp\\build\\bin\\sd"
60-
61-
62-
cli_cmd = [
63-
SD_CPP_CLI,
64-
"--model",
65-
MODEL_PATH,
66-
"--t5xxl",
67-
T5XXL_PATH,
68-
"--clip_l",
69-
CLIP_L_PATH,
70-
"--clip_g",
71-
CLIP_G_PATH,
72-
"--prompt",
73-
PROMPT,
74-
"--height",
75-
str(HEIGHT),
76-
"--width",
77-
str(WIDTH),
78-
"--cfg-scale",
79-
str(CFG_SCALE),
80-
"--sampling-method",
81-
SAMPLE_METHOD,
82-
"--steps",
83-
str(SAMPLE_STEPS),
84-
"--clip-on-cpu",
85-
"--output",
86-
f"{OUTPUT_DIR}/sd3_cli.png",
87-
"-v",
88-
]
89-
print(" ".join(cli_cmd))
90-
subprocess.run(cli_cmd, check=True)
55+
# import subprocess
56+
57+
# stable_diffusion = None # Clear model
58+
59+
# SD_CPP_CLI = "C:\\Users\\Willi\\Documents\\GitHub\\stable-diffusion.cpp\\build\\bin\\sd"
60+
61+
62+
# cli_cmd = [
63+
# SD_CPP_CLI,
64+
# "--model",
65+
# MODEL_PATH,
66+
# "--t5xxl",
67+
# T5XXL_PATH,
68+
# "--clip_l",
69+
# CLIP_L_PATH,
70+
# "--clip_g",
71+
# CLIP_G_PATH,
72+
# "--prompt",
73+
# PROMPT,
74+
# "--height",
75+
# str(HEIGHT),
76+
# "--width",
77+
# str(WIDTH),
78+
# "--cfg-scale",
79+
# str(CFG_SCALE),
80+
# "--sampling-method",
81+
# SAMPLE_METHOD,
82+
# "--steps",
83+
# str(SAMPLE_STEPS),
84+
# "--clip-on-cpu",
85+
# "--output",
86+
# f"{OUTPUT_DIR}/sd3_cli.png",
87+
# "-v",
88+
# ]
89+
# print(" ".join(cli_cmd))
90+
# subprocess.run(cli_cmd, check=True)

tests/tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```bash
2-
pytest -s --maxfail=1
2+
pytest -s
33
```
44

55
```bash
6-
pytest tests\test_txt2img.py -s; pytest tests\test_controlnet.py -s; pytest tests\test_convert_model.py -s; pytest tests\test_flux.py -s; pytest tests\test_img2img.py -s; pytest tests\test_preprocess_canny.py -s; pytest tests\test_system_info.py -s; pytest tests\test_upscale.py -s; pytest tests\test_photomaker.py -s; pytest tests\test_inpainting.py -s; pytest tests\test_chroma.py -s; pytest tests\test_edit.py -s; pytest tests\test_vid.py -s; pytest tests/test_sd3.py -s
6+
pytest tests\test_txt2img.py -s; pytest tests\test_controlnet.py -s; pytest tests\test_convert_model.py -s; pytest tests\test_flux.py -s; pytest tests\test_img2img.py -s; pytest tests\test_preprocess_canny.py -s; pytest tests\test_system_info.py -s; pytest tests\test_list_maps.py -s; pytest tests\test_upscale.py -s; pytest tests\test_photomaker.py -s; pytest tests\test_inpainting.py -s; pytest tests\test_chroma.py -s; pytest tests\test_edit.py -s; pytest tests/test_sd3.py -s; pytest tests\test_vid.py -s;
77
```

0 commit comments

Comments
 (0)