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
- Preconverted gguf model from [silveroxides/Chroma-GGUF](https://huggingface.co/silveroxides/Chroma-GGUF)
373
-
- Otherwise, download chroma's safetensors from [lodestones/Chroma](https://huggingface.co/lodestones/Chroma)
376
+
- Preconverted gguf model from [silveroxides/Chroma1-Flash-GGUF](https://huggingface.co/silveroxides/Chroma1-Flash-GGUF), [silveroxides/Chroma1-Base-GGUF](https://huggingface.co/silveroxides/Chroma1-Base-GGUF) or [silveroxides/Chroma1-HD-GGUF](https://huggingface.co/silveroxides/Chroma1-HD-GGUF) ([silveroxides/Chroma-GGUF](https://huggingface.co/silveroxides/Chroma-GGUF) is DEPRECATED)
377
+
- Otherwise, download chroma's safetensors from [lodestones/Chroma1-Flash](https://huggingface.co/lodestones/Chroma1-Flash), [lodestones/Chroma1-Base](https://huggingface.co/lodestones/Chroma1-Base) or [lodestones/Chroma1-HD](https://huggingface.co/lodestones/Chroma1-HD) ([lodestones/Chroma](https://huggingface.co/lodestones/Chroma) is DEPRECATED)
374
378
- The `vae` and `t5xxl` models are the same as for FLUX image generation linked above (`clip_l` not required).
375
379
376
380
```python
377
381
from stable_diffusion_cpp import StableDiffusion
378
382
379
383
stable_diffusion = StableDiffusion(
380
-
diffusion_model_path="../models/chroma-unlocked-v40-Q4_0.gguf", # In place of model_path
384
+
diffusion_model_path="../models/Chroma1-HD-Flash-Q4_0.gguf", # In place of model_path
381
385
t5xxl_path="../models/t5xxl_fp16.safetensors",
382
386
vae_path="../models/ae.safetensors",
383
387
vae_decode_only=True, # Can be True if we are not generating image to image
388
+
chroma_use_dit_mask=False,
384
389
)
385
390
output = stable_diffusion.generate_image(
386
391
prompt="a lovely cat holding a sign says 'chroma.cpp'",
387
-
sample_steps=4,
388
392
cfg_scale=4.0, # a cfg_scale of 4 is recommended for Chroma
389
393
sample_method="euler", # euler is recommended for FLUX
390
394
)
@@ -510,16 +514,83 @@ An `id_embeds.safetensors` file will be generated in `input_images_dir`.
510
514
511
515
---
512
516
517
+
### <u>WAN Video Generation</u>
518
+
519
+
See [stable-diffusion.cpp WAN download weights](https://github.com/leejet/stable-diffusion.cpp/blob/master/docs/wan.md#download-weights) for a complete list of WAN models.
520
+
521
+
```python
522
+
from stable_diffusion_cpp import StableDiffusion
523
+
524
+
stable_diffusion = StableDiffusion(
525
+
diffusion_model_path="../models/wan2.1_t2v_1.3B_fp16.safetensors", # In place of model_path
As the output is simply a list of images (video frames), you can convert it into a video using any library you prefer. The example below uses `ffmpeg-python`. Alternatively, libraries such **OpenCV** or **MoviePy** can also be used.
543
+
544
+
>**Note**
545
+
>
546
+
> - You'll require **Python bindings for FFmpeg**, `python-ffmpeg` (`pip install ffmpeg-python`) in addition to an **FFmpeg installation on your system**, accessible in your PATH. Check with `ffmpeg -version`.
0 commit comments