Text-to-Image
Diffusers
Safetensors
Chinese
English
StableDiffusionXLPipeline
stable-diffusion
stable-diffusion-xl
sdxl
Instructions to use anhuanli/sen_v3-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use anhuanli/sen_v3-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("anhuanli/sen_v3-diffusers", 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
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from anhuanli/sen_v3-diffusers: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/anhuanli/sen_v3-diffusers/resolve/main/README.md
- Command line
-
hf download hf://anhuanli/sen_v3-diffusers/README.md
-
curl -L -o README.md https://huggingface.co/anhuanli/sen_v3-diffusers/resolve/main/README.md
2.27 kB
| license: other | |
| library_name: diffusers | |
| pipeline_tag: text-to-image | |
| tags: | |
| - stable-diffusion | |
| - stable-diffusion-xl | |
| - sdxl | |
| - text-to-image | |
| - diffusers | |
| language: | |
| - zh | |
| - en | |
| base_model: stabilityai/stable-diffusion-xl-base-1.0 | |
| # sen_v3 (diffusers format) | |
| SDXL 1.0 架构文生图模型,`diffusers` 目录格式。 | |
| 本仓库由单文件 checkpoint 转换而来,原始文件:[anhuanli/sen_v3](https://huggingface.co/anhuanli/sen_v3) | |
| ## 为什么有两个仓库 | |
| | 仓库 | 格式 | 适用场景 | | |
| | --- | --- | --- | | |
| | [anhuanli/sen_v3](https://huggingface.co/anhuanli/sen_v3) | 单文件 `.safetensors` | ComfyUI / WebUI / AI-Toolkit 填本地路径 | | |
| | **anhuanli/sen_v3-diffusers**(本仓库) | diffusers 目录 | `from_pretrained()` / AI-Toolkit 填仓库名 / 在线推理 | | |
| ## 精度说明 | |
| 转换时按源文件的原始精度逐组件保留,未做额外降精度: | |
| | 组件 | 精度 | 参数量 | | |
| | --- | --- | --- | | |
| | `unet` | float16 | 2.567 B | | |
| | `vae` | **float32** | 83.7 M | | |
| | `text_encoder` (CLIP-L) | float16 | 123.1 M | | |
| | `text_encoder_2` (OpenCLIP bigG) | float16 | 694.7 M | | |
| > VAE 保持 fp32 是刻意的:SDXL 的 VAE 在 fp16 下容易数值溢出(黑图、NaN)。`vae.config.force_upcast` 已设为 `true`。 | |
| > | |
| > 已逐张量比对验证:UNet / VAE / 文本编码器的权重与源文件 **maxdiff = 0.0**(完全一致)。 | |
| ## 使用方法 | |
| ```python | |
| import torch | |
| from diffusers import StableDiffusionXLPipeline | |
| pipe = StableDiffusionXLPipeline.from_pretrained( | |
| "anhuanli/sen_v3-diffusers", | |
| torch_dtype=torch.float16, | |
| ).to("cuda") | |
| image = pipe( | |
| prompt="a girl, soft light, detailed", | |
| num_inference_steps=28, | |
| guidance_scale=6.0, | |
| height=1024, width=1024, | |
| ).images[0] | |
| image.save("out.png") | |
| ``` | |
| ## AI-Toolkit 用法 | |
| 训练 LoRA 时,在 **Name or Path** 直接填: | |
| ``` | |
| anhuanli/sen_v3-diffusers | |
| ``` | |
| ## 模型来源与改动 | |
| - 基座:SDXL 1.0 | |
| - 微调方式 / 训练数据 / 触发词:**待补充** | |
| ## 限制与声明 | |
| - 生成内容由使用者自行负责,请遵守当地法律法规及平台条款。 | |
| - 训练数据未做完整审计,可能存在偏见或对特定风格/人物的过拟合。 | |
| - 商用前请自行核实基座模型(SDXL 1.0)的许可条款。 | |