Downloads · 30 days
0
ApacheOne/OBS-Diff-SDXL-creaprompthyper1.2
OBS-Diff-SDXL-creaprompthyper1.2 is a text-to-image model from ApacheOne. Use it when you need an image from a text prompt. It is set up for diffusers.
Downloads · 30 days
0
Access
Public
Updated Jul 19, 2026
Repo size
46.7 GB
Likes
0
Public
Click a slice to open those files.
.safetensors27.5 GB · 59%
From the Hugging Face model README
Base checkpoint: CreaPrompt Hyper SDXL 1.2
Inference: 4 steps · CFG 0.0 · DPM++ SDE normal · 1024×1024
Format: Diffusers UNet2DConditionModel components
[!IMPORTANT] These are complete loadable SDXL UNet components, not complete text-to-image pipelines.
You still need the original checkpoint's two text encoders, tokenizers, VAE, and scheduler.
[!NOTE] OBS-Diff applied unstructured pruning. The selected weights are stored as exact zeros, but the tensor shapes and parameter count remain unchanged. The folders are therefore approximately the same extracted size and do not automatically run faster with ordinary dense CUDA kernels.
This repository contains four independently pruned versions of the CreaPrompt Hyper SDXL 1.2 UNet:
| Variant | Targeted-weight sparsity | Whole-UNet zeros | Mean ImageReward | Delta vs. dense | Wins vs. dense | Mean generation time |
|---|---|---|---|---|---|---|
| Dense reference | 0.0000% | 0.0001% | +0.771080 | +0.000000 | — | 1.9656 s |
| OBS 20% | 20.0004% | 17.0132% | +0.758518 | -0.012563 | 2/4 | 1.9399 s |
| OBS 30% | 30.0004% | 25.5196% | +0.731054 | -0.040026 | 2/4 | 1.9611 s |
| OBS 40% | 40.0004% | 34.0260% | +0.687856 | -0.083225 | 3/4 | 1.9567 s |
| OBS 50% | 50.0004% | 42.5324% | +0.380332 | -0.390748 | 1/4 | 1.9403 s |
| Variant | Practical reading |
|---|---|
| 20% | Best overall fidelity/quality tradeoff in this small evaluation |
| 30% | Moderate quality decline with stronger output changes |
| 40% | More aggressive; won 3/4 individual comparisons but had a lower overall mean |
| 50% | Experimental; substantial quality instability and one severe failure |
The evaluation contains only four prompts, so these results are a screening benchmark, not a universal quality guarantee.
obs_diff_sdxl_results/
├── images/
│ ├── dense/
│ ├── sparsity_20/
│ ├── sparsity_30/
│ ├── sparsity_40/
│ └── sparsity_50/
├── unets/
│ ├── sparsity_20/
│ ├── sparsity_30/
│ ├── sparsity_40/
│ └── sparsity_50/
├── obs_sdxl_compare.html
├── obs_sdxl_compare.json
├── obs_sdxl_compare_scored.html
├── obs_sdxl_compare_scored.json
├── obs_diff_sdxl_prune.log
└── obs_diff_sdxl_imagereward.log
Each unets/sparsity_* directory is a complete Diffusers UNet component produced with save_pretrained().
| Dense | OBS 20% | OBS 30% | OBS 40% | OBS 50% |
|---|---|---|---|---|
| IR +1.138650 | IR +1.165112 | IR +1.243169 | IR +1.197060 | IR +1.149614 |
![]() | ![]() | ![]() | ![]() | ![]() |
| Dense | OBS 20% | OBS 30% | OBS 40% | OBS 50% |
|---|---|---|---|---|
| IR +0.776347 | IR +0.756794 | IR +0.515587 | IR +0.180844 | IR -0.667451 |
![]() | ![]() | ![]() | ![]() | ![]() |
| Dense | OBS 20% | OBS 30% | OBS 40% | OBS 50% |
|---|---|---|---|---|
| IR +0.458368 | IR +0.508567 | IR +0.511803 | IR +0.560043 | IR +0.362720 |
![]() | ![]() | ![]() | ![]() | ![]() |
| Dense | OBS 20% | OBS 30% | OBS 40% | OBS 50% |
|---|---|---|---|---|
| IR +0.710957 | IR +0.603597 | IR +0.653658 | IR +0.813476 | IR +0.676448 |
![]() | ![]() | ![]() | ![]() | ![]() |
The saved folders can be loaded independently as UNet2DConditionModel components.
import torch
from diffusers import UNet2DConditionModel
REPO_ID = "ApacheOne/OBS-Diff-SDXL-creaprompthyper1.2"
unet = UNet2DConditionModel.from_pretrained(
REPO_ID,
subfolder="obs_diff_sdxl_results/unets/sparsity_20",
torch_dtype=torch.float16,
)
unet.eval()
print(type(unet).__name__)
print(f"Parameters: {sum(p.numel() for p in unet.parameters()):,}")
Available subfolders:
obs_diff_sdxl_results/unets/sparsity_20
obs_diff_sdxl_results/unets/sparsity_30
obs_diff_sdxl_results/unets/sparsity_40
obs_diff_sdxl_results/unets/sparsity_50
These repositories contain the UNet only. Load the original complete CreaPrompt Hyper SDXL 1.2 checkpoint for the remaining SDXL components, then replace its UNet.
import torch
from diffusers import (
DPMSolverSinglestepScheduler,
StableDiffusionXLPipeline,
UNet2DConditionModel,
)
REPO_ID = "ApacheOne/OBS-Diff-SDXL-creaprompthyper1.2"
# Local copy of the original complete single-file checkpoint.
BASE_CHECKPOINT = (
"/content/models/hyper_sdxl_4step_471056.safetensors"
)
# Change to sparsity_20, sparsity_30, sparsity_40, or sparsity_50.
SPARSITY = "sparsity_20"
unet = UNet2DConditionModel.from_pretrained(
REPO_ID,
subfolder=f"obs_diff_sdxl_results/unets/{SPARSITY}",
torch_dtype=torch.float16,
)
pipe = StableDiffusionXLPipeline.from_single_file(
BASE_CHECKPOINT,
unet=unet,
torch_dtype=torch.float16,
use_safetensors=True,
)
pipe.scheduler = DPMSolverSinglestepScheduler.from_config(
pipe.scheduler.config,
algorithm_type="sde-dpmsolver++",
solver_order=2,
solver_type="midpoint",
lower_order_final=True,
use_karras_sigmas=False,
use_exponential_sigmas=False,
use_beta_sigmas=False,
final_sigmas_type="zero",
)
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()
pipe.to("cuda")
generator = torch.Generator("cuda").manual_seed(1234)
image = pipe(
prompt=(
"a cinematic photograph of a red fox standing in snow, "
"detailed fur, natural lighting"
),
width=1024,
height=1024,
num_inference_steps=4,
guidance_scale=0.0,
generator=generator,
).images[0]
image.save("obs_diff_sdxl_test.png")
OBS-Diff uses second-order information to select and compensate pruned weights. This adaptation calibrated the SDXL UNet using its four-step denoising trajectory and independently exported four sparsity targets.
Method: OBS-Diff / second-order unstructured pruning
Checkpoint format: Complete single-file SDXL checkpoint
UNet parameters: 2,567,463,684
Targeted parameters: 2,183,987,200
Calibration prompts: 16
Calibration size: 512×512
Comparison size: 1024×1024
Scheduler: DPM++ SDE normal
Inference steps: 4
Guidance scale: 0.0
OBS damping: 0.01
Column block: 128
Maximum tokens: 128
Evaluation seeds: 1234–1237
Quality metric: ImageReward
The percentage names refer to sparsity among the targeted attention and feed-forward weights, not the percentage of the complete UNet file physically deleted.
| Variant | Targeted zeros | Whole-UNet zeros |
|---|---|---|
| OBS 20% | 20.0004% | 17.0132% |
| OBS 30% | 30.0004% | 25.5196% |
| OBS 40% | 40.0004% | 34.0260% |
| OBS 50% | 50.0004% | 42.5324% |
The pruning is unstructured:
Original dense tensor shape → same tensor shape
Selected FP16 values → replaced by exact zero
Parameter count → unchanged
An FP16 zero still occupies two bytes in a normal dense SafeTensors tensor. Therefore:
The comparison used only four prompts. Individual outputs can improve even when the aggregate mean declines:
Use the provided HTML and JSON reports for the full per-image metrics:
obs_diff_sdxl_results/obs_sdxl_compare_scored.html
obs_diff_sdxl_results/obs_sdxl_compare_scored.json
sparsity_20It produced the smallest aggregate ImageReward decline in this initial comparison while retaining approximately 17.01% whole-UNet zeros.
</div>