Skip to content

Commit 50562e5

Browse files
Merge branch 'dev'
2 parents a198c6e + 2f2bbd4 commit 50562e5

File tree

7 files changed

+332
-145
lines changed

7 files changed

+332
-145
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def progress_callback(step: int, steps: int, time: float):
275275
print("Completed step: {} of {}".format(step, steps))
276276
277277
def preview_callback(step: int, images: list[Image.Image], is_noisy: bool):
278-
images[0].save(f"{PREVIEW_OUTPUT_DIR}/{step}.png")
278+
images[0].save(f"preview/{step}.png")
279279
280280
stable_diffusion = StableDiffusion(
281281
model_path="../models/v1-5-pruned-emaonly.safetensors",
@@ -731,19 +731,20 @@ stable_diffusion.convert(
731731
732732
---
733733
734-
### <u>Listing GGML model/prediction/RNG types, sample/preview methods and schedulers</u>
734+
### <u>Listing LoRA apply modes, GGML model/prediction/RNG types, sample/preview methods and schedulers</u>
735735
736-
Access the GGML model/prediction/RNG types, sample/preview methods and schedulers via the following maps:
736+
Access the LoRA apply modes, GGML model/prediction/RNG types, sample/preview methods and schedulers via the following maps:
737737
738738
```python
739-
from stable_diffusion_cpp import GGML_TYPE_MAP, RNG_TYPE_MAP, SCHEDULER_MAP, SAMPLE_METHOD_MAP, PREDICTION_MAP, PREVIEW_MAP
739+
from stable_diffusion_cpp import GGML_TYPE_MAP, RNG_TYPE_MAP, SCHEDULER_MAP, SAMPLE_METHOD_MAP, PREDICTION_MAP, PREVIEW_MAP, LORA_APPLY_MODE_MAP
740740
741741
print("GGML model types:", list(GGML_TYPE_MAP))
742742
print("RNG types:", list(RNG_TYPE_MAP))
743743
print("Schedulers:", list(SCHEDULER_MAP))
744744
print("Sample methods:", list(SAMPLE_METHOD_MAP))
745745
print("Prediction types:", list(PREDICTION_MAP))
746746
print("Preview methods:", list(PREVIEW_MAP))
747+
print("LoRA apply modes:", list(LORA_APPLY_MODE_MAP))
747748
```
748749
749750
---

stable_diffusion_cpp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
# isort: on
66

7-
__version__ = "0.3.7"
7+
__version__ = "0.3.8"

stable_diffusion_cpp/_internals.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,14 @@ def __init__(
3333
lora_model_dir: str,
3434
embedding_dir: str,
3535
photo_maker_path: str,
36+
tensor_type_rules: str,
3637
vae_decode_only: bool,
3738
n_threads: int,
3839
wtype: int,
3940
rng_type: int,
41+
sampler_rng_type: int,
4042
prediction: int,
43+
lora_apply_mode: int,
4144
offload_params_to_cpu: bool,
4245
keep_clip_on_cpu: bool,
4346
keep_control_net_on_cpu: bool,
@@ -71,12 +74,15 @@ def __init__(
7174
lora_model_dir=lora_model_dir.encode("utf-8"),
7275
embedding_dir=embedding_dir.encode("utf-8"),
7376
photo_maker_path=photo_maker_path.encode("utf-8"),
77+
tensor_type_rules=tensor_type_rules.encode("utf-8"),
7478
vae_decode_only=vae_decode_only,
7579
free_params_immediately=False, # Don't unload model
7680
n_threads=n_threads,
7781
wtype=wtype,
7882
rng_type=rng_type,
83+
sampler_rng_type=sampler_rng_type,
7984
prediction=prediction,
85+
lora_apply_mode=lora_apply_mode,
8086
offload_params_to_cpu=offload_params_to_cpu,
8187
keep_clip_on_cpu=keep_clip_on_cpu,
8288
keep_control_net_on_cpu=keep_control_net_on_cpu,

0 commit comments

Comments
 (0)