Instructions to use codemichaeld/sdn-xl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use codemichaeld/sdn-xl with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("codemichaeld/sdn-xl", 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 README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: diffusers
|
| 3 |
+
tags:
|
| 4 |
+
- fp8
|
| 5 |
+
- safetensors
|
| 6 |
+
- converted-by-gradio
|
| 7 |
+
---
|
| 8 |
+
# FP8 Model Conversion
|
| 9 |
+
- **Source**: `https://huggingface.co/ChenDY/NitroFusion`
|
| 10 |
+
- **Original File(s)**: `nitrosd-realism_comfyui.safetensors`
|
| 11 |
+
- **Original Format**: `safetensors`
|
| 12 |
+
- **FP8 Format**: `E4M3FN`
|
| 13 |
+
- **FP8 File**: `nitrosd-realism_comfyui-fp8-e4m3fn.safetensors`
|
| 14 |
+
|
| 15 |
+
## Usage
|
| 16 |
+
```python
|
| 17 |
+
from safetensors.torch import load_file
|
| 18 |
+
import torch
|
| 19 |
+
|
| 20 |
+
# Load FP8 model
|
| 21 |
+
fp8_state = load_file("nitrosd-realism_comfyui-fp8-e4m3fn.safetensors")
|
| 22 |
+
|
| 23 |
+
# Convert tensors back to float32 for computation (auto-converted by PyTorch)
|
| 24 |
+
model.load_state_dict(fp8_state)
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
> **Note**: FP8 tensors are automatically converted to float32 when loaded in PyTorch.
|
| 28 |
+
> Requires PyTorch ≥ 2.1 for FP8 support.
|
| 29 |
+
|
| 30 |
+
## Statistics
|
| 31 |
+
- **Total tensors**: 2513
|
| 32 |
+
- **Converted to FP8**: 2513
|
| 33 |
+
- **Skipped (non-float)**: 0
|