noobai-XL-Vpred-0.5 / README_zh.md
NebulaeWis's picture
Translated README.md into Chinese (#7)
42c30d2 verified
metadata
license: other
license_name: fair-ai-public-license-1.0-sd
license_link: https://freedevproject.org/faipl-1.0-sd/
language:
  - en
base_model:
  - Laxhar/noobai-XL_v1.0
pipeline_tag: text-to-image
tags:
  - safetensors
  - diffusers
  - stable-diffusion
  - stable-diffusion-xl
  - art
  - not-for-all-audiences
library_name: diffusers

NoobAI XL V预测 0.5

模型介绍

本图像生成模型基于 Laxhar/noobai-XL_v1.0。模型使用了完整的 Danbooru 和 e621 数据集训练,同时支持原生标签和自然语言描述。

本模型是一个 v-prediction 模型(与 eps-prediction 不同),需要特定的参数配置,详细信息请参考下面的章节。

特别感谢我的队友 Euge 的编码工作,同时感谢社区中许多乐于助人的成员提供的技术支持。

⚠️ 重要提示 ⚠️

该模型与一般的(噪声预测)模型具有不同的工作方式

请仔细阅读使用指南!

模型细节


如何使用该模型?

方法一: reForge

  1. (如果您尚未安装 reForge) 请按照存储库中的说明安装 reForge;

  2. 启动 reForge UI 并像往常一样使用模型!

方法二: ComfyUI

示例工作流:

comfy_ui_workflow_sample

方法三: WebUI

注意:该方法可能会产生 BUG,因此请谨慎使用。 注意: 请确保您的机器上已安装 Git 并正确配置环境。

  1. (如果您尚未安装 WebUI) 请按照存储库中的说明安装 WebUI;
  2. 使用控制台切换至 dev 分支:
git checkout dev
  1. 拉取最新更新:
git pull
  1. 启动 WebUI 并像往常一样使用模型!

方法四: Diffusers

import torch
from diffusers import StableDiffusionXLPipeline
from diffusers import EulerDiscreteScheduler

ckpt_path = "/path/to/model.safetensors"
pipe = StableDiffusionXLPipeline.from_single_file(
    ckpt_path,
    use_safetensors=True,
    torch_dtype=torch.float16,
)
scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, **scheduler_args)
pipe.enable_xformers_memory_efficient_attention()
pipe = pipe.to("cuda")

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\)"""
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"

image = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=832,
    height=1216,
    num_inference_steps=28,
    guidance_scale=5,
    generator=torch.Generator().manual_seed(42),
).images[0]

image.save("output.png")

推荐生图参数

  • CFG Scale: 4 ~ 5
  • 采样步数: 28 ~ 35
  • 采样器: Euler (⚠️ 其他采样器可能会导致过饱和等问题)
  • 分辨率:总面积围绕 1024x1024. 最好从下面几个分辨率中选:768x1344, 832x1216, 896x1152, 1024x1024, 1152x896, 1216x832, 1344x768