You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
203
203
)
204
204
output = stable_diffusion.txt_to_img(
205
205
prompt="a lovely cat",
206
206
width=512, # Must be a multiple of 64
207
207
height=512, # Must be a multiple of 64
208
208
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)
210
210
)
211
211
output[0].save("output.png") # Output returned as list of PIL Images
212
212
```
@@ -386,6 +386,19 @@ An `id_embeds.safetensors` file will be generated in `input_images_dir`.
386
386
387
387
- All the other parameters from Version 1 remain the same for Version 2.
388
388
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 importGGML_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
+
389
402
### Other High-level API Examples
390
403
391
404
Other examples for the high-level API (such as upscaling and model conversion) can be found in the [tests](tests) directory.
0 commit comments