Skip to content

Commit ec89c55

Browse files
sync: update submodule
1 parent 66b1db1 commit ec89c55

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ def callback(step: int, steps: int, time: float):
199199

200200
stable_diffusion = StableDiffusion(
201201
model_path="../models/v1-5-pruned-emaonly.safetensors",
202-
wtype="default", # Weight type (default: automatically determines weight type of model file)
202+
# wtype="default", # Weight type (e.g. "q8_0", "f16", etc) (The "default" setting is automatically applied and determines the weight type of a model file)
203203
)
204204
output = stable_diffusion.txt_to_img(
205205
prompt="a lovely cat",
206206
width=512, # Must be a multiple of 64
207207
height=512, # Must be a multiple of 64
208208
progress_callback=callback,
209-
# seed=1337, # Uncomment to set a specific seed
209+
# seed=1337, # Uncomment to set a specific seed (use -1 for a random seed)
210210
)
211211
output[0].save("output.png") # Output returned as list of PIL Images
212212
```
@@ -386,6 +386,19 @@ An `id_embeds.safetensors` file will be generated in `input_images_dir`.
386386

387387
- All the other parameters from Version 1 remain the same for Version 2.
388388

389+
### Listing GGML model and RNG types, schedulers and sample methods
390+
391+
Access the GGML model and RNG types, schedulers, and sample methods via the following maps:
392+
393+
```python
394+
from stable_diffusion_cpp import GGML_TYPE_MAP, RNG_TYPE_MAP, SCHEDULE_MAP, SAMPLE_METHOD_MAP
395+
396+
print("GGML model types:", list(GGML_TYPE_MAP))
397+
print("RNG types:", list(RNG_TYPE_MAP))
398+
print("Schedulers:", list(SCHEDULE_MAP))
399+
print("Sample methods:", list(SAMPLE_METHOD_MAP))
400+
```
401+
389402
### Other High-level API Examples
390403

391404
Other examples for the high-level API (such as upscaling and model conversion) can be found in the [tests](tests) directory.

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.2.3"
7+
__version__ = "0.2.4"

tests/test_list_maps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from stable_diffusion_cpp import GGML_TYPE_MAP, RNG_TYPE_MAP, SCHEDULE_MAP, SAMPLE_METHOD_MAP
2+
3+
print("GGML model types:", list(GGML_TYPE_MAP))
4+
print("RNG types:", list(RNG_TYPE_MAP))
5+
print("Schedulers:", list(SCHEDULE_MAP))
6+
print("Sample methods:", list(SAMPLE_METHOD_MAP))

0 commit comments

Comments
 (0)