Eugeoter commited on
Commit
2bddbaf
·
verified ·
1 Parent(s): f5ae185

Translated README.md into Chinese

Browse files
Files changed (1) hide show
  1. README_zh.md +120 -0
README_zh.md ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: fair-ai-public-license-1.0-sd
4
+ license_link: https://freedevproject.org/faipl-1.0-sd/
5
+ language:
6
+ - en
7
+ base_model:
8
+ - Laxhar/noobai-XL_v1.0
9
+ pipeline_tag: text-to-image
10
+ tags:
11
+ - safetensors
12
+ - diffusers
13
+ - stable-diffusion
14
+ - stable-diffusion-xl
15
+ - art
16
+ - not-for-all-audiences
17
+ library_name: diffusers
18
+ ---
19
+
20
+ <h1 align="center"><strong style="font-size: 48px;">NoobAI XL V预测 0.5</strong></h1>
21
+
22
+ # 模型介绍
23
+
24
+ 本图像生成模型基于 [Laxhar/noobai-XL_v1.0](https://huggingface.co/Laxhar/noobai-XL-1.0)。模型使用了完整的 Danbooru 和 e621 数据集训练,同时支持原生标签和自然语言描述。
25
+
26
+ 本模型是一个 v-prediction 模型(与 eps-prediction 不同),需要特定的参数配置,详细信息请参考下面的章节。
27
+
28
+ 特别感谢我的队友 [Euge](https://huggingface.co/Eugeoter) 的编码工作,同时感谢社区中许多乐于助人的成员提供的技术支持。
29
+
30
+ # ⚠️ 重要提示 ⚠️
31
+
32
+ ## **该模型与一般的(噪声预测)模型具有不同的工作方式**
33
+
34
+ ## **请仔细阅读使用指南!**
35
+
36
+ ## 模型细节
37
+
38
+ - **开发者**: [Laxhar Lab](https://huggingface.co/Laxhar)
39
+ - **模型类型**: Diffusion-based text-to-image generative model
40
+ - **基础模型**: [Laxhar/noobai-XL_v1.0](https://huggingface.co/Laxhar/noobai-XL-1.0)
41
+ - **算力赞助**: [Lanyun Cloud](https://cloud.lanyun.net)
42
+
43
+ ---
44
+
45
+ # 如何使用该模型?
46
+
47
+ ## 方法一: [reForge](https://github.com/Panchovix/stable-diffusion-webui-reForge/tree/dev_upstream)
48
+
49
+ 1. (如果您尚未安装 reForge) 请按照存储库中的说明安装 reForge;
50
+
51
+ 2. 启动 reForge UI 并像往常一样使用模型!
52
+
53
+ ## 方法二: [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
54
+
55
+ 示例工作流:
56
+
57
+ [comfy_ui_workflow_sample](/Laxhar/noobai-XL-Vpred-0.5/blob/main/comfy_ui_workflow_sample.png)
58
+
59
+ ## 方法三: [WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
60
+
61
+ **注意**:该方法可能会产生 BUG,因此请谨慎使用。
62
+ **注意**: 请确保您的机器上已安装 Git 并正确配置环境。
63
+
64
+ 1. (如果您尚未安装 WebUI) 请按照存储库中的说明安装 WebUI;
65
+ 2. 使用控制台切换至 `dev` 分支:
66
+
67
+ ```bash
68
+ git checkout dev
69
+ ```
70
+
71
+ 3. 拉取最新更新:
72
+
73
+ ```bash
74
+ git pull
75
+ ```
76
+
77
+ 4. 启动 WebUI 并像往常一样使用模型!
78
+
79
+ ## 方法四: [Diffusers](https://huggingface.co/docs/diffusers/en/index)
80
+
81
+ ```python
82
+ import torch
83
+ from diffusers import StableDiffusionXLPipeline
84
+ from diffusers import EulerDiscreteScheduler
85
+
86
+ ckpt_path = "/path/to/model.safetensors"
87
+ pipe = StableDiffusionXLPipeline.from_single_file(
88
+ ckpt_path,
89
+ use_safetensors=True,
90
+ torch_dtype=torch.float16,
91
+ )
92
+ scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
93
+ pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, **scheduler_args)
94
+ pipe.enable_xformers_memory_efficient_attention()
95
+ pipe = pipe.to("cuda")
96
+
97
+ prompt = """masterpiece, best quality,artist:john_kafka,artist:nixeu,artist:quasarcake, chromatic aberration, film grain, horror \(theme\), limited palette, x-shaped pupils, high contrast, color contrast, cold colors, arlecchino \(genshin impact\), black theme, gritty, graphite \(medium\)"""
98
+ negative_prompt = "nsfw, worst quality, old, early, low quality, lowres, signature, username, logo, bad hands, mutated hands, mammal, anthro, furry, ambiguous form, feral, semi-anthro"
99
+
100
+ image = pipe(
101
+ prompt=prompt,
102
+ negative_prompt=negative_prompt,
103
+ width=832,
104
+ height=1216,
105
+ num_inference_steps=28,
106
+ guidance_scale=5,
107
+ generator=torch.Generator().manual_seed(42),
108
+ ).images[0]
109
+
110
+ image.save("output.png")
111
+ ```
112
+
113
+ ---
114
+
115
+ # 推荐生图参数
116
+
117
+ - CFG Scale: 4 ~ 5
118
+ - 采样步数: 28 ~ 35
119
+ - 采样器: **Euler** (⚠️ 其他采样器可能会导致过饱和等问题)
120
+ - 分辨率:总面积围绕 1024x1024. 最好从下面几个分辨率中选:768x1344, **832x1216**, 896x1152, 1024x1024, 1152x896, 1216x832, 1344x768