ComfyUI自定义设置全指南
一 基础与界面设置
二 模型与路径自定义
comfyui_desktop:
is_default: "true"
base_path: D:\ComfyUI
checkpoints: models/checkpoints
loras: models/loras
vae: models/vae
controlnet: models/controlnet
clip: models/clip
embeddings: models/embeddings
a1111:
base_path: D:\stable-diffusion-webui
checkpoints: models/Stable-diffusion
vae: models/VAE
loras: |
models/Lora
models/LyCORIS三 主题与前端资源自定义
python main.py --front-end-version comfyanonymous/ComfyUI@latest版本字符串格式为 [repoOwner]/[repoName]@[version],如指定具体版本或使用 latest。
python main.py --front-end-root /path/to/your/custom/frontend四 进阶自定义 样式模型与自定义节点
style_model = LoadStyleModel.load_style_model("your_style.safetensors")
conditioned = ApplyStyleModel.apply_stylemodel(cond, style_model, clip_vision_out, strength=0.6, strength_type=...)class TimesTwo:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"input1": ("INT", {})}}
RETURN_TYPES = ("INT",)
RETURN_NAMES = ("RETURN VALUE",)
FUNCTION = "funcTimesTwo"
CATEGORY = "CivitaiTutorials/BasicNodes"
def funcTimesTwo(self, input1):
return (input1 * 2,)
NODE_CLASS_MAPPINGS = {"btTimesTwo": TimesTwo}
NODE_DISPLAY_NAMES_MAPPINGS = {"btTimesTwo": "Basic Tutorial - Times Two"}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAMES_MAPPINGS']