kashif HF Staff commited on
Commit
f1a92d5
·
verified ·
1 Parent(s): 161c338

Add diffusers model_index.json and scheduler config for DFlashPipeline.from_pretrained

Browse files

This adds the two files needed for `diffusers` to load the pipeline directly via `DFlashPipeline.from_pretrained`:

- `model_index.json` — declares `DFlashPipeline` as the pipeline class and points
`_target_model_name_or_path` to the target/verifier model
- `scheduler/scheduler_config.json` — config for `DFlashTokenDiffusionScheduler`

After merging, the pipeline can be loaded with:

```python
import torch
from diffusers import DFlashPipeline

pipe = DFlashPipeline.from_pretrained(
"z-lab/Alpamayo-R1-10B-DFlash",
torch_dtype=torch.bfloat16,
device_map="auto",
)
out = pipe(prompt="Hello, world!")
print(out.texts[0])
```

model_index.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "DFlashPipeline",
3
+ "_diffusers_version": "0.40.0.dev0",
4
+ "_target_model_name_or_path": "z-lab/Alpamayo-R1-10B",
5
+ "scheduler": [
6
+ "diffusers",
7
+ "DFlashTokenDiffusionScheduler"
8
+ ]
9
+ }
scheduler/scheduler_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "_class_name": "DFlashTokenDiffusionScheduler",
3
+ "_diffusers_version": "0.40.0.dev0"
4
+ }