Instructions to use DehongKong/dpir with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DehongKong/dpir with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("DehongKong/dpir", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload 2 files
Browse files
transformer/config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "SD3Transformer2DModel",
|
| 3 |
+
"_diffusers_version": "0.29.2",
|
| 4 |
+
"_name_or_path": "/data_mount/lifan/cloud_ckpts/cnext/cnext_v1.5/checkpoint-110000/cnext_ema",
|
| 5 |
+
"attention_head_dim": 64,
|
| 6 |
+
"caption_projection_dim": 1536,
|
| 7 |
+
"decay": 0.9999,
|
| 8 |
+
"in_channels": 16,
|
| 9 |
+
"inv_gamma": 1.0,
|
| 10 |
+
"joint_attention_dim": 4096,
|
| 11 |
+
"min_decay": 0.0,
|
| 12 |
+
"num_attention_heads": 24,
|
| 13 |
+
"num_layers": 24,
|
| 14 |
+
"optimization_step": 110000,
|
| 15 |
+
"out_channels": 16,
|
| 16 |
+
"patch_size": 2,
|
| 17 |
+
"pooled_projection_dim": 2048,
|
| 18 |
+
"pos_embed_max_size": 192,
|
| 19 |
+
"power": 0.6666666666666666,
|
| 20 |
+
"sample_size": 128,
|
| 21 |
+
"update_after_step": 0,
|
| 22 |
+
"use_ema_warmup": false
|
| 23 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f9401b3b9b7183a6638731c96b52f40976a8846cf5facab4de245edb70277ee2
|
| 3 |
+
size 8373090112
|