feat(ml): modelos con prefijo de categoría (IMG_/VIDEO_/3D_) + refs actualizadas
Renombra los 13 checkpoints/diffusion models de ComfyUI prefijando la
categoría al inicio del nombre, para que en el dropdown de carga el usuario
distinga de inmediato imagen/vídeo/3D y no cargue un modelo en el nodo
equivocado. Misma operación que se hizo con los LoRAs (report 0197) pero
sobre los modelos.
Clasificación:
- IMG_: dreamshaper_8, juggernaut_xl_v11, v1-5-pruned-emaonly-fp16,
flux1-dev-fp8-e4m3fn, flux1-schnell-fp8-e4m3fn
- VIDEO_: svd, ltx-video-2b-v0.9.5, wan2.1_t2v_1.3B_fp16
- 3D_: stable_zero123, sv3d_p, hunyuan3d-dit-v2-mini, hunyuan3d-dit-v2-mv,
hy3dgen/hunyuan3d-dit-v2-0-fp16 (mantiene subcarpeta)
A diferencia de los LoRAs aquí solo se PREFIJA la categoría conservando el
nombre completo (versión/arquitectura). Archivos físicos renombrados en
~/ComfyUI/models/checkpoints, /mnt/2tb/comfyui_models/{checkpoints,
diffusion_models} y la subcarpeta hy3dgen/. Mapa de reversión en
~/ComfyUI/models/checkpoints/_ckpt_rename_map.json.
Actualiza todas las refs (ckpt_name/unet_name + defaults + prosa) en los
builders gamedev/vídeo/3D, style presets, pipelines, tests y los workflows
de ComfyUI. Arregla de paso el default roto de comfyui_text_to_3d_oneshot
(apuntaba a v1-5-pruned-emaonly.safetensors inexistente; ahora al real
IMG_v1-5-pruned-emaonly-fp16.safetensors).
No tocados (justificado): repo-paths de HuggingFace en comfyui_install_3d_model
(<repo>/model.fp16.safetensors son rutas de descarga, no nombres de dropdown)
y el mock de stable-diffusion.cpp en test_genconfig_to_sdcpp_args.
Verificado: dropdowns CheckpointLoaderSimple + UNETLoader listan los nombres
con prefijo; 1 generación real con IMG_juggernaut_xl_v11 (node_errors vacío,
pixelart_00003_.png); 327 tests comfyui verdes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
from browser.comfyui_load_workflow_ui import comfyui_load_workflow_ui
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
)
|
||||
# Requiere la UI de ComfyUI abierta en el Chrome con CDP en el puerto 9222.
|
||||
|
||||
@@ -90,7 +90,7 @@ if __name__ == "__main__":
|
||||
from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="v1-5-pruned-emaonly-fp16.safetensors",
|
||||
ckpt_name="IMG_v1-5-pruned-emaonly-fp16.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
)
|
||||
print(json.dumps(comfyui_load_workflow_ui(wf), ensure_ascii=False, indent=2))
|
||||
|
||||
@@ -19,7 +19,7 @@ def test_golden_apply_gameboy_to_subject():
|
||||
# builder_kwargs trae las claves comunes a los builders de sujeto, listas para **spread.
|
||||
bk = ap["builder_kwargs"]
|
||||
assert set(bk) == {"style", "checkpoint", "lora", "lora_strength", "negative"}
|
||||
assert bk["checkpoint"] == "dreamshaper_8.safetensors"
|
||||
assert bk["checkpoint"] == "IMG_dreamshaper_8.safetensors"
|
||||
assert bk["lora"] is None
|
||||
assert "Game Boy" in bk["style"]
|
||||
# Recomendaciones y post propagados.
|
||||
|
||||
@@ -37,7 +37,7 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
from ml.comfyui_batch_generate import comfyui_batch_generate
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="v1-5-pruned-emaonly-fp16.safetensors",
|
||||
ckpt_name="IMG_v1-5-pruned-emaonly-fp16.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
)
|
||||
|
||||
@@ -83,7 +83,7 @@ if __name__ == "__main__":
|
||||
from comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="v1-5-pruned-emaonly-fp16.safetensors",
|
||||
ckpt_name="IMG_v1-5-pruned-emaonly-fp16.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_achievement_badge_workflow(badge: str, *, tier: str = \"gold\", style: str = \"game achievement badge, ornate\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"achievement_badge\") -> dict"
|
||||
signature: "def comfyui_build_achievement_badge_workflow(badge: str, *, tier: str = \"gold\", style: str = \"game achievement badge, ornate\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"achievement_badge\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UNA insignia / medalla / logro 2D (achievement, recompensa, rango): un trofeo, una medalla con cinta, un escudo de logro, una estrella o un badge de rango que la UI de achievements pinta cuando el jugador desbloquea un hito, con TIER metalico (bronce / plata / oro / platino / diamante) que distingue el grado. Centrado, fondo limpio uniforme, recortable a alpha, estilo consistente entre insignias del set. DISTINTO de item_icon (objeto de inventario suelto, sin tier ni cinta), status_effect_icon (simbolo de estado superpuesto sin marco) y skill_tree_node (nodo enmarcado de la rejilla de talentos con estado unlocked/locked): esto es la INSIGNIA DE LOGRO/RECOMPENSA = trofeo/medalla con cinta + tier. El tier metalico y la forma de medalla/trofeo son la firma del asset. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_item_icon/skill_tree_node_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, ui, achievement, badge, medal, trophy, reward, tier, ribbon, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes las insignias de un set (ej. 'game achievement badge, ornate', 'flat minimal medal', 'pixel art trophy'). Pasa el MISMO style + checkpoint + lora a todas las insignias del set para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 256 por defecto: las insignias de logro se muestran a tamano reducido en el panel. keyword-only."
|
||||
- name: transparent
|
||||
@@ -132,8 +132,8 @@ Eligela frente a sus hermanos por el ROL del asset:
|
||||
- **El texto/nombre lo pone el motor, no la imagen**: el negativo por defecto empuja a
|
||||
"no text/no letters/no numbers" para que la insignia quede limpia; el nombre del logro,
|
||||
la descripcion y la fecha los renderiza el juego sobre el badge.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512; con dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512; con IMG_dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- `transparent=False` deja la insignia opaca sobre fondo plano: util si prefieres
|
||||
recortar fuera del workflow o el motor compone sobre un slot solido.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
|
||||
@@ -129,7 +129,7 @@ def comfyui_build_achievement_badge_workflow(
|
||||
*,
|
||||
tier: str = "gold",
|
||||
style: str = "game achievement badge, ornate",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 256,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -158,8 +158,8 @@ def comfyui_build_achievement_badge_workflow(
|
||||
(ej. "game achievement badge, ornate", "flat minimal medal", "pixel art
|
||||
trophy"). Pasa el MISMO style + checkpoint + (lora) a todas las insignias
|
||||
del set para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para
|
||||
SDXL (mas VRAM, subir size). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 256 por defecto: las
|
||||
insignias de logro se muestran a tamano reducido en el panel. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
purity: pure
|
||||
version: 1.0.0
|
||||
signature: "def comfyui_build_asset_variant_workflow(input_image: str, variant: str, *, checkpoint: str = \"dreamshaper_8.safetensors\", denoise: float = 0.5, style: str = \"game asset\", size: int | None = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, upscale_method: str = \"lanczos\", crop: str = \"disabled\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"asset_variant\") -> dict"
|
||||
signature: "def comfyui_build_asset_variant_workflow(input_image: str, variant: str, *, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", denoise: float = 0.5, style: str = \"game asset\", size: int | None = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, upscale_method: str = \"lanczos\", crop: str = \"disabled\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"asset_variant\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de una VARIANTE img2img de un asset 2D ya generado: parte de una IMAGEN existente (un sprite de enemigo, un icono...) y produce una version coherente que cambia material/paleta/tier/estado (ice element, fire element, battle-damaged, golden tier 2, corrupted) manteniendo la composicion, la pose y la silueta del original. A diferencia de los builders gamedev hermanos (enemy_creature, item_icon...), que parten de TEXTO (txt2img desde ruido), este parte de una imagen via img2img con denoise MEDIO (~0.45-0.6): el KSampler arranca del latente de la imagen base, no de ruido. Normaliza el tamano con un ImageScale opcional (size) o preserva las dimensiones del original (size=None). Compone comfyui_build_img2img_workflow + comfyui_inject_lora (estilo opcional). Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, img2img, variant, asset-transform, stable-diffusion, workflow]
|
||||
uses_functions: [comfyui_build_img2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -19,7 +19,7 @@ params:
|
||||
- name: variant
|
||||
desc: "Descripcion de la variante a producir (ej. 'ice element, frozen', 'fire element, molten', 'battle-damaged, cracked', 'golden tier 2', 'corrupted shadow'). Reescribe material/paleta/estado del asset manteniendo su composicion. No describe el sujeto desde cero: transforma el que ya existe en input_image. No puede estar vacio."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
- name: denoise
|
||||
desc: "Fuerza de denoising del KSampler (cuanto se aparta del original). ~0.3 apenas cambia; 0.45-0.6 (recomendado) cambia material/paleta conservando silueta/pose; ~0.8 se aleja y empieza a ser casi txt2img. Se clampa a [0.0, 1.0]. keyword-only."
|
||||
- name: style
|
||||
|
||||
@@ -109,7 +109,7 @@ def comfyui_build_asset_variant_workflow(
|
||||
input_image: str,
|
||||
variant: str,
|
||||
*,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
denoise: float = 0.5,
|
||||
style: str = "game asset",
|
||||
size: int | None = 512,
|
||||
@@ -138,7 +138,7 @@ def comfyui_build_asset_variant_workflow(
|
||||
manteniendo su composicion. No puede estar vacio. Es lo que diferencia
|
||||
este builder de un txt2img: NO describe el sujeto desde cero, transforma
|
||||
uno que ya existe en la imagen base.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto. keyword-only.
|
||||
denoise: fuerza de denoising del KSampler (cuanto se aparta del original).
|
||||
~0.3 apenas cambia; 0.45-0.6 (recomendado) cambia material/paleta
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_card_art_workflow(subject: str, *, card_style: str = \"fantasy trading card art\", checkpoint: str = \"juggernaut_xl_v11.safetensors\", width: int = 512, height: int = 768, hires: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", upscale_by: float = 1.5, hires_denoise: float = 0.4, upscale_model: str = \"4x_foolhardy_Remacri.pth\", filename_prefix: str = \"card_art\") -> dict"
|
||||
signature: "def comfyui_build_card_art_workflow(subject: str, *, card_style: str = \"fantasy trading card art\", checkpoint: str = \"IMG_juggernaut_xl_v11.safetensors\", width: int = 512, height: int = 768, hires: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", upscale_by: float = 1.5, hires_denoise: float = 0.4, upscale_model: str = \"4x_foolhardy_Remacri.pth\", filename_prefix: str = \"card_art\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN arte de carta coleccionable (TCG) 2D: ilustracion central de una criatura/personaje/hechizo en formato vertical de carta (~512x768), composicion centrada y dramatica, dejando aire para que el motor/post anada marco/titulo/stats. Genera SOLO la ilustracion (el chrome de la carta NO). Compone comfyui_build_hires_fix_workflow (si hires) o comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional). Hermano de comfyui_build_portrait_avatar/item_icon/ui_hud_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, card, tcg, trading-card, illustration, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_build_hires_fix_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: card_style
|
||||
desc: "Descriptor de estilo de la ilustracion que mantiene coherentes las cartas de un set (ej. 'fantasy trading card art', 'anime trading card art', 'realistic painted card art', 'dark gothic card art'). Pasa el MISMO card_style + checkpoint + lora a todas las cartas del set para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL, mejor detalle) por defecto; en 8GB lowvram con hires puede ser pesado: usa 'dreamshaper_8.safetensors' (SD1.5) y/o hires=False si la GPU se queda corta. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL, mejor detalle) por defecto; en 8GB lowvram con hires puede ser pesado: usa 'IMG_dreamshaper_8.safetensors' (SD1.5) y/o hires=False si la GPU se queda corta. keyword-only."
|
||||
- name: width
|
||||
desc: "Ancho del lienzo en px. Vertical de carta -> width < height. 512 por defecto. keyword-only."
|
||||
- name: height
|
||||
@@ -66,18 +66,18 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_card_art_workflow import comfyui_build_card_art_workflow
|
||||
|
||||
# Arte de carta de un dragon de fuego, formato vertical, con detalle hires, listo para submit.
|
||||
# En 8GB lowvram va holgado con SD1.5 (dreamshaper_8); SDXL+hires es mas pesado.
|
||||
# En 8GB lowvram va holgado con SD1.5 (IMG_dreamshaper_8); SDXL+hires es mas pesado.
|
||||
wf = comfyui_build_card_art_workflow(
|
||||
"a fire dragon breathing flames",
|
||||
card_style="fantasy trading card art",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
# Set coherente: misma firma de estilo para cada carta, varia solo subject.
|
||||
# for s in ["a fire dragon breathing flames", "an elven archer", "a frost elemental"]:
|
||||
# wf = comfyui_build_card_art_workflow(s, card_style="fantasy trading card art",
|
||||
# checkpoint="dreamshaper_8.safetensors", seed=7)
|
||||
# checkpoint="IMG_dreamshaper_8.safetensors", seed=7)
|
||||
# comfyui_submit_workflow(wf) # -> comfyui_wait_result -> comfyui_fetch_output_image
|
||||
# El marco/titulo/stats los compone el motor de juego sobre la ilustracion resultante.
|
||||
```
|
||||
@@ -104,9 +104,9 @@ de post sobre la ilustracion — este builder NO los pinta.
|
||||
y describe el marco en `subject`/`card_style` (no recomendado: el motor compone mejor).
|
||||
- **Formato vertical = `width < height`**: una carta es mas alta que ancha. 512x768
|
||||
(SD1.5) o 768x1152 (SDXL nativo). Si pones width>=height pierdes el encuadre de carta.
|
||||
- **SDXL + hires es pesado en 8GB lowvram**: el default `juggernaut_xl_v11` con
|
||||
- **SDXL + hires es pesado en 8GB lowvram**: el default `IMG_juggernaut_xl_v11` con
|
||||
`hires=True` re-difunde por tiles y puede dar OOM o ir muy lento. Si la GPU se queda
|
||||
corta: baja a `checkpoint="dreamshaper_8.safetensors"` (SD1.5), pon `hires=False`, o
|
||||
corta: baja a `checkpoint="IMG_dreamshaper_8.safetensors"` (SD1.5), pon `hires=False`, o
|
||||
reduce `width/height`. Probado e2e en GPU con SD1.5 + hires (ver report 0153).
|
||||
- **hires requiere UltimateSDUpscale + Remacri**: si el server responde HTTP 400
|
||||
"node type not found: UltimateSDUpscale", falta el custom node; usa `hires=False`.
|
||||
|
||||
@@ -69,7 +69,7 @@ def comfyui_build_card_art_workflow(
|
||||
subject: str,
|
||||
*,
|
||||
card_style: str = "fantasy trading card art",
|
||||
checkpoint: str = "juggernaut_xl_v11.safetensors",
|
||||
checkpoint: str = "IMG_juggernaut_xl_v11.safetensors",
|
||||
width: int = 512,
|
||||
height: int = 768,
|
||||
hires: bool = True,
|
||||
@@ -98,10 +98,10 @@ def comfyui_build_card_art_workflow(
|
||||
card art", "realistic painted card art", "dark gothic card art"). Pasa
|
||||
el MISMO card_style + checkpoint + (lora) a todas las cartas del set
|
||||
para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL,
|
||||
checkpoint: checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL,
|
||||
mejor detalle a alta resolucion) por defecto; en 8GB lowvram puede ser
|
||||
pesado con hires: si la GPU se queda corta, usa
|
||||
'dreamshaper_8.safetensors' (SD1.5) y/o hires=False. keyword-only.
|
||||
'IMG_dreamshaper_8.safetensors' (SD1.5) y/o hires=False. keyword-only.
|
||||
width: ancho del lienzo en px. Vertical de carta -> width < height. 512 por
|
||||
defecto. keyword-only.
|
||||
height: alto del lienzo en px. 768 por defecto (retrato de carta). Para
|
||||
@@ -215,7 +215,7 @@ if __name__ == "__main__":
|
||||
wf = comfyui_build_card_art_workflow(
|
||||
"a fire dragon breathing flames",
|
||||
card_style="fantasy trading card art",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ def test_golden_hires_recipe():
|
||||
wf = comfyui_build_card_art_workflow(
|
||||
"a fire dragon breathing flames",
|
||||
card_style="fantasy trading card art",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
@@ -62,7 +62,7 @@ def test_golden_hires_recipe():
|
||||
|
||||
def test_edge_no_hires_plain_txt2img():
|
||||
wf = comfyui_build_card_art_workflow(
|
||||
"an elven archer", checkpoint="dreamshaper_8.safetensors", hires=False
|
||||
"an elven archer", checkpoint="IMG_dreamshaper_8.safetensors", hires=False
|
||||
)
|
||||
cls = _classes(wf)
|
||||
assert "UltimateSDUpscale" not in cls
|
||||
|
||||
@@ -16,7 +16,7 @@ error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: ckpt_name
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'IMG_dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
- name: control_image
|
||||
desc: "Nombre del archivo de la imagen de control dentro de input/ del servidor (mapa canny/depth/openpose preprocesado); lo carga el nodo LoadImage."
|
||||
- name: cn_name
|
||||
@@ -52,7 +52,7 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_controlnet_workflow import comfyui_build_controlnet_workflow
|
||||
|
||||
wf = comfyui_build_controlnet_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
control_image="pose_canny.png", # mapa de control en input/
|
||||
cn_name="control_v11p_sd15_canny_fp16.safetensors", # modelo en models/controlnet/
|
||||
positive="a knight in shining armor, dramatic lighting",
|
||||
|
||||
@@ -32,7 +32,7 @@ def comfyui_build_controlnet_workflow(
|
||||
|
||||
Args:
|
||||
ckpt_name: nombre del checkpoint tal como lo ve el servidor ComfyUI
|
||||
(ej. "dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
(ej. "IMG_dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
comfyui_object_info para CheckpointLoaderSimple.
|
||||
control_image: nombre del archivo de la imagen de control dentro de la
|
||||
carpeta input/ del servidor ComfyUI (lo carga el nodo LoadImage).
|
||||
@@ -118,7 +118,7 @@ if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
wf = comfyui_build_controlnet_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
control_image="pose_canny.png",
|
||||
cn_name="control_v11p_sd15_canny.pth",
|
||||
positive="a knight in shining armor, dramatic lighting",
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_decal_overlay_workflow(decal: str, *, on_black: bool = True, style: str = \"grunge decal, high detail\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"decal_overlay\") -> dict"
|
||||
signature: "def comfyui_build_decal_overlay_workflow(decal: str, *, on_black: bool = True, style: str = \"grunge decal, high detail\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"decal_overlay\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN decal / overlay con alpha 2D: textura aislada para superponer sobre superficies/sprites/paredes con blend mode del motor — sangre, grietas, suciedad, grunge, oxido, quemaduras, salpicaduras, arañazos, musgo. Se genera AISLADA sobre fondo uniforme; on_black=True (defecto) la pone sobre NEGRO puro, pensada para extraer alpha por luminancia con comfyui_matting_luma_to_alpha (translucido con falloff: la tecnica gamedev correcta para decals). NO inyecta Rembg (el matting de un decal es luma-to-alpha, no un nodo). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo grunge opcional). Hermano de comfyui_build_seamless_tile/vfx_spritesheet_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, decal, overlay, alpha, blood, grunge, rust, dirt, blend, luma, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo del decal (ej. 'grunge decal, high detail', 'stylized blood, painterly', 'photorealistic rust', 'cartoon crack'). Pasa el MISMO style + checkpoint + lora a todos los decals de un set para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 768/1024). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 768/1024). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: seed
|
||||
@@ -104,7 +104,7 @@ mancha/grunge cuyo alpha sale de la luminancia.
|
||||
color contrario (gray/grunge/white background cuando on_black=True). Si aun asi sale
|
||||
ruido de fondo, sube `cfg`.
|
||||
- **"grunge" en el `style` tiende a llenar el fondo (aprendido en la prueba real)**: con
|
||||
SD1.5 (dreamshaper_8) un style que contenga "grunge" hace que el modelo pinte una
|
||||
SD1.5 (IMG_dreamshaper_8) un style que contenga "grunge" hace que el modelo pinte una
|
||||
TEXTURA de fondo gris/disco que arruina el fondo negro plano. Para un decal limpio sobre
|
||||
negro, prefiere un style que describa SOLO el decal sin connotacion de fondo (ej.
|
||||
"splatter decal, glossy red blood, high detail" en vez de "grunge decal") y haz reroll de
|
||||
@@ -116,8 +116,8 @@ mancha/grunge cuyo alpha sale de la luminancia.
|
||||
`luma_weights` con mas peso al rojo (ej. (0.6, 0.25, 0.15) o (1, 0, 0) = canal rojo puro)
|
||||
y sube `gamma`. Es ajuste del paso de matting (caller), no del builder. Para efectos
|
||||
BRILLANTES (humo blanco, fuego, destello) los pesos por defecto van perfectos.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
Si hay OOM, baja `size` o usa SD1.5.
|
||||
|
||||
## Ejemplo
|
||||
|
||||
@@ -77,7 +77,7 @@ def comfyui_build_decal_overlay_workflow(
|
||||
*,
|
||||
on_black: bool = True,
|
||||
style: str = "grunge decal, high detail",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
seed: int = 0,
|
||||
lora: str | None = None,
|
||||
@@ -106,8 +106,8 @@ def comfyui_build_decal_overlay_workflow(
|
||||
"stylized blood, painterly", "photorealistic rust", "cartoon crack").
|
||||
Pasa el MISMO style + checkpoint + (lora) a todos los decals de un set
|
||||
para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_dialogue_box_workflow(box_style: str = \"fantasy RPG dialogue box\", *, shape: str = \"rounded panel\", checkpoint: str = \"dreamshaper_8.safetensors\", width: int = 768, height: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"dialogue_box\") -> dict"
|
||||
signature: "def comfyui_build_dialogue_box_workflow(box_style: str = \"fantasy RPG dialogue box\", *, shape: str = \"rounded panel\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", width: int = 768, height: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"dialogue_box\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UNA caja de dialogo / bocadillo / panel de texto de juego (RPG, visual novel, aventura): el contenedor de UI apaisado con borde decorativo y un interior plano y vacio reservado para que el motor de juego renderice el texto de la conversacion encima. DISTINTO de comfyui_build_ui_hud_workflow (elementos sueltos: botones/barras/iconos): esto es el contenedor de dialogo completo. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_ui_hud/card_art_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, ui, dialogue, dialogue-box, text-box, panel, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: shape
|
||||
desc: "Forma del panel (ej. 'rounded panel', 'rectangular banner', 'scroll parchment', 'stone tablet', 'speech bubble'). Mantiene coherentes las cajas de un juego. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir width/height). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir width/height). keyword-only."
|
||||
- name: width
|
||||
desc: "Ancho del panel en px. Apaisado de caja de dialogo -> width > height. 768 por defecto. keyword-only."
|
||||
- name: height
|
||||
@@ -114,8 +114,8 @@ para superponer en pantalla.
|
||||
- **Coherencia del set = mismos parametros**: si cambias `box_style`/`shape`/
|
||||
`checkpoint`/`lora`/`seed` entre cajas, dejan de combinar. Fija esos y varia solo el
|
||||
matiz del `box_style`.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `width`/`height`; con dreamshaper_8 (SD1.5) deja 768x256 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `width`/`height`; con IMG_dreamshaper_8 (SD1.5) deja 768x256 (holgado en 8GB lowvram).
|
||||
- `transparent=False` deja el panel opaco sobre fondo plano: util si prefieres recortar
|
||||
fuera del workflow o el motor compone sobre un slot solido.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
|
||||
@@ -104,7 +104,7 @@ def comfyui_build_dialogue_box_workflow(
|
||||
box_style: str = "fantasy RPG dialogue box",
|
||||
*,
|
||||
shape: str = "rounded panel",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
width: int = 768,
|
||||
height: int = 256,
|
||||
transparent: bool = True,
|
||||
@@ -129,8 +129,8 @@ def comfyui_build_dialogue_box_workflow(
|
||||
shape: forma del panel (ej. "rounded panel", "rectangular banner", "scroll
|
||||
parchment", "stone tablet", "speech bubble"). Mantiene coherentes las
|
||||
cajas de un juego. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir width/height). keyword-only.
|
||||
width: ancho del panel en px. Apaisado de caja de dialogo -> width > height.
|
||||
768 por defecto. keyword-only.
|
||||
|
||||
@@ -6,7 +6,7 @@ domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_directional_sprite_workflow(input_image: str, *, directions: int = 8, model: str = \"sv3d\", elevation: float = 0.0, size: int | None = None, orbit_frames: int | None = None, seed: int = 0, ckpt: str | None = None, steps: int = 20, cfg: float | None = None, min_cfg: float = 1.0, sampler_name: str = \"euler\", scheduler: str = \"karras\", filename_prefix: str = \"directional_sprite\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow ComfyUI de un sprite MULTI-DIRECCIONAL: a partir de UNA imagen frontal de un personaje (fondo limpio) genera N vistas direccionales CONSISTENTES (el mismo personaje rotado en 3D, no re-dibujado) para un juego top-down / isométrico / shooter 8-way. Dos modelos 3D nativos del server: SV3D (orbit turntable en una pasada, mejor consistencia, sv3d_p.safetensors) o Stable Zero123 (batch de vistas por azimuth, fallback de menor VRAM, stable_zero123.ckpt). Es el puente 2.5D que faltaba en gamedev-2d: a diferencia de sprite_sheet (re-poza con OpenPose 2D, identidad inconsistente entre angulos), aqui la difusion 3D ROTA la figura sobre su eje, asi casco/arma/paleta son los mismos en cada direccion. Funcion pura: solo construye el grafo (class_types/inputs verificados contra /object_info); el coste GPU esta al enviar con comfyui_submit_workflow. La imagen frontal debe existir ya en el input/ del servidor."
|
||||
description: "Construye el dict (API format) del workflow ComfyUI de un sprite MULTI-DIRECCIONAL: a partir de UNA imagen frontal de un personaje (fondo limpio) genera N vistas direccionales CONSISTENTES (el mismo personaje rotado en 3D, no re-dibujado) para un juego top-down / isométrico / shooter 8-way. Dos modelos 3D nativos del server: SV3D (orbit turntable en una pasada, mejor consistencia, 3D_sv3d_p.safetensors) o Stable Zero123 (batch de vistas por azimuth, fallback de menor VRAM, 3D_stable_zero123.ckpt). Es el puente 2.5D que faltaba en gamedev-2d: a diferencia de sprite_sheet (re-poza con OpenPose 2D, identidad inconsistente entre angulos), aqui la difusion 3D ROTA la figura sobre su eje, asi casco/arma/paleta son los mismos en cada direccion. Funcion pura: solo construye el grafo (class_types/inputs verificados contra /object_info); el coste GPU esta al enviar con comfyui_submit_workflow. La imagen frontal debe existir ya en el input/ del servidor."
|
||||
tags: [comfyui, ml, gamedev-2d, sprite, directional, sv3d, zero123, turntable, multiview, stable-diffusion, workflow]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: directions
|
||||
desc: "Numero de direcciones a generar. 8 (default) = 8-way N/NE/E/SE/S/SW/W/NW (shooter 8-direcciones, top-down/iso); 4 = N/E/S/W (RPG clasico). Cualquier N>=1 vale (vistas equiespaciadas a 360/N grados); 4 y 8 reciben nombres cardinales via directional_sprite_view_order. keyword-only."
|
||||
- name: model
|
||||
desc: "'sv3d' (default, orbita turntable en una pasada, mejor consistencia angular, checkpoint sv3d_p.safetensors) o 'zero123' (batch de vistas con control de azimuth, fallback de menor VRAM, checkpoint stable_zero123.ckpt, nativo 256px). keyword-only."
|
||||
desc: "'sv3d' (default, orbita turntable en una pasada, mejor consistencia angular, checkpoint 3D_sv3d_p.safetensors) o 'zero123' (batch de vistas con control de azimuth, fallback de menor VRAM, checkpoint 3D_stable_zero123.ckpt, nativo 256px). keyword-only."
|
||||
- name: elevation
|
||||
desc: "Elevacion de camara en grados. 0 = orbita en el ecuador (vista lateral pura). Top-down/isometrico suele querer PICADO (mirar al personaje algo desde arriba): subir a ~15-30. keyword-only."
|
||||
- name: size
|
||||
@@ -30,7 +30,7 @@ params:
|
||||
- name: seed
|
||||
desc: "Semilla del KSampler (0 = determinista; cambiar para variar la orbita). keyword-only."
|
||||
- name: ckpt
|
||||
desc: "Nombre del checkpoint en el servidor. None (default) usa el del modelo (sv3d_p.safetensors / stable_zero123.ckpt). Pasar 'sv3d_u.safetensors' para la orbita uniforme en el ecuador. keyword-only."
|
||||
desc: "Nombre del checkpoint en el servidor. None (default) usa el del modelo (3D_sv3d_p.safetensors / 3D_stable_zero123.ckpt). Pasar 'sv3d_u.safetensors' para la orbita uniforme en el ecuador. keyword-only."
|
||||
- name: steps
|
||||
desc: "Pasos de sampling del KSampler. keyword-only."
|
||||
- name: cfg
|
||||
@@ -76,7 +76,7 @@ print(directional_sprite_view_order(8)) # ['S','SE','E','NE','N','NW','W','SW']
|
||||
```
|
||||
|
||||
Probado end-to-end (27/06/2026): goblin `enemy_creature_00001_.png` (compuesto sobre blanco
|
||||
576×576) → SV3D `sv3d_p.safetensors` 8 direcciones elevation 15 seed 7. `prompt_id
|
||||
576×576) → SV3D `3D_sv3d_p.safetensors` 8 direcciones elevation 15 seed 7. `prompt_id
|
||||
8b9f75de-9dcb-41f6-ae4c-7d52d34ed238`, 8 frames `dir_sprite_goblin_0000{1..8}_.png`, 75 s,
|
||||
VRAM pico 7145/8192 MiB. Consistencia rotacional medida: MAE adyacentes 27 (rotación
|
||||
gradual) < frente↔espalda 29.6 (la espalda difiere más = rotación 3D real), spread de paleta
|
||||
|
||||
@@ -20,14 +20,14 @@ Dos modelos, ambos confirmados en /object_info del server 8GB:
|
||||
`video_frames` vistas equiespaciadas en 360° en una sola pasada (reutiliza la
|
||||
maquinaria img2vid de Stable Video Diffusion: `ImageOnlyCheckpointLoader` →
|
||||
`SV3D_Conditioning` → `VideoLinearCFGGuidance` → `KSampler` → `VAEDecode` → `SaveImage`,
|
||||
los N frames). Mejor consistencia angular; checkpoint `sv3d_p.safetensors` (~9.4 GB en
|
||||
los N frames). Mejor consistencia angular; checkpoint `3D_sv3d_p.safetensors` (~9.4 GB en
|
||||
disco, ~2-4 GB en VRAM porque es un modelo de vídeo en lowvram). Frame 0 = la vista de
|
||||
entrada; el frame i corresponde al azimuth i·360/N.
|
||||
- Stable Zero123 (model="zero123"): el nodo `StableZero123_Conditioning_Batched` genera
|
||||
un BATCH de N vistas a azimuths equiespaciados (control directo del ángulo por vista).
|
||||
Útil como fallback si SV3D no cabe en VRAM: cada vista es una imagen independiente, así
|
||||
que se puede bajar `directions` o `size` con más holgura. Checkpoint
|
||||
`stable_zero123.ckpt`. width/height nativos 256.
|
||||
`3D_stable_zero123.ckpt`. width/height nativos 256.
|
||||
|
||||
Función PURA: sin red, sin I/O. Solo construye el dict del grafo (los class_types y sus
|
||||
inputs verificados contra /object_info). El coste GPU está al enviar con
|
||||
@@ -41,8 +41,8 @@ from __future__ import annotations
|
||||
|
||||
# Modelos soportados -> checkpoint por defecto que el nodo carga vía ImageOnlyCheckpointLoader.
|
||||
_MODEL_CKPT = {
|
||||
"sv3d": "sv3d_p.safetensors",
|
||||
"zero123": "stable_zero123.ckpt",
|
||||
"sv3d": "3D_sv3d_p.safetensors",
|
||||
"zero123": "3D_stable_zero123.ckpt",
|
||||
}
|
||||
|
||||
# Resolución nativa por modelo cuando el caller no fija `size`. SV3D entrena a 576²;
|
||||
@@ -133,7 +133,7 @@ def comfyui_build_directional_sprite_workflow(
|
||||
seed: semilla del KSampler (0 = determinista; cambiar para variar la órbita).
|
||||
keyword-only.
|
||||
ckpt: nombre del checkpoint en el servidor. None (default) usa el del modelo
|
||||
(`sv3d_p.safetensors` / `stable_zero123.ckpt`). keyword-only.
|
||||
(`3D_sv3d_p.safetensors` / `3D_stable_zero123.ckpt`). keyword-only.
|
||||
steps: pasos de sampling del KSampler. keyword-only.
|
||||
cfg: guidance scale. None (default) usa el del modelo (2.5 sv3d / 4.0 zero123).
|
||||
keyword-only.
|
||||
@@ -193,7 +193,7 @@ def _build_sv3d(input_image, ckpt_name, directions, elevation, size, orbit_frame
|
||||
seed, steps, cfg, min_cfg, sampler_name, scheduler, filename_prefix) -> dict:
|
||||
"""Workflow SV3D: 1 imagen frontal -> orbit de N vistas en una pasada.
|
||||
|
||||
SV3D reutiliza la cadena img2vid de Stable Video Diffusion: el checkpoint sv3d_p se
|
||||
SV3D reutiliza la cadena img2vid de Stable Video Diffusion: el checkpoint 3D_sv3d_p se
|
||||
carga con ImageOnlyCheckpointLoader (MODEL + CLIP_VISION + VAE), SV3D_Conditioning
|
||||
produce el conditioning del orbit y la latente, se muestrea como vídeo con guía CFG
|
||||
lineal y el SaveImage emite los `video_frames` frames del turntable.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_emote_workflow(character: str, expression: str, *, ref_face: str | None = None, style: str = \"character portrait\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, facedetailer: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, weight: float = 0.85, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", fd_denoise: float = 0.45, bbox_model: str = \"face_yolov8m.pt\", filename_prefix: str = \"emote\") -> dict"
|
||||
signature: "def comfyui_build_emote_workflow(character: str, expression: str, *, ref_face: str | None = None, style: str = \"character portrait\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, facedetailer: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, weight: float = 0.85, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", fd_denoise: float = 0.45, bbox_model: str = \"face_yolov8m.pt\", filename_prefix: str = \"emote\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN emote/expresion facial de personaje 2D (alegre, triste, enfadado, sorprendido, neutral...) para sistema de dialogo, retratos reactivos o emotes de chat. La clave es la consistencia del personaje entre expresiones: con ref_face encadena IPAdapter-FaceID para que el rostro sea el mismo y varie SOLO la expresion; con facedetailer regenera la cara con detalle conservando la expresion (Impact-Pack). Compone comfyui_build_ipadapter_workflow / comfyui_build_txt2img_workflow + comfyui_inject_lora + comfyui_build_facedetailer_workflow. Hermano de comfyui_build_portrait_avatar/sprite_sheet_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, emote, expression, character, dialogue, faceid, ipadapter, facedetailer, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_build_ipadapter_workflow_py_ml, comfyui_inject_lora_py_ml, comfyui_build_facedetailer_workflow_py_ml]
|
||||
@@ -24,7 +24,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los emotes de un set (ej. 'character portrait', 'anime portrait', 'realistic RPG portrait'). Pasa el MISMO style + checkpoint + lora a todas las expresiones para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. FaceID solo instalado para SD1.5: con checkpoint SDXL deja ref_face=None. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. FaceID solo instalado para SD1.5: con checkpoint SDXL deja ref_face=None. keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto, encuadre tipico de retrato/emote. keyword-only."
|
||||
- name: facedetailer
|
||||
@@ -109,7 +109,7 @@ Para un busto generico (sin expresion concreta) usa el hermano
|
||||
`seed`/`ref_face` igual. Cambiar otros parametros rompe la identidad entre
|
||||
emotes.
|
||||
- **FaceID solo SD1.5**: `ref_face` requiere los modelos IPAdapter-FaceID, que en
|
||||
este servidor solo estan para SD1.5 (dreamshaper_8). Con un checkpoint SDXL deja
|
||||
este servidor solo estan para SD1.5 (IMG_dreamshaper_8). Con un checkpoint SDXL deja
|
||||
`ref_face=None` (identidad por prompt + seed) o usa un checkpoint SD1.5.
|
||||
- **El detailer conserva la expresion**: el prompt del FaceDetailer incluye
|
||||
`{expression} expression` para no perder el emote al refinar la cara. Reutiliza
|
||||
@@ -127,7 +127,7 @@ Para un busto generico (sin expresion concreta) usa el hermano
|
||||
expresiones validas, por eso el negativo solo cubre defectos de cara/anatomia,
|
||||
no estados de animo. Si pasas un `negative` propio, no incluyas terminos que
|
||||
contradigan la `expression` pedida.
|
||||
- **8GB lowvram**: `size=512` con dreamshaper_8 va holgado; SDXL pide mas VRAM y
|
||||
- **8GB lowvram**: `size=512` con IMG_dreamshaper_8 va holgado; SDXL pide mas VRAM y
|
||||
resolucion mayor. Si hay OOM, baja `size` o desactiva `facedetailer`.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
`comfyui_submit_workflow` + `comfyui_wait_result` + `comfyui_fetch_output_image`.
|
||||
|
||||
@@ -71,7 +71,7 @@ def comfyui_build_emote_workflow(
|
||||
*,
|
||||
ref_face: str | None = None,
|
||||
style: str = "character portrait",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
facedetailer: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -106,7 +106,7 @@ def comfyui_build_emote_workflow(
|
||||
(ej. "character portrait", "anime portrait", "realistic RPG
|
||||
portrait"). Pasa el MISMO style + checkpoint + (lora) a todas las
|
||||
expresiones para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto. FaceID solo esta instalado para
|
||||
SD1.5: si usas un checkpoint SDXL, deja ref_face=None. keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_enemy_creature_workflow(creature: str, *, variant: str | None = None, style: str = \"game creature, full body\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"enemy_creature\") -> dict"
|
||||
signature: "def comfyui_build_enemy_creature_workflow(creature: str, *, variant: str | None = None, style: str = \"game creature, full body\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"enemy_creature\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN enemigo/criatura de juego 2D (goblin, esqueleto, slime, dragon, boss, elemental): figura de cuerpo entero centrada, fondo limpio uniforme recortable a alpha, estilo consistente entre criaturas del bestiario. Variantes por nivel/elemento (ice, fire, elite, corrupted) via `variant`. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_item_icon/ui_hud/sprite_sheet_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, creature, enemy, monster, bestiary, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes las criaturas del bestiario (ej. 'game creature, full body', 'dark fantasy creature', 'cartoon RPG monster', 'pixel art creature'). Pasa el MISMO style + checkpoint + lora a todas las criaturas del set para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -103,8 +103,8 @@ monta los PNG con `comfyui_build_grid`.
|
||||
`creature` (y `variant` para las variantes de un mismo enemigo).
|
||||
- **`variant` se antepone a la criatura**: `variant="ice"` + `creature="goblin warrior"`
|
||||
-> prompt "ice goblin warrior". Deja `variant=None` para la criatura base.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
Si hay OOM, baja `size` o usa SD1.5.
|
||||
- Si el modelo mete varias criaturas o recorta el cuerpo, el negativo por defecto ya
|
||||
empuja a "single creature / full body / no cropped / no out of frame"; refuerza
|
||||
|
||||
@@ -107,7 +107,7 @@ def comfyui_build_enemy_creature_workflow(
|
||||
*,
|
||||
variant: str | None = None,
|
||||
style: str = "game creature, full body",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -136,8 +136,8 @@ def comfyui_build_enemy_creature_workflow(
|
||||
"cartoon RPG monster", "pixel art creature"). Pasa el MISMO style +
|
||||
checkpoint + (lora) a todas las criaturas del set para coherencia visual.
|
||||
keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -62,13 +62,13 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
|
||||
# Modo workflow: genera un retrato y le aplica FaceDetailer en el mismo grafo.
|
||||
base = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="portrait of a woman, soft light",
|
||||
width=512, height=768, seed=7,
|
||||
)
|
||||
wf = comfyui_build_facedetailer_workflow(
|
||||
base,
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="detailed face, sharp eyes, skin texture",
|
||||
negative="blurry, deformed",
|
||||
denoise=0.45,
|
||||
|
||||
@@ -222,7 +222,7 @@ if __name__ == "__main__":
|
||||
# Modo imagen: regenerar caras de una imagen ya en el input/ del servidor.
|
||||
wf = comfyui_build_facedetailer_workflow(
|
||||
"portrait_00001_.png",
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="detailed face, sharp eyes, skin texture",
|
||||
negative="blurry, deformed",
|
||||
seed=42,
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_flux_workflow(prompt: str, *, unet: str = \"flux1-schnell-fp8-e4m3fn.safetensors\", clip_l: str = \"clip_l.safetensors\", t5xxl: str = \"t5xxl_fp8_e4m3fn_scaled.safetensors\", vae: str = \"ae.safetensors\", width: int = 1024, height: int = 1024, steps: int = 4, guidance: float = 3.5, seed: int = 0, weight_dtype: str = \"fp8_e4m3fn\", sampler_name: str = \"euler\", scheduler: str = \"simple\", filename_prefix: str = \"comfy_flux\") -> dict"
|
||||
signature: "def comfyui_build_flux_workflow(prompt: str, *, unet: str = \"IMG_flux1-schnell-fp8-e4m3fn.safetensors\", clip_l: str = \"clip_l.safetensors\", t5xxl: str = \"t5xxl_fp8_e4m3fn_scaled.safetensors\", vae: str = \"ae.safetensors\", width: int = 1024, height: int = 1024, steps: int = 4, guidance: float = 3.5, seed: int = 0, weight_dtype: str = \"fp8_e4m3fn\", sampler_name: str = \"euler\", scheduler: str = \"simple\", filename_prefix: str = \"comfy_flux\") -> dict"
|
||||
description: "Construye el dict de un workflow ComfyUI txt2img con Flux en API format (nodos numerados con class_type + inputs, conexiones como [node_id, output_index]). A diferencia de SD1.5/SDXL, Flux carga por separado UNETLoader + DualCLIPLoader (clip_l + t5xxl, type flux) + VAELoader; la guia va por FluxGuidance (no por el cfg del KSampler, que se fija a 1.0). Cadena: UNETLoader+DualCLIPLoader+VAELoader -> CLIPTextEncode -> FluxGuidance + EmptySD3LatentImage -> KSampler -> VAEDecode -> SaveImage. Pura, sin red ni I/O. Hermana de comfyui_build_txt2img_workflow."
|
||||
tags: [comfyui, flux, ml, txt2img, workflow]
|
||||
uses_functions: []
|
||||
|
||||
@@ -19,7 +19,7 @@ Funcion pura: sin red, sin I/O. Determinista para los mismos argumentos.
|
||||
def comfyui_build_flux_workflow(
|
||||
prompt: str,
|
||||
*,
|
||||
unet: str = "flux1-schnell-fp8-e4m3fn.safetensors",
|
||||
unet: str = "IMG_flux1-schnell-fp8-e4m3fn.safetensors",
|
||||
clip_l: str = "clip_l.safetensors",
|
||||
t5xxl: str = "t5xxl_fp8_e4m3fn_scaled.safetensors",
|
||||
vae: str = "ae.safetensors",
|
||||
@@ -43,7 +43,7 @@ def comfyui_build_flux_workflow(
|
||||
prompt: prompt positivo (lo que se quiere ver en la imagen).
|
||||
unet: nombre del modelo de difusion en models/diffusion_models/ tal como
|
||||
lo lista comfyui_object_info para UNETLoader (unet_name). Por defecto
|
||||
el Flux schnell fp8 ("flux1-schnell-fp8-e4m3fn.safetensors").
|
||||
el Flux schnell fp8 ("IMG_flux1-schnell-fp8-e4m3fn.safetensors").
|
||||
clip_l: nombre del encoder CLIP-L en models/text_encoders/ (clip_name2 del
|
||||
DualCLIPLoader). Por defecto "clip_l.safetensors".
|
||||
t5xxl: nombre del encoder T5-XXL en models/text_encoders/ (clip_name1 del
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_foliage_set_workflow(plant: str, *, view: str = \"side\", style: str = \"game foliage, stylized\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"foliage_set\") -> dict"
|
||||
signature: "def comfyui_build_foliage_set_workflow(plant: str, *, view: str = \"side\", style: str = \"game foliage, stylized\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"foliage_set\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN elemento de vegetacion/foliage de escenario de juego 2D (arbol, arbusto, hierba alta, flores, helecho, hongo, cactus, tronco caido, juncos, hiedra): UN elemento de naturaleza AISLADO y centrado a perspectiva de juego (lateral/cenital via view), fondo limpio uniforme recortable a alpha, estilo consistente para poblar terrenos/escenarios. Diferenciado de comfyui_build_prop_object (vegetacion organica vs objeto manufacturado) y de structure (planta suelta vs edificio). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_prop_object/structure_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, foliage, plant, vegetation, nature, scenery, environment, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistente la vegetacion del set (ej. 'game foliage, stylized', 'low poly stylized plant', 'pixel art foliage', 'painterly fantasy plant', 'cartoon nature asset'). Pasa el MISMO view + style + checkpoint + lora a todas las plantas del nivel para coherencia. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -114,8 +114,8 @@ cada elemento y monta los PNG con `comfyui_build_grid`.
|
||||
Para iso estricto, añade una LoRA iso que fije mejor el ángulo que solo el prompt.
|
||||
- **Coherencia del set = mismos parámetros**: si cambias `view`/`style`/`checkpoint`/`lora`/
|
||||
`seed` entre plantas, la vegetación deja de combinar. Fija esos y varía solo `plant`.
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
- **El negativo rechaza `pot / planter / vase`**: una planta en maceta es atrezzo
|
||||
(`prop_object`), no foliage. Aquí el elemento es la planta en sí. Si quieres una planta
|
||||
|
||||
@@ -117,7 +117,7 @@ def comfyui_build_foliage_set_workflow(
|
||||
*,
|
||||
view: str = "side",
|
||||
style: str = "game foliage, stylized",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -149,8 +149,8 @@ def comfyui_build_foliage_set_workflow(
|
||||
foliage", "painterly fantasy plant", "cartoon nature asset"). Pasa el
|
||||
MISMO view + style + checkpoint + (lora) a todas las plantas del nivel
|
||||
para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -60,7 +60,7 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_hires_fix_workflow import comfyui_build_hires_fix_workflow
|
||||
|
||||
wf = comfyui_build_hires_fix_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="a fox in a forest, intricate detail, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
first_pass=(768, 768),
|
||||
|
||||
@@ -157,7 +157,7 @@ if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
wf = comfyui_build_hires_fix_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
positive="a fox in a forest, intricate detail, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
first_pass=(768, 768),
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.1.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_image_to_3d_workflow(image_name: str, ckpt_name: str = \"hunyuan3d-dit-v2-mini.safetensors\", *, resolution: int = 3072, steps: int = 30, cfg: float = 5.5, seed: int = 0, octree_resolution: int = 256, num_chunks: int = 8000, threshold: float = 0.6, sampler_name: str = \"euler\", scheduler: str = \"normal\", filename_prefix: str = \"3d_mesh\", watertight: bool = False) -> dict"
|
||||
signature: "def comfyui_build_image_to_3d_workflow(image_name: str, ckpt_name: str = \"3D_hunyuan3d-dit-v2-mini.safetensors\", *, resolution: int = 3072, steps: int = 30, cfg: float = 5.5, seed: int = 0, octree_resolution: int = 256, num_chunks: int = 8000, threshold: float = 0.6, sampler_name: str = \"euler\", scheduler: str = \"normal\", filename_prefix: str = \"3d_mesh\", watertight: bool = False) -> dict"
|
||||
description: "Construye el dict de un workflow ComfyUI imagen->malla 3D en API format usando los nodos NATIVOS de Hunyuan3D-2 de ComfyUI 0.26.0 (sin custom node). Cadena de 9 nodos: LoadImage -> ImageOnlyCheckpointLoader -> CLIPVisionEncode -> Hunyuan3Dv2Conditioning -> EmptyLatentHunyuan3Dv2 -> KSampler -> VAEDecodeHunyuan3D -> (VoxelToMeshBasic | VoxelToMesh surface-net si watertight=True) -> SaveGLB. El SaveGLB produce un .glb. Pura, sin red ni I/O."
|
||||
tags: [comfyui, ml, img-to-3d, hunyuan3d, mesh, workflow]
|
||||
uses_functions: []
|
||||
@@ -18,7 +18,7 @@ params:
|
||||
- name: image_name
|
||||
desc: "Nombre del archivo de imagen en el input/ del servidor ComfyUI (ej. '3d_src_robot_00001_.png'). Lo carga el nodo LoadImage; debe existir ya en input/ (subelo antes o usa el pipeline oneshot)."
|
||||
- name: ckpt_name
|
||||
desc: "Nombre del checkpoint Hunyuan3D-2 tal como lo ve el servidor (ej. 'hunyuan3d-dit-v2-mini.safetensors'). Debe estar en la lista de comfyui_object_info para ImageOnlyCheckpointLoader."
|
||||
desc: "Nombre del checkpoint Hunyuan3D-2 tal como lo ve el servidor (ej. '3D_hunyuan3d-dit-v2-mini.safetensors'). Debe estar en la lista de comfyui_object_info para ImageOnlyCheckpointLoader."
|
||||
- name: resolution
|
||||
desc: "Resolucion del latente 3D (EmptyLatentHunyuan3Dv2). Mayor = mas detalle de forma y mas VRAM. keyword-only."
|
||||
- name: steps
|
||||
@@ -57,7 +57,7 @@ from ml.comfyui_build_image_to_3d_workflow import comfyui_build_image_to_3d_work
|
||||
|
||||
wf = comfyui_build_image_to_3d_workflow(
|
||||
image_name="3d_src_robot_00001_.png",
|
||||
ckpt_name="hunyuan3d-dit-v2-mini.safetensors",
|
||||
ckpt_name="3D_hunyuan3d-dit-v2-mini.safetensors",
|
||||
seed=42,
|
||||
)
|
||||
# wf["2"]["class_type"] == "ImageOnlyCheckpointLoader"
|
||||
|
||||
@@ -29,7 +29,7 @@ Funcion pura: sin red, sin I/O. Determinista para los mismos argumentos.
|
||||
|
||||
def comfyui_build_image_to_3d_workflow(
|
||||
image_name: str,
|
||||
ckpt_name: str = "hunyuan3d-dit-v2-mini.safetensors",
|
||||
ckpt_name: str = "3D_hunyuan3d-dit-v2-mini.safetensors",
|
||||
*,
|
||||
resolution: int = 3072,
|
||||
steps: int = 30,
|
||||
@@ -50,7 +50,7 @@ def comfyui_build_image_to_3d_workflow(
|
||||
ComfyUI (ej. "3d_src_robot_00001_.png"). Lo carga el nodo LoadImage;
|
||||
debe existir ya en input/ (subelo antes, o usa el pipeline oneshot).
|
||||
ckpt_name: nombre del checkpoint Hunyuan3D-2 tal como lo ve el servidor
|
||||
(ej. "hunyuan3d-dit-v2-mini.safetensors"). Debe estar entre los que
|
||||
(ej. "3D_hunyuan3d-dit-v2-mini.safetensors"). Debe estar entre los que
|
||||
devuelve comfyui_object_info para ImageOnlyCheckpointLoader.
|
||||
resolution: resolucion del latente 3D (EmptyLatentHunyuan3Dv2). Mayor =
|
||||
mas detalle de forma y mas VRAM. keyword-only.
|
||||
@@ -157,7 +157,7 @@ if __name__ == "__main__":
|
||||
|
||||
wf = comfyui_build_image_to_3d_workflow(
|
||||
image_name="3d_src_robot_00001_.png",
|
||||
ckpt_name="hunyuan3d-dit-v2-mini.safetensors",
|
||||
ckpt_name="3D_hunyuan3d-dit-v2-mini.safetensors",
|
||||
seed=42,
|
||||
)
|
||||
print(json.dumps(wf, indent=2))
|
||||
|
||||
@@ -16,7 +16,7 @@ error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: ckpt_name
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'IMG_dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
- name: init_image
|
||||
desc: "Nombre del archivo de imagen base dentro de la carpeta input/ del servidor ComfyUI; lo carga el nodo LoadImage."
|
||||
- name: positive
|
||||
@@ -50,7 +50,7 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_img2img_workflow import comfyui_build_img2img_workflow
|
||||
|
||||
wf = comfyui_build_img2img_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
init_image="cabin.png", # archivo en el input/ de ComfyUI
|
||||
positive="a cozy cabin in the woods, golden hour",
|
||||
negative="blurry, low quality",
|
||||
|
||||
@@ -29,7 +29,7 @@ def comfyui_build_img2img_workflow(
|
||||
|
||||
Args:
|
||||
ckpt_name: nombre del checkpoint tal como lo ve el servidor ComfyUI
|
||||
(ej. "dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
(ej. "IMG_dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
comfyui_object_info para CheckpointLoaderSimple.
|
||||
init_image: nombre del archivo de imagen base dentro de la carpeta
|
||||
input/ del servidor ComfyUI (lo que carga el nodo LoadImage).
|
||||
@@ -98,7 +98,7 @@ if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
wf = comfyui_build_img2img_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
init_image="example.png",
|
||||
positive="a cozy cabin in the woods, golden hour, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
|
||||
@@ -5,8 +5,8 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_img2vid_workflow(image: str, *, ckpt: str = \"svd.safetensors\", width: int = 1024, height: int = 576, video_frames: int = 14, motion_bucket_id: int = 127, fps: int = 6, augmentation_level: float = 0.0, steps: int = 20, cfg: float = 2.5, min_cfg: float = 1.0, seed: int = 0, sampler_name: str = \"euler\", scheduler: str = \"karras\", filename_prefix: str = \"comfy_svd\") -> dict"
|
||||
description: "Construye el dict de un workflow ComfyUI img2vid (Stable Video Diffusion) en API format a partir de una imagen estatica. Cadena: ImageOnlyCheckpointLoader(svd.safetensors -> MODEL, CLIP_VISION, VAE) + LoadImage -> SVD_img2vid_Conditioning(positive, negative, latent) -> VideoLinearCFGGuidance -> KSampler(denoise 1.0) -> VAEDecode -> SaveAnimatedWEBP. SVD no usa prompt de texto: el condicionamiento sale de la imagen via CLIP_VISION del checkpoint todo-en-uno. Movimiento via motion_bucket_id y fps. Pura, sin red ni I/O. Hermana de comfyui_build_video_workflow (txt2video LTX/Wan)."
|
||||
signature: "def comfyui_build_img2vid_workflow(image: str, *, ckpt: str = \"VIDEO_svd.safetensors\", width: int = 1024, height: int = 576, video_frames: int = 14, motion_bucket_id: int = 127, fps: int = 6, augmentation_level: float = 0.0, steps: int = 20, cfg: float = 2.5, min_cfg: float = 1.0, seed: int = 0, sampler_name: str = \"euler\", scheduler: str = \"karras\", filename_prefix: str = \"comfy_svd\") -> dict"
|
||||
description: "Construye el dict de un workflow ComfyUI img2vid (Stable Video Diffusion) en API format a partir de una imagen estatica. Cadena: ImageOnlyCheckpointLoader(VIDEO_svd.safetensors -> MODEL, CLIP_VISION, VAE) + LoadImage -> SVD_img2vid_Conditioning(positive, negative, latent) -> VideoLinearCFGGuidance -> KSampler(denoise 1.0) -> VAEDecode -> SaveAnimatedWEBP. SVD no usa prompt de texto: el condicionamiento sale de la imagen via CLIP_VISION del checkpoint todo-en-uno. Movimiento via motion_bucket_id y fps. Pura, sin red ni I/O. Hermana de comfyui_build_video_workflow (txt2video LTX/Wan)."
|
||||
tags: [comfyui, svd, img2vid, video, ml, workflow]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
@@ -18,13 +18,13 @@ params:
|
||||
- name: image
|
||||
desc: "Nombre del archivo de imagen base en la carpeta input/ del servidor ComfyUI (lo que carga LoadImage). Es el frame inicial del que SVD deriva el clip."
|
||||
- name: ckpt
|
||||
desc: "Nombre del checkpoint SVD tal como lo ve el servidor. Por defecto 'svd.safetensors' (todo-en-uno: UNet + VAE + CLIP image encoder). keyword-only."
|
||||
desc: "Nombre del checkpoint SVD tal como lo ve el servidor. Por defecto 'VIDEO_svd.safetensors' (todo-en-uno: UNet + VAE + CLIP image encoder). keyword-only."
|
||||
- name: width
|
||||
desc: "Ancho del video en px (multiplo de 8; SVD base entrena a 1024). keyword-only."
|
||||
- name: height
|
||||
desc: "Alto del video en px (multiplo de 8; SVD base entrena a 576). keyword-only."
|
||||
- name: video_frames
|
||||
desc: "Numero de frames del clip. svd.safetensors es el modelo de 14 frames; la variante xt llega a 25. keyword-only."
|
||||
desc: "Numero de frames del clip. VIDEO_svd.safetensors es el modelo de 14 frames; la variante xt llega a 25. keyword-only."
|
||||
- name: motion_bucket_id
|
||||
desc: "Intensidad de movimiento (1-255 util; 127 por defecto). Mas alto = mas movimiento. keyword-only."
|
||||
- name: fps
|
||||
@@ -47,7 +47,7 @@ params:
|
||||
desc: "Prefijo del archivo de salida (.webp animado de SaveAnimatedWEBP). keyword-only."
|
||||
output: "dict en API format listo para comfyui_submit_workflow. node_ids string; cada valor con class_type + inputs. Devuelve 7 nodos: ImageOnlyCheckpointLoader, LoadImage, SVD_img2vid_Conditioning, VideoLinearCFGGuidance, KSampler, VAEDecode y SaveAnimatedWEBP. El denoise del KSampler se fija a 1.0 (genera desde el latente condicionado, no es img2img)."
|
||||
tested: true
|
||||
tests: ["estructura: 7 nodos SVD presentes + ckpt svd.safetensors + image en LoadImage", "cableado: clip_vision/vae [15,1]/[15,2], cond->KSampler 0/1/2, model post VideoLinearCFGGuidance, denoise 1.0", "params reflejados (width/height/video_frames/motion_bucket_id/fps/augmentation_level/steps/cfg/min_cfg/seed/filename_prefix) + fps float en SaveAnimatedWEBP", "determinismo: misma entrada -> mismo dict (builder puro)"]
|
||||
tests: ["estructura: 7 nodos SVD presentes + ckpt VIDEO_svd.safetensors + image en LoadImage", "cableado: clip_vision/vae [15,1]/[15,2], cond->KSampler 0/1/2, model post VideoLinearCFGGuidance, denoise 1.0", "params reflejados (width/height/video_frames/motion_bucket_id/fps/augmentation_level/steps/cfg/min_cfg/seed/filename_prefix) + fps float en SaveAnimatedWEBP", "determinismo: misma entrada -> mismo dict (builder puro)"]
|
||||
test_file_path: "python/functions/ml/tests/test_comfyui_build_img2vid_workflow.py"
|
||||
file_path: "python/functions/ml/comfyui_build_img2vid_workflow.py"
|
||||
---
|
||||
@@ -86,7 +86,7 @@ servidor con `comfyui_validate_workflow` antes de encolar.
|
||||
acepta POST /prompt.
|
||||
- SVD NO usa prompts de texto. El condicionamiento sale de la imagen base via el
|
||||
CLIP_VISION del checkpoint todo-en-uno; por eso no hay nodos CLIPTextEncode.
|
||||
- El checkpoint `svd.safetensors` debe existir y ser visible para el servidor
|
||||
- El checkpoint `VIDEO_svd.safetensors` debe existir y ser visible para el servidor
|
||||
(carpeta de checkpoints o extra_model_paths) o ComfyUI rechaza el workflow con
|
||||
HTTP 400 al enviarlo. Esta funcion es pura y no valida contra el servidor.
|
||||
- La imagen `image` debe estar en la carpeta input/ del servidor (subela antes con
|
||||
@@ -96,7 +96,7 @@ servidor con `comfyui_validate_workflow` antes de encolar.
|
||||
puede acercarse al techo de 8GB. Si da OOM, bajar resolucion (768x448) o
|
||||
video_frames. La generacion real (submit) es un paso posterior con GPU; este
|
||||
builder solo arma el dict y se valida de forma estructural (offline).
|
||||
- `svd.safetensors` es el modelo de 14 frames. La variante `svd_xt` admite 25;
|
||||
- `VIDEO_svd.safetensors` es el modelo de 14 frames. La variante `svd_xt` admite 25;
|
||||
con el base, video_frames > 14 puede degradar el clip.
|
||||
- motion_bucket_id alto = mas movimiento (y mas artefactos). 127 es el centro
|
||||
recomendado por Stability.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Construye un workflow ComfyUI img2vid (SVD) en "API format" (dict de nodos numerados).
|
||||
|
||||
Implementa la plantilla canonica de Stable Video Diffusion de ComfyUI: a partir de
|
||||
una imagen estatica genera un clip corto de video. El checkpoint `svd.safetensors`
|
||||
una imagen estatica genera un clip corto de video. El checkpoint `VIDEO_svd.safetensors`
|
||||
es todo-en-uno (UNet + VAE + CLIP image encoder), cargado con
|
||||
ImageOnlyCheckpointLoader (da MODEL, CLIP_VISION y VAE de una sola pieza).
|
||||
|
||||
@@ -22,7 +22,7 @@ Funcion pura: sin red, sin I/O. Determinista para los mismos argumentos.
|
||||
def comfyui_build_img2vid_workflow(
|
||||
image: str,
|
||||
*,
|
||||
ckpt: str = "svd.safetensors",
|
||||
ckpt: str = "VIDEO_svd.safetensors",
|
||||
width: int = 1024,
|
||||
height: int = 576,
|
||||
video_frames: int = 14,
|
||||
@@ -37,20 +37,20 @@ def comfyui_build_img2vid_workflow(
|
||||
scheduler: str = "karras",
|
||||
filename_prefix: str = "comfy_svd",
|
||||
) -> dict:
|
||||
"""Construye el dict del workflow img2vid (SVD) para svd.safetensors.
|
||||
"""Construye el dict del workflow img2vid (SVD) para VIDEO_svd.safetensors.
|
||||
|
||||
Args:
|
||||
image: nombre del archivo de imagen base dentro de la carpeta input/ del
|
||||
servidor ComfyUI (lo que carga el nodo LoadImage). Es el frame inicial
|
||||
del que SVD deriva el clip.
|
||||
ckpt: nombre del checkpoint SVD tal como lo ve el servidor. Por defecto
|
||||
"svd.safetensors" (todo-en-uno: UNet + VAE + CLIP image encoder).
|
||||
"VIDEO_svd.safetensors" (todo-en-uno: UNet + VAE + CLIP image encoder).
|
||||
keyword-only.
|
||||
width: ancho del video en px (multiplo de 8; SVD base entrena a 1024).
|
||||
keyword-only.
|
||||
height: alto del video en px (multiplo de 8; SVD base entrena a 576).
|
||||
keyword-only.
|
||||
video_frames: numero de frames del clip. svd.safetensors es el modelo de
|
||||
video_frames: numero de frames del clip. VIDEO_svd.safetensors es el modelo de
|
||||
14 frames; el variante xt llega a 25. keyword-only.
|
||||
motion_bucket_id: intensidad de movimiento (1-255 util; 127 por defecto).
|
||||
Mas alto = mas movimiento. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
purity: pure
|
||||
version: 1.0.0
|
||||
signature: "def comfyui_build_inpaint_asset_workflow(input_image: str, mask_image: str, prompt: str, *, checkpoint: str = \"dreamshaper_8.safetensors\", denoise: float = 1.0, style: str = \"game asset\", grow_mask: int = 6, size: int | None = None, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, mode: str = \"vae_encode\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", img_upscale_method: str = \"bilinear\", mask_upscale_method: str = \"nearest-exact\", crop: str = \"disabled\", filename_prefix: str = \"inpaint_asset\") -> dict"
|
||||
signature: "def comfyui_build_inpaint_asset_workflow(input_image: str, mask_image: str, prompt: str, *, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", denoise: float = 1.0, style: str = \"game asset\", grow_mask: int = 6, size: int | None = None, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, mode: str = \"vae_encode\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", img_upscale_method: str = \"bilinear\", mask_upscale_method: str = \"nearest-exact\", crop: str = \"disabled\", filename_prefix: str = \"inpaint_asset\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow que EDITA SOLO UNA REGION de un asset 2D ya pintado (inpaint): recibe el asset + una mascara (blanco = editar, negro = conservar) + un prompt de que poner en esa zona, y repinta UNICAMENTE la region enmascarada dejando el resto del sprite intacto. Es el cuarto vertice del eje transform de gamedev-2d: distinto de txt2img (enemy_creature/item_icon, inventan la forma desde texto), de img2img (asset_variant, reescribe TODO el asset), y de ControlNet (sprite_from_sketch, pinta un sprite nuevo desde un boceto). Mecanismo (modo vae_encode): VAEEncodeForInpaint codifica el latente respetando la mascara y dilata su borde grow_mask px para difuminar la costura; el KSampler (denoise alto) regenera solo esa zona con '{prompt}, {style}, seamless blend'. Modo noise_mask degrada a VAEEncode + SetLatentNoiseMask (+ GrowMask) para servidores sin VAEEncodeForInpaint. size escala imagen Y mascara de forma consistente (escalar solo una las desalinearia). Compone comfyui_build_inpaint_workflow + comfyui_inject_lora (estilo opcional). Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, inpaint, asset-transform, mask-edit, stable-diffusion, workflow]
|
||||
uses_functions: [comfyui_build_inpaint_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -21,7 +21,7 @@ params:
|
||||
- name: prompt
|
||||
desc: "Que poner en la region enmascarada ('a golden sword', 'a blue shield', 'empty background', 'intact armor'). Es lo unico que se regenera; el resto del asset se conserva. No puede estar vacio."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
- name: denoise
|
||||
desc: "Fuerza de denoising del KSampler dentro de la mascara. En inpaint suele ser alto: 1.0 (por defecto) reescribe la region por completo; <1.0 conserva parte de los pixeles originales (reparacion suave). Se clampa a [0.0, 1.0]. keyword-only."
|
||||
- name: style
|
||||
|
||||
@@ -226,7 +226,7 @@ def comfyui_build_inpaint_asset_workflow(
|
||||
mask_image: str,
|
||||
prompt: str,
|
||||
*,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
denoise: float = 1.0,
|
||||
style: str = "game asset",
|
||||
grow_mask: int = 6,
|
||||
@@ -260,7 +260,7 @@ def comfyui_build_inpaint_asset_workflow(
|
||||
prompt: que poner en la region enmascarada ("a golden sword", "a blue shield",
|
||||
"empty background", "intact armor"). Es lo unico que se regenera; el resto
|
||||
del asset se conserva. No puede estar vacio.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
en 8GB lowvram) por defecto. keyword-only.
|
||||
denoise: fuerza de denoising del KSampler dentro de la mascara. En inpaint suele
|
||||
ser alto: 1.0 (por defecto) reescribe la region por completo; <1.0 conserva
|
||||
|
||||
@@ -16,7 +16,7 @@ error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: ckpt_name
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'IMG_dreamshaper_8.safetensors'). Debe estar en la lista de CheckpointLoaderSimple de comfyui_object_info."
|
||||
- name: image
|
||||
desc: "Nombre del archivo de la imagen base dentro de la carpeta input/ del servidor ComfyUI; lo carga el nodo LoadImage."
|
||||
- name: mask
|
||||
@@ -52,7 +52,7 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_inpaint_workflow import comfyui_build_inpaint_workflow
|
||||
|
||||
wf = comfyui_build_inpaint_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
image="room.png", # imagen base en el input/ de ComfyUI
|
||||
mask="room_mask.png", # mascara: blanco = zona a regenerar
|
||||
positive="a vase of red flowers on the table, sharp focus",
|
||||
|
||||
@@ -32,7 +32,7 @@ def comfyui_build_inpaint_workflow(
|
||||
|
||||
Args:
|
||||
ckpt_name: nombre del checkpoint tal como lo ve el servidor ComfyUI
|
||||
(ej. "dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
(ej. "IMG_dreamshaper_8.safetensors"). Debe estar entre los que devuelve
|
||||
comfyui_object_info para CheckpointLoaderSimple.
|
||||
image: nombre del archivo de la imagen base dentro de la carpeta input/
|
||||
del servidor ComfyUI (lo carga el nodo LoadImage).
|
||||
@@ -113,7 +113,7 @@ if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
wf = comfyui_build_inpaint_workflow(
|
||||
ckpt_name="dreamshaper_8.safetensors",
|
||||
ckpt_name="IMG_dreamshaper_8.safetensors",
|
||||
image="room.png",
|
||||
mask="room_mask.png",
|
||||
positive="a vase of red flowers on the table, sharp focus",
|
||||
|
||||
@@ -79,13 +79,13 @@ from ml.comfyui_submit_workflow import comfyui_submit_workflow
|
||||
# Estilo: transfiere el look de una imagen de referencia
|
||||
wf = comfyui_build_ipadapter_workflow(
|
||||
"a fantasy castle on a hill", "example.png",
|
||||
base_checkpoint="dreamshaper_8.safetensors", mode="style", weight=0.8)
|
||||
base_checkpoint="IMG_dreamshaper_8.safetensors", mode="style", weight=0.8)
|
||||
resp = comfyui_submit_workflow(wf)
|
||||
|
||||
# FaceID: rostro consistente a partir de una cara de referencia
|
||||
wf = comfyui_build_ipadapter_workflow(
|
||||
"portrait of a knight in armor, cinematic", "showcase_char.png",
|
||||
base_checkpoint="dreamshaper_8.safetensors", mode="faceid", weight=0.9)
|
||||
base_checkpoint="IMG_dreamshaper_8.safetensors", mode="faceid", weight=0.9)
|
||||
resp = comfyui_submit_workflow(wf)
|
||||
print(resp["prompt_id"])
|
||||
```
|
||||
@@ -102,7 +102,7 @@ La referencia se sube primero a `input/` del servidor (LoadImage la lee por nomb
|
||||
|
||||
- **Modelos SD1.5 ↔ checkpoints SD1.5.** Los modelos descargados son SD1.5
|
||||
(`ip-adapter*_sd15`, `ip-adapter-faceid-plusv2_sd15`); usalos con un checkpoint
|
||||
SD1.5 (dreamshaper_8). Mezclar con SDXL hace fallar el UnifiedLoader.
|
||||
SD1.5 (IMG_dreamshaper_8). Mezclar con SDXL hace fallar el UnifiedLoader.
|
||||
- **La clave `ipadapter` debe estar en `extra_model_paths.yaml`.** El custom node
|
||||
registra la carpeta `models/ipadapter`; si los modelos viven en otra ruta (ej.
|
||||
`/mnt/2tb`), esa clave los mapea. Sin ella `ipadapter_file` sale vacio.
|
||||
|
||||
@@ -210,14 +210,14 @@ if __name__ == "__main__":
|
||||
wf_style = comfyui_build_ipadapter_workflow(
|
||||
"a fantasy castle on a hill, oil painting",
|
||||
"example.png",
|
||||
base_checkpoint="dreamshaper_8.safetensors",
|
||||
base_checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
mode="style",
|
||||
weight=0.8,
|
||||
)
|
||||
wf_face = comfyui_build_ipadapter_workflow(
|
||||
"portrait of a knight in armor, cinematic",
|
||||
"showcase_char.png",
|
||||
base_checkpoint="dreamshaper_8.safetensors",
|
||||
base_checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
mode="faceid",
|
||||
weight=0.9,
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_isometric_workflow(positive: str, negative: str = \"perspective, vanishing point, blurry, low quality\", *, ckpt_name: str = \"dreamshaper_8.safetensors\", iso_lora: str = \"SD15_isometric_game_assets.safetensors\", lora_strength: float = 0.9, grid_image: str | None = None, controlnet_name: str = \"control_v11p_sd15_canny_fp16.safetensors\", controlnet_strength: float = 0.6, steps: int = 28, cfg: float = 6.0, width: int = 1024, height: int = 1024, seed: int = 0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"isometric\") -> dict"
|
||||
signature: "def comfyui_build_isometric_workflow(positive: str, negative: str = \"perspective, vanishing point, blurry, low quality\", *, ckpt_name: str = \"IMG_dreamshaper_8.safetensors\", iso_lora: str = \"SD15_isometric_game_assets.safetensors\", lora_strength: float = 0.9, grid_image: str | None = None, controlnet_name: str = \"control_v11p_sd15_canny_fp16.safetensors\", controlnet_strength: float = 0.6, steps: int = 28, cfg: float = 6.0, width: int = 1024, height: int = 1024, seed: int = 0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"isometric\") -> dict"
|
||||
description: "Construye el dict (API format) de un workflow ComfyUI isometrico: txt2img + LoRA isometrica (SD15_isometric_game_assets) que impone el angulo 2:1, con ControlNet grid opcional (plantilla de rejilla iso preprocesada) para reforzar el layout. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (+ comfyui_inject_controlnet si grid_image). Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, isometric, tile, workflow, stable-diffusion]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml, comfyui_inject_controlnet_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: negative
|
||||
desc: "Prompt negativo. Por defecto evita perspectiva de fuga que rompe el angulo iso."
|
||||
- name: ckpt_name
|
||||
desc: "Checkpoint base. Default 'dreamshaper_8.safetensors' (SD1.5 holgado, casa con la LoRA iso SD1.5). keyword-only."
|
||||
desc: "Checkpoint base. Default 'IMG_dreamshaper_8.safetensors' (SD1.5 holgado, casa con la LoRA iso SD1.5). keyword-only."
|
||||
- name: iso_lora
|
||||
desc: "LoRA isometrica en models/loras. Default 'SD15_isometric_game_assets.safetensors'. keyword-only."
|
||||
- name: lora_strength
|
||||
@@ -87,7 +87,7 @@ el prompt se desvíe del ángulo y quieras forzar la rejilla. Para una textura i
|
||||
## Gotchas
|
||||
|
||||
- **Requiere la LoRA `SD15_isometric_game_assets.safetensors` en models/loras**
|
||||
(ya presente). Es SD1.5: usa un checkpoint SD1.5 (`dreamshaper_8`).
|
||||
(ya presente). Es SD1.5: usa un checkpoint SD1.5 (`IMG_dreamshaper_8`).
|
||||
- **`comfyui_inject_controlnet` NO preprocesa**: `grid_image` debe ser una imagen
|
||||
de control ya en line-art/canny limpio. Si partes de un render, preprocésala
|
||||
antes con `CannyEdgePreprocessor`/`LineArtPreprocessor` (ya instalados).
|
||||
|
||||
@@ -34,7 +34,7 @@ def comfyui_build_isometric_workflow(
|
||||
positive: str,
|
||||
negative: str = "perspective, vanishing point, blurry, low quality",
|
||||
*,
|
||||
ckpt_name: str = "dreamshaper_8.safetensors",
|
||||
ckpt_name: str = "IMG_dreamshaper_8.safetensors",
|
||||
iso_lora: str = "SD15_isometric_game_assets.safetensors",
|
||||
lora_strength: float = 0.9,
|
||||
grid_image: str | None = None,
|
||||
@@ -56,7 +56,7 @@ def comfyui_build_isometric_workflow(
|
||||
game asset, 2:1 projection"). No puede estar vacio.
|
||||
negative: prompt negativo (por defecto evita perspectiva de fuga que
|
||||
rompe el angulo iso).
|
||||
ckpt_name: checkpoint base (default 'dreamshaper_8.safetensors', SD1.5
|
||||
ckpt_name: checkpoint base (default 'IMG_dreamshaper_8.safetensors', SD1.5
|
||||
holgado y casa con la LoRA iso SD1.5). keyword-only.
|
||||
iso_lora: LoRA isometrica en models/loras
|
||||
(default 'SD15_isometric_game_assets.safetensors').
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_item_icon_workflow(item: str, *, style: str = \"game icon, clean, centered\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"item_icon\") -> dict"
|
||||
signature: "def comfyui_build_item_icon_workflow(item: str, *, style: str = \"game icon, clean, centered\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"item_icon\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN icono de item de inventario 2D (espada, pocion, anillo, libro, escudo, gema): sujeto unico centrado, fondo limpio uniforme, estilo consistente entre items, encuadre cuadrado. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_pixelart/sprite_sheet/seamless_tile_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, icon, item, inventory, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los items de un set (ej. 'game icon, clean, centered', 'hand-painted RPG icon', 'flat vector icon'). Pasa el MISMO style + checkpoint + lora a todos los items para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -93,8 +93,8 @@ cada icono y monta los PNG con `comfyui_build_grid`.
|
||||
uses para iconos.
|
||||
- **Coherencia del set = mismos parametros**: si cambias `style`/`checkpoint`/
|
||||
`lora`/`seed` entre items, el set deja de combinar. Fija esos y varía solo `item`.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- Si el modelo mete varios objetos o texto, el negativo por defecto ya empuja a
|
||||
"single object / plain background / no text"; refuerza `style` con "single item,
|
||||
isolated" si insiste.
|
||||
|
||||
@@ -88,7 +88,7 @@ def comfyui_build_item_icon_workflow(
|
||||
item: str,
|
||||
*,
|
||||
style: str = "game icon, clean, centered",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -111,8 +111,8 @@ def comfyui_build_item_icon_workflow(
|
||||
(ej. "game icon, clean, centered", "hand-painted RPG icon", "flat
|
||||
vector icon"). Pasa el MISMO style + checkpoint + (lora) a todos los
|
||||
items del set para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
purity: pure
|
||||
version: 1.0.0
|
||||
signature: "def comfyui_build_outpaint_asset_workflow(input_image: str, prompt: str, *, left: int = 0, right: int = 0, top: int = 0, bottom: int = 0, feather: int = 40, checkpoint: str = \"dreamshaper_8.safetensors\", denoise: float = 1.0, style: str = \"game background\", grow_mask: int = 0, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"outpaint_asset\") -> dict"
|
||||
signature: "def comfyui_build_outpaint_asset_workflow(input_image: str, prompt: str, *, left: int = 0, right: int = 0, top: int = 0, bottom: int = 0, feather: int = 40, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", denoise: float = 1.0, style: str = \"game background\", grow_mask: int = 0, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"outpaint_asset\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow que EXTIENDE EL LIENZO de un asset 2D ya pintado (outpaint): recibe el asset + cuanto extender por cada lado (left/right/top/bottom px) + un prompt de que generar en la franja nueva, y agranda el canvas generando contenido coherente con el original mas alla de sus bordes. Es el quinto vertice del eje transform de gamedev-2d: distinto de txt2img (enemy_creature/item_icon, inventan la forma desde texto), de img2img (asset_variant, reescribe TODO el asset), de ControlNet (sprite_from_sketch, pinta un sprite desde un boceto) y de inpaint (inpaint_asset, edita una region INTERIOR con una mascara externa del mismo tamano). Mecanismo: el nodo nativo ImagePadForOutpaint amplia el lienzo left/top/right/bottom px, rellena la franja y EMITE la mascara feathered de la zona nueva (la genera el grafo, NO la recibe el caller); VAEEncodeForInpaint codifica respetando esa mascara y el KSampler (denoise alto) genera lo nuevo con '{prompt}, {style}, seamless extension'. feather difumina la costura entre lo viejo y lo nuevo; grow_mask dilata adicionalmente el borde si aparece costura. Compone comfyui_build_inpaint_workflow (base; su LoadImageMask se elimina) + comfyui_inject_lora (estilo opcional). Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram). Probado e2e en GPU con SD1.5: seamless 512x512 extendido right=256 -> 768x512, original conservado + franja nueva coherente."
|
||||
tags: [comfyui, ml, gamedev-2d, outpaint, asset-transform, canvas-extend, stable-diffusion, workflow]
|
||||
uses_functions: [comfyui_build_inpaint_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -29,7 +29,7 @@ params:
|
||||
- name: feather
|
||||
desc: "Pixeles de difuminado del borde entre el asset original y la franja nueva (input 'feathering' del nodo ImagePadForOutpaint). Default 40. Mas alto = transicion mas gradual pero invade mas la imagen original; no debe superar mucho la extension del lado mas pequeno. Se clampa a [0, 16384]. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
- name: denoise
|
||||
desc: "Fuerza de denoising del KSampler dentro de la mascara (la franja nueva). En outpaint suele ser 1.0 (por defecto): la zona ampliada parte de relleno y se genera por completo. Se clampa a [0.0, 1.0]. keyword-only."
|
||||
- name: style
|
||||
|
||||
@@ -116,7 +116,7 @@ def comfyui_build_outpaint_asset_workflow(
|
||||
top: int = 0,
|
||||
bottom: int = 0,
|
||||
feather: int = 40,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
denoise: float = 1.0,
|
||||
style: str = "game background",
|
||||
grow_mask: int = 0,
|
||||
@@ -156,7 +156,7 @@ def comfyui_build_outpaint_asset_workflow(
|
||||
(`feathering` del nodo). Default 40 (el del nodo). Mas alto = transicion mas
|
||||
gradual pero invade mas la imagen original; no debe superar mucho la extension
|
||||
del lado mas pequeno. Se clampa a [0, 16384]. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en
|
||||
8GB lowvram) por defecto. keyword-only.
|
||||
denoise: fuerza de denoising del KSampler dentro de la mascara (la franja nueva).
|
||||
En outpaint suele ser 1.0 (por defecto): la zona ampliada parte de relleno y se
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_parallax_background_workflow(scene: str, *, style: str = \"game background, side-scroller, parallax layers, detailed, no characters\", layers: int = 3, checkpoint: str = \"dreamshaper_8.safetensors\", negative: str = \"character, person, foreground object, text, watermark, blurry, low quality\", depth_node: str = \"DepthAnythingV2Preprocessor\", depth_model: str = \"depth_anything_v2_vitl.pth\", depth_resolution: int = 512, width: int = 1024, height: int = 512, seed: int = 0, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"parallax_bg\") -> dict"
|
||||
signature: "def comfyui_build_parallax_background_workflow(scene: str, *, style: str = \"game background, side-scroller, parallax layers, detailed, no characters\", layers: int = 3, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", negative: str = \"character, person, foreground object, text, watermark, blurry, low quality\", depth_node: str = \"DepthAnythingV2Preprocessor\", depth_model: str = \"depth_anything_v2_vitl.pth\", depth_resolution: int = 512, width: int = 1024, height: int = 512, seed: int = 0, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"parallax_bg\") -> dict"
|
||||
description: "Construye el dict (API format) de un workflow ComfyUI para un FONDO DE JUEGO EN CAPAS de parallax 2.5D (side-scroller/plataformas): genera un fondo apaisado con txt2img y estima su MAPA DE PROFUNDIDAD con DepthAnythingV2Preprocessor, guardando ambos PNG (fondo + depth). La separacion en N bandas por rango de profundidad es post-proceso (gap: split_parallax_layers). Compone comfyui_build_txt2img_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, parallax, background, depth, side-scroller, workflow, stable-diffusion]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: layers
|
||||
desc: "Numero de capas de profundidad a derivar del depth map en post-proceso (cielo/lejano/medio/frente). Debe ser >= 2. NO genera nodos: se refleja en el filename del depth map para trazabilidad. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint base. Default 'dreamshaper_8.safetensors' (SD1.5 holgado en 8GB). keyword-only."
|
||||
desc: "Checkpoint base. Default 'IMG_dreamshaper_8.safetensors' (SD1.5 holgado en 8GB). keyword-only."
|
||||
- name: negative
|
||||
desc: "Prompt negativo. Por defecto evita personajes/props en primer plano que rompen un fondo limpio por capas. keyword-only."
|
||||
- name: depth_node
|
||||
|
||||
@@ -47,7 +47,7 @@ def comfyui_build_parallax_background_workflow(
|
||||
*,
|
||||
style: str = "game background, side-scroller, parallax layers, detailed, no characters",
|
||||
layers: int = 3,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
negative: str = "character, person, foreground object, text, watermark, blurry, low quality",
|
||||
depth_node: str = "DepthAnythingV2Preprocessor",
|
||||
depth_model: str = "depth_anything_v2_vitl.pth",
|
||||
@@ -72,7 +72,7 @@ def comfyui_build_parallax_background_workflow(
|
||||
post-proceso (cielo/lejano/medio/frente...). Debe ser >= 2 (un parallax
|
||||
necesita al menos dos planos). NO genera nodos en este grafo: se refleja
|
||||
en el filename del depth map para trazabilidad. keyword-only.
|
||||
checkpoint: checkpoint base. Default 'dreamshaper_8.safetensors' (SD1.5,
|
||||
checkpoint: checkpoint base. Default 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB). keyword-only.
|
||||
negative: prompt negativo. Por defecto evita personajes/props en primer
|
||||
plano, que rompen un fondo limpio por capas. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_particle_texture_workflow(particle: str, *, soft: bool = True, style: str = \"particle texture, soft glow\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 256, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 24, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"particle_texture\") -> dict"
|
||||
signature: "def comfyui_build_particle_texture_workflow(particle: str, *, soft: bool = True, style: str = \"particle texture, soft glow\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 256, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 24, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"particle_texture\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UNA textura de particula individual con alpha: chispa, humo, polvo, destello/flare, gota, copo, hoja, circulo de energia — el 'ladrillo' que el sistema de particulas del motor (Godot GPUParticles2D, Unity VFX Graph) instancia a miles. Se genera aislada y centrada sobre fondo NEGRO puro, pensada para extraer alpha por luminancia con comfyui_matting_luma_to_alpha (translucido con falloff: additive blend). soft controla el borde (True=glow difuso/feathered; False=nitido/cristalino). NO inyecta Rembg (el matting de un translucido es luma-to-alpha, no un nodo). Size pequeño (256) por defecto: se replica a miles, no necesita resolucion alta. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora. Hermano de comfyui_build_decal_overlay/vfx_spritesheet_workflow. DISTINTO de vfx_spritesheet (ese es la SECUENCIA animada de un efecto; esto es UNA textura reutilizable estatica). Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, gamedev-vfx, particle, texture, alpha, luma, spark, smoke, dust, flare, vfx, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo de la particula (ej. 'particle texture, soft glow', 'stylized vfx, painterly', 'photoreal smoke', 'anime sparkle'). Pasa el MISMO style + checkpoint + lora a todas las particulas de un set para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 512/768). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 512/768). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 256 por defecto: una textura de particula es pequeña y se replica a miles, no necesita resolucion alta. keyword-only."
|
||||
- name: seed
|
||||
@@ -143,7 +143,7 @@ O lanzable directo con: `./fn run comfyui_build_particle_texture_workflow` (impr
|
||||
textured background, frame'. Si aún así sale ruido de fondo, sube `cfg` o haz reroll de
|
||||
`seed`.
|
||||
- **Size pequeño por diseño**: 256 por defecto porque la textura se replica a miles; subir
|
||||
resolución no aporta y gasta VRAM. SDXL pide más (subir a 512/768); con dreamshaper_8
|
||||
resolución no aporta y gasta VRAM. SDXL pide más (subir a 512/768); con IMG_dreamshaper_8
|
||||
(SD1.5) 256 va holgado en 8GB lowvram. Si hay OOM, baja `size` o usa SD1.5.
|
||||
- **Es una función pura**: solo arma el dict. La generación real (GPU) la hacen
|
||||
`comfyui_submit_workflow` + `comfyui_wait_result` + `comfyui_fetch_output_image`; el
|
||||
|
||||
@@ -79,7 +79,7 @@ def comfyui_build_particle_texture_workflow(
|
||||
*,
|
||||
soft: bool = True,
|
||||
style: str = "particle texture, soft glow",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 256,
|
||||
seed: int = 0,
|
||||
lora: str | None = None,
|
||||
@@ -108,8 +108,8 @@ def comfyui_build_particle_texture_workflow(
|
||||
glow", "stylized vfx, painterly", "photoreal smoke", "anime sparkle").
|
||||
Pasa el MISMO style + checkpoint + (lora) a todas las particulas de un
|
||||
set para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 512/768). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 256 por defecto:
|
||||
una textura de particula es pequeña y se replica a miles, no necesita
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_pixelart_workflow(positive: str, negative: str = \"blurry, jpeg artifacts, gradient, smooth shading, anti-aliasing\", *, ckpt_name: str = \"juggernaut_xl_v11.safetensors\", pixel_lora: str = \"SDXL_pixel-art.safetensors\", lora_strength: float = 1.2, use_lcm: bool = True, lcm_lora: str = \"SDXL_lcm-lora.safetensors\", lcm_strength: float = 1.0, steps: int | None = None, cfg: float | None = None, width: int = 1024, height: int = 1024, seed: int = 0, sampler_name: str | None = None, scheduler: str | None = None, filename_prefix: str = \"pixelart\") -> dict"
|
||||
signature: "def comfyui_build_pixelart_workflow(positive: str, negative: str = \"blurry, jpeg artifacts, gradient, smooth shading, anti-aliasing\", *, ckpt_name: str = \"IMG_juggernaut_xl_v11.safetensors\", pixel_lora: str = \"SDXL_pixel-art.safetensors\", lora_strength: float = 1.2, use_lcm: bool = True, lcm_lora: str = \"SDXL_lcm-lora.safetensors\", lcm_strength: float = 1.0, steps: int | None = None, cfg: float | None = None, width: int = 1024, height: int = 1024, seed: int = 0, sampler_name: str | None = None, scheduler: str | None = None, filename_prefix: str = \"pixelart\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow ComfyUI de pixel-art Fase 1: SDXL base + LoRA SDXL_pixel-art (nerijs), opcionalmente con LCM-LoRA para 8 steps. Compone comfyui_build_txt2img_workflow + comfyui_inject_multi_lora. El pixel-perfect (Fase 2) lo hace comfyui_pixelize_image, no este workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, pixelart, workflow, stable-diffusion, sdxl]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_multi_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: negative
|
||||
desc: "Prompt negativo. Por defecto evita blur/gradientes/anti-alias que estropean el look pixel."
|
||||
- name: ckpt_name
|
||||
desc: "Checkpoint SDXL base. Default 'juggernaut_xl_v11.safetensors' (el SDXL instalado; SDXL_pixel-art es LoRA SDXL). keyword-only."
|
||||
desc: "Checkpoint SDXL base. Default 'IMG_juggernaut_xl_v11.safetensors' (el SDXL instalado; SDXL_pixel-art es LoRA SDXL). keyword-only."
|
||||
- name: pixel_lora
|
||||
desc: "Archivo de la LoRA de estilo pixel-art en models/loras. Default 'SDXL_pixel-art.safetensors'. keyword-only."
|
||||
- name: lora_strength
|
||||
@@ -90,7 +90,7 @@ Para tilesets, genera cada tile por separado y ensambla con `comfyui_build_grid`
|
||||
- `use_lcm=True` requiere `SDXL_lcm-lora.safetensors` en models/loras y el sampler
|
||||
`lcm`; ambos verificados presentes. Da iteración rápida (8 steps) en 8GB.
|
||||
- `ckpt_name` debe ser un checkpoint SDXL (SDXL_pixel-art es LoRA SDXL). Default
|
||||
`juggernaut_xl_v11` (no existe `sd_xl_base_1.0` instalado). SDXL en 8GB corre con
|
||||
`IMG_juggernaut_xl_v11` (no existe `sd_xl_base_1.0` instalado). SDXL en 8GB corre con
|
||||
`--lowvram`; la Fase 2 es CPU y no toca VRAM.
|
||||
- Función pura: no valida contra el server. Si una LoRA/checkpoint falta, el HTTP
|
||||
400 salta al enviar con `comfyui_submit_workflow`.
|
||||
|
||||
@@ -33,7 +33,7 @@ def comfyui_build_pixelart_workflow(
|
||||
positive: str,
|
||||
negative: str = "blurry, jpeg artifacts, gradient, smooth shading, anti-aliasing",
|
||||
*,
|
||||
ckpt_name: str = "juggernaut_xl_v11.safetensors",
|
||||
ckpt_name: str = "IMG_juggernaut_xl_v11.safetensors",
|
||||
pixel_lora: str = "SDXL_pixel-art.safetensors",
|
||||
lora_strength: float = 1.2,
|
||||
use_lcm: bool = True,
|
||||
@@ -55,7 +55,7 @@ def comfyui_build_pixelart_workflow(
|
||||
'isometric view', '32x32 style'. No puede estar vacio.
|
||||
negative: prompt negativo (por defecto evita blur/gradientes/anti-alias,
|
||||
que estropean el look pixel).
|
||||
ckpt_name: checkpoint SDXL base (default 'juggernaut_xl_v11.safetensors',
|
||||
ckpt_name: checkpoint SDXL base (default 'IMG_juggernaut_xl_v11.safetensors',
|
||||
el SDXL instalado; SDXL_pixel-art es una LoRA SDXL). keyword-only.
|
||||
pixel_lora: archivo de la LoRA de estilo pixel-art en models/loras.
|
||||
lora_strength: fuerza de SDXL_pixel-art sobre model y clip (recomendado 1.2).
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_portrait_avatar_workflow(character: str, *, style: str = \"character portrait\", ref_face: str | None = None, checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, facedetailer: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, weight: float = 0.85, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", fd_denoise: float = 0.45, bbox_model: str = \"face_yolov8m.pt\", filename_prefix: str = \"portrait\") -> dict"
|
||||
signature: "def comfyui_build_portrait_avatar_workflow(character: str, *, style: str = \"character portrait\", ref_face: str | None = None, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, facedetailer: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, weight: float = 0.85, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", fd_denoise: float = 0.45, bbox_model: str = \"face_yolov8m.pt\", filename_prefix: str = \"portrait\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN retrato/avatar de personaje 2D (busto centrado, cara al espectador, fondo simple con vinheta) para dialogo, perfil o seleccion de personaje. Con ref_face encadena IPAdapter-FaceID para rostro consistente entre retratos; con facedetailer regenera la cara con detalle (Impact-Pack). Compone comfyui_build_ipadapter_workflow / comfyui_build_txt2img_workflow + comfyui_inject_lora + comfyui_build_facedetailer_workflow. Hermano de comfyui_build_sprite_sheet/item_icon_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, portrait, avatar, character, faceid, ipadapter, facedetailer, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_build_ipadapter_workflow_py_ml, comfyui_inject_lora_py_ml, comfyui_build_facedetailer_workflow_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: ref_face
|
||||
desc: "Nombre de una imagen de rostro de referencia en input/ del servidor. Si se pasa, encadena IPAdapter-FaceID para que el retrato tenga el MISMO rostro (identidad consistente entre retratos). None = identidad solo por prompt + seed. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. FaceID solo instalado para SD1.5: con checkpoint SDXL deja ref_face=None. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. FaceID solo instalado para SD1.5: con checkpoint SDXL deja ref_face=None. keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto, encuadre tipico de avatar. keyword-only."
|
||||
- name: facedetailer
|
||||
@@ -102,7 +102,7 @@ pierde. Es UN retrato; genera cada uno y, si quieres un mosaico, monta los PNG c
|
||||
## Gotchas
|
||||
|
||||
- **FaceID solo SD1.5**: `ref_face` requiere los modelos IPAdapter-FaceID, que en
|
||||
este servidor solo estan para SD1.5 (dreamshaper_8). Con un checkpoint SDXL deja
|
||||
este servidor solo estan para SD1.5 (IMG_dreamshaper_8). Con un checkpoint SDXL deja
|
||||
`ref_face=None` (identidad por prompt + seed) o usa un checkpoint SD1.5.
|
||||
- **El detailer regenera la cara con el modelo base, no con FaceID**: FaceDetailer
|
||||
reutiliza el `CheckpointLoaderSimple` crudo (no la rama IPAdapter). Por eso
|
||||
@@ -118,7 +118,7 @@ pierde. Es UN retrato; genera cada uno y, si quieres un mosaico, monta los PNG c
|
||||
- **Coherencia del set = mismos parametros**: cambiar `style`/`checkpoint`/`lora`
|
||||
entre retratos rompe el look uniforme. Para el mismo personaje, fija ademas
|
||||
`ref_face` + `seed`.
|
||||
- **8GB lowvram**: `size=512` con dreamshaper_8 va holgado; SDXL pide mas VRAM y
|
||||
- **8GB lowvram**: `size=512` con IMG_dreamshaper_8 va holgado; SDXL pide mas VRAM y
|
||||
resolucion mayor. Si hay OOM, baja `size` o desactiva `facedetailer`.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
`comfyui_submit_workflow` + `comfyui_wait_result` + `comfyui_fetch_output_image`.
|
||||
|
||||
@@ -62,7 +62,7 @@ def comfyui_build_portrait_avatar_workflow(
|
||||
*,
|
||||
style: str = "character portrait",
|
||||
ref_face: str | None = None,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
facedetailer: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -93,7 +93,7 @@ def comfyui_build_portrait_avatar_workflow(
|
||||
input/ del servidor ComfyUI. Si se pasa, encadena IPAdapter-FaceID para
|
||||
que el retrato tenga el MISMO rostro (identidad consistente entre
|
||||
retratos). None = identidad solo por prompt + seed. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto. FaceID solo esta instalado para
|
||||
SD1.5: si usas un checkpoint SDXL, deja ref_face=None. keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_projectile_workflow(projectile: str, *, direction: str = \"right\", glow: bool = False, style: str = \"game projectile, side view\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"projectile\") -> dict"
|
||||
signature: "def comfyui_build_projectile_workflow(projectile: str, *, direction: str = \"right\", glow: bool = False, style: str = \"game projectile, side view\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"projectile\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN proyectil orientado 2D: flecha, bala, bola de fuego, rayo, misil o hechizo — sprite pequeno con orientacion (horizontal por defecto, apuntando a la derecha), aislado sobre fondo recortable a alpha, listo para instanciar como proyectil en el motor (rotar segun el angulo de disparo). Opcion `direction` (right/left/up/down) y `glow`: glow=False (defecto) -> proyectil SOLIDO con Image Rembg para alpha; glow=True -> proyectil BRILLANTE/magico sobre fondo NEGRO sin Rembg, como insumo de comfyui_matting_luma_to_alpha (luminancia-como-alpha) que el caller aplica luego. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (si solido y transparent). Hermano de comfyui_build_item_icon/topdown_sprite/vfx_spritesheet_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, projectile, bullet, fireball, spell, vfx, rembg, luma-to-alpha, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -24,7 +24,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los proyectiles del set (ej. 'game projectile, side view', 'hand-painted RPG projectile', 'pixel art bullet'). Pasa el MISMO style + checkpoint + lora a todos los proyectiles para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -118,8 +118,8 @@ juego para que combinen.
|
||||
real (GPU) la hacen `comfyui_submit_workflow` + `comfyui_wait_result` +
|
||||
`comfyui_fetch_output_image`; el luma-to-alpha de un proyectil glow es
|
||||
`comfyui_matting_luma_to_alpha` en un pipeline posterior.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
- Es una funcion **pura**: solo arma el dict, sin red ni I/O. Determinista para los mismos
|
||||
argumentos.
|
||||
|
||||
@@ -108,7 +108,7 @@ def comfyui_build_projectile_workflow(
|
||||
direction: str = "right",
|
||||
glow: bool = False,
|
||||
style: str = "game projectile, side view",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -144,8 +144,8 @@ def comfyui_build_projectile_workflow(
|
||||
set (ej. "game projectile, side view", "hand-painted RPG projectile",
|
||||
"pixel art bullet"). Pasa el MISMO style + checkpoint + (lora) a todos
|
||||
los proyectiles del set para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_prop_object_workflow(prop: str, *, style: str = \"game prop, isometric or side view\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"prop_object\") -> dict"
|
||||
signature: "def comfyui_build_prop_object_workflow(prop: str, *, style: str = \"game prop, isometric or side view\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"prop_object\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN prop/objeto de escenario de juego 2D (barril, cofre, antorcha, planta, mueble, roca, fuente, estatua, decoracion): UN objeto inanimado aislado a escala de escena y perspectiva de juego (isometrica/lateral), centrado, fondo limpio uniforme recortable a alpha, estilo consistente para poblar un nivel. Diferenciado de comfyui_build_item_icon (objeto de MUNDO vs icono plano de inventario). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_enemy_creature/item_icon/ui_hud_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, prop, object, scenery, environment, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo/perspectiva que mantiene consistentes los props del set y los situa en el MUNDO, no en la UI (ej. 'game prop, isometric or side view', 'top-down RPG prop', 'side-scroller platformer prop', 'low poly stylized prop'). Pasa el MISMO style + checkpoint + lora a todos los props del nivel para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -100,8 +100,8 @@ sheet del atrezzo, genera cada prop y monta los PNG con `comfyui_build_grid`.
|
||||
en un paso aparte.
|
||||
- **Coherencia del set = mismos parametros**: si cambias `style`/`checkpoint`/`lora`/
|
||||
`seed` entre props, el atrezzo deja de combinar. Fija esos y varia solo `prop`.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
Si hay OOM, baja `size` o usa SD1.5.
|
||||
- Si el modelo mete una persona/criatura o varios objetos, el negativo por defecto ya
|
||||
empuja a "single object / no characters / no cropped"; refuerza `style` con
|
||||
|
||||
@@ -108,7 +108,7 @@ def comfyui_build_prop_object_workflow(
|
||||
prop: str,
|
||||
*,
|
||||
style: str = "game prop, isometric or side view",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -134,8 +134,8 @@ def comfyui_build_prop_object_workflow(
|
||||
or side view", "top-down RPG prop", "side-scroller platformer prop",
|
||||
"low poly stylized prop"). Pasa el MISMO style + checkpoint + (lora) a
|
||||
todos los props del nivel para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_rune_glyph_workflow(glyph: str, *, glow: bool = True, style: str = \"arcane glowing rune\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"rune_glyph\") -> dict"
|
||||
signature: "def comfyui_build_rune_glyph_workflow(glyph: str, *, glow: bool = True, style: str = \"arcane glowing rune\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"rune_glyph\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UNA runa / glifo / sigilo magico 2D: simbolo arcano aislado — glifos runicos, circulos magicos, sigilos de invocacion, inscripciones brillantes — para hechizos, portales, marcas de conjuro y efectos de magia. Se genera AISLADO sobre fondo uniforme; glow=True (defecto) lo pone BRILLANTE sobre NEGRO puro, pensado para extraer alpha por luminancia con comfyui_matting_luma_to_alpha (conserva el resplandor para blend aditivo en el motor). NO inyecta Rembg (el matting de una runa brillante es luma-to-alpha, no un nodo). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo arcano opcional). Hermano de comfyui_build_status_effect_icon/decal_overlay_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, rune, glyph, sigil, magic, arcane, glow, alpha, luma, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo arcano que mantiene consistentes las runas de un set (ej. 'arcane glowing rune', 'fiery demonic sigil', 'icy blue magic circle', 'golden holy glyph', 'engraved stone rune'). Pasa el MISMO style + checkpoint + lora a todas las runas de un grimorio para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 768/1024). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size a 768/1024). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: seed
|
||||
@@ -134,6 +134,6 @@ recortable por rembg, pequeño y legible a 16-32 px en el HUD: cosa distinta.
|
||||
por defecto. Para runas rojas pasa a `comfyui_matting_luma_to_alpha` unos `luma_weights`
|
||||
con mas peso al rojo y sube `gamma`. Para runas blancas/doradas/azules (la mayoria de
|
||||
magia brillante) los pesos por defecto van perfectos.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
|
||||
@@ -87,7 +87,7 @@ def comfyui_build_rune_glyph_workflow(
|
||||
*,
|
||||
glow: bool = True,
|
||||
style: str = "arcane glowing rune",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
seed: int = 0,
|
||||
lora: str | None = None,
|
||||
@@ -118,8 +118,8 @@ def comfyui_build_rune_glyph_workflow(
|
||||
magic circle", "golden holy glyph", "engraved stone rune"). Pasa el
|
||||
MISMO style + checkpoint + (lora) a todas las runas de un grimorio para
|
||||
coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_seamless_tile_workflow(positive: str, negative: str = \"\", *, ckpt_name: str = \"dreamshaper_8.safetensors\", tiling: str = \"enable\", copy_model: str = \"Make a copy\", circular_vae: bool = True, material_lora: str | None = None, lora_strength: float = 1.0, steps: int = 20, cfg: float = 7.0, width: int = 512, height: int = 512, seed: int = 0, sampler_name: str = \"euler\", scheduler: str = \"normal\", filename_prefix: str = \"seamless\") -> dict"
|
||||
signature: "def comfyui_build_seamless_tile_workflow(positive: str, negative: str = \"\", *, ckpt_name: str = \"IMG_dreamshaper_8.safetensors\", tiling: str = \"enable\", copy_model: str = \"Make a copy\", circular_vae: bool = True, material_lora: str | None = None, lora_strength: float = 1.0, steps: int = 20, cfg: float = 7.0, width: int = 512, height: int = 512, seed: int = 0, sampler_name: str = \"euler\", scheduler: str = \"normal\", filename_prefix: str = \"seamless\") -> dict"
|
||||
description: "Construye el dict (API format) de un workflow ComfyUI de textura SEAMLESS (tileable) usando el custom node spinagon/ComfyUI-seamless-tiling: inserta SeamlessTile (Conv2d circular) entre la fuente MODEL y el KSampler, y CircularVAEDecode en lugar de VAEDecode. Compone comfyui_build_txt2img_workflow (+ comfyui_inject_lora opcional). Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, seamless, tile, texture, workflow, stable-diffusion]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: negative
|
||||
desc: "Prompt negativo (ej. 'seam, border, frame')."
|
||||
- name: ckpt_name
|
||||
desc: "Checkpoint. Default 'dreamshaper_8.safetensors' (SD1.5 holgado en 8GB; el seamless cuesta ~0 VRAM). keyword-only."
|
||||
desc: "Checkpoint. Default 'IMG_dreamshaper_8.safetensors' (SD1.5 holgado en 8GB; el seamless cuesta ~0 VRAM). keyword-only."
|
||||
- name: tiling
|
||||
desc: "Eje de tileado: 'enable' (ambos), 'x_only' (horizontal, muros), 'y_only' (vertical), 'disable'. Un solo widget. keyword-only."
|
||||
- name: copy_model
|
||||
|
||||
@@ -43,7 +43,7 @@ def comfyui_build_seamless_tile_workflow(
|
||||
positive: str,
|
||||
negative: str = "",
|
||||
*,
|
||||
ckpt_name: str = "dreamshaper_8.safetensors",
|
||||
ckpt_name: str = "IMG_dreamshaper_8.safetensors",
|
||||
tiling: str = "enable",
|
||||
copy_model: str = "Make a copy",
|
||||
circular_vae: bool = True,
|
||||
@@ -64,7 +64,7 @@ def comfyui_build_seamless_tile_workflow(
|
||||
positive: prompt de la textura (ej. "seamless grass texture, top down").
|
||||
No puede estar vacio.
|
||||
negative: prompt negativo.
|
||||
ckpt_name: checkpoint (default 'dreamshaper_8.safetensors', SD1.5 holgado
|
||||
ckpt_name: checkpoint (default 'IMG_dreamshaper_8.safetensors', SD1.5 holgado
|
||||
en 8GB; el coste VRAM del seamless es ~0). keyword-only.
|
||||
tiling: eje de tileado. 'enable' (ambos), 'x_only' (horizontal, muros),
|
||||
'y_only' (vertical), 'disable'. Un solo widget, no dos bools.
|
||||
|
||||
@@ -91,7 +91,7 @@ def test_error_bad_copy_model():
|
||||
def test_purity_input_not_mutated():
|
||||
from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
|
||||
base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "x")
|
||||
base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "x")
|
||||
snapshot = copy.deepcopy(base)
|
||||
# No es la entrada directa, pero verificamos que el builder no muta el resultado de txt2img
|
||||
# llamandolo dos veces sin estado compartido.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_skill_tree_node_workflow(skill: str, *, frame: str = \"hexagonal\", state: str = \"unlocked\", ui_style: str = \"fantasy skill tree node\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"skill_tree_node\") -> dict"
|
||||
signature: "def comfyui_build_skill_tree_node_workflow(skill: str, *, frame: str = \"hexagonal\", state: str = \"unlocked\", ui_style: str = \"fantasy skill tree node\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"skill_tree_node\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN nodo de arbol de habilidades / talentos 2D (RPG, ARPG, MOBA, roguelike): el icono de una skill DENTRO de un marco decorativo (circular, hexagonal, rombo, escudo) que la UI de progresion pinta en la rejilla de talentos, con variante de ESTADO visual (desbloqueado brillante / bloqueado gris). Centrado, fondo limpio uniforme, recortable a alpha, estilo consistente entre nodos del arbol. DISTINTO de item_icon (objeto de inventario sin marco), status_effect_icon (simbolo de estado superpuesto sin marco) y ui_hud (chrome grande suelto): esto es el nodo ENMARCADO completo de la pantalla de talentos. El marco y el estado son la firma del asset. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_status_effect_icon/ui_hud_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, ui, skill, talent, tree, progression, node, frame, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -24,7 +24,7 @@ params:
|
||||
- name: ui_style
|
||||
desc: "Descriptor de estilo de UI que mantiene consistentes los nodos de un arbol (ej. 'fantasy skill tree node', 'sci-fi tech tree, neon', 'dark souls talent node', 'minimal flat skill node'). Pasa el MISMO ui_style + frame + checkpoint + lora a todos los nodos para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 256 por defecto: los nodos de talento se muestran a tamano reducido en la rejilla. keyword-only."
|
||||
- name: transparent
|
||||
@@ -135,8 +135,8 @@ Eligela frente a sus hermanos por el ROL del asset:
|
||||
- **El texto/nombre lo pone el motor, no la imagen**: el negativo por defecto empuja a
|
||||
"no text/no letters/no numbers" para que el nodo quede limpio; el nombre del talento,
|
||||
el coste y los rangos los renderiza el juego sobre el nodo.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512; con dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512; con IMG_dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- `transparent=False` deja el nodo opaco sobre fondo plano: util si prefieres recortar
|
||||
fuera del workflow o el motor compone sobre un slot solido.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
|
||||
@@ -126,7 +126,7 @@ def comfyui_build_skill_tree_node_workflow(
|
||||
frame: str = "hexagonal",
|
||||
state: str = "unlocked",
|
||||
ui_style: str = "fantasy skill tree node",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 256,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -161,8 +161,8 @@ def comfyui_build_skill_tree_node_workflow(
|
||||
souls talent node", "minimal flat skill node"). Pasa el MISMO ui_style +
|
||||
frame + checkpoint + (lora) a todos los nodos para coherencia visual.
|
||||
keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para
|
||||
SDXL (mas VRAM, subir size). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 256 por defecto: los
|
||||
nodos de talento se muestran a tamano reducido en la rejilla. keyword-only.
|
||||
|
||||
@@ -46,7 +46,7 @@ recipe = {
|
||||
"slug": "portrait_cinematic_sdxl",
|
||||
"version": "1.0.0",
|
||||
"base_workflow": "txt2img",
|
||||
"checkpoint": "juggernaut_xl_v11.safetensors",
|
||||
"checkpoint": "IMG_juggernaut_xl_v11.safetensors",
|
||||
"loras": [{"name": "add_detail.safetensors", "strength_model": 0.6, "strength_clip": 0.6}],
|
||||
"params": {"steps": 30, "cfg": 5.5, "sampler_name": "dpmpp_2m",
|
||||
"scheduler": "karras", "width": 832, "height": 1216},
|
||||
|
||||
@@ -201,7 +201,7 @@ if __name__ == "__main__":
|
||||
"slug": "portrait_demo",
|
||||
"version": "1.0.0",
|
||||
"base_workflow": "txt2img",
|
||||
"checkpoint": "juggernaut_xl_v11.safetensors",
|
||||
"checkpoint": "IMG_juggernaut_xl_v11.safetensors",
|
||||
"loras": [{"name": "add_detail.safetensors", "strength_model": 0.6, "strength_clip": 0.6}],
|
||||
"params": {"steps": 30, "cfg": 5.5, "sampler_name": "dpmpp_2m",
|
||||
"scheduler": "karras", "width": 832, "height": 1216},
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_splash_art_workflow(scene: str, *, mood: str = \"epic, cinematic\", checkpoint: str = \"juggernaut_xl_v11.safetensors\", width: int = 1024, height: int = 576, hires: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", upscale_by: float = 1.5, hires_denoise: float = 0.4, upscale_model: str = \"4x_foolhardy_Remacri.pth\", filename_prefix: str = \"splash_art\") -> dict"
|
||||
signature: "def comfyui_build_splash_art_workflow(scene: str, *, mood: str = \"epic, cinematic\", checkpoint: str = \"IMG_juggernaut_xl_v11.safetensors\", width: int = 1024, height: int = 576, hires: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", upscale_by: float = 1.5, hires_denoise: float = 0.4, upscale_model: str = \"4x_foolhardy_Remacri.pth\", filename_prefix: str = \"splash_art\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN splash art / pantalla de carga / key art 2D: ilustracion grande y dramatica en formato pantalla apaisado 16:9 (~1024x576), composicion cinematografica (wide shot) con espacio para el titulo del juego. Genera SOLO la ilustracion (el titulo/logo/barra de carga NO). Compone comfyui_build_hires_fix_workflow (si hires) o comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional). Hermano de comfyui_build_card_art/parallax_background_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, splash, key-art, loading-screen, illustration, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_build_hires_fix_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: mood
|
||||
desc: "Atmosfera/tono que tine el splash (ej. 'epic, cinematic', 'dark, ominous', 'bright, hopeful', 'mysterious, ethereal'). Pasa el MISMO mood + checkpoint + lora a varias pantallas para coherencia visual del juego. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL, mejor detalle, ideal para key art) por defecto; en 8GB lowvram con hires puede ser pesado: usa 'dreamshaper_8.safetensors' (SD1.5) y/o hires=False si la GPU se queda corta (OOM). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL, mejor detalle, ideal para key art) por defecto; en 8GB lowvram con hires puede ser pesado: usa 'IMG_dreamshaper_8.safetensors' (SD1.5) y/o hires=False si la GPU se queda corta (OOM). keyword-only."
|
||||
- name: width
|
||||
desc: "Ancho del lienzo en px. Apaisado de pantalla -> width > height. 1024 por defecto. keyword-only."
|
||||
- name: height
|
||||
@@ -66,18 +66,18 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_splash_art_workflow import comfyui_build_splash_art_workflow
|
||||
|
||||
# Splash / key art apaisado 16:9 de un heroe ante un castillo en tormenta, con detalle hires.
|
||||
# En 8GB lowvram va holgado con SD1.5 (dreamshaper_8); SDXL+hires es mas pesado (puede OOM).
|
||||
# En 8GB lowvram va holgado con SD1.5 (IMG_dreamshaper_8); SDXL+hires es mas pesado (puede OOM).
|
||||
wf = comfyui_build_splash_art_workflow(
|
||||
"a lone hero before a dark castle, storm",
|
||||
mood="epic, cinematic",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
# Set coherente: mismo mood/checkpoint para varias pantallas, varia solo scene.
|
||||
# for s in ["title screen vista", "world map overview", "final boss arena"]:
|
||||
# wf = comfyui_build_splash_art_workflow(s, mood="epic, cinematic",
|
||||
# checkpoint="dreamshaper_8.safetensors", seed=7)
|
||||
# checkpoint="IMG_dreamshaper_8.safetensors", seed=7)
|
||||
# comfyui_submit_workflow(wf) # -> comfyui_wait_result -> comfyui_fetch_output_image
|
||||
# El titulo/logo/barra de carga los compone el motor de juego sobre la ilustracion resultante.
|
||||
```
|
||||
@@ -106,9 +106,9 @@ de post sobre la ilustracion — este builder NO los pinta.
|
||||
- **Formato apaisado = `width > height`**: un splash ocupa la pantalla, que es mas
|
||||
ancha que alta. 1024x576 (SD1.5, 16:9 exacto) o 1152x640 / 1344x768 (SDXL nativo). Si
|
||||
pones width<=height pierdes el encuadre de pantalla.
|
||||
- **SDXL + hires es pesado en 8GB lowvram**: el default `juggernaut_xl_v11` con
|
||||
- **SDXL + hires es pesado en 8GB lowvram**: el default `IMG_juggernaut_xl_v11` con
|
||||
`hires=True` re-difunde por tiles y puede dar OOM o ir muy lento. Si la GPU se queda
|
||||
corta: baja a `checkpoint="dreamshaper_8.safetensors"` (SD1.5), pon `hires=False`, o
|
||||
corta: baja a `checkpoint="IMG_dreamshaper_8.safetensors"` (SD1.5), pon `hires=False`, o
|
||||
reduce `width/height`. Probado e2e en GPU con SD1.5 + hires (ver report 0159).
|
||||
- **hires requiere UltimateSDUpscale + Remacri**: si el server responde HTTP 400
|
||||
"node type not found: UltimateSDUpscale", falta el custom node; usa `hires=False`. El
|
||||
|
||||
@@ -37,7 +37,7 @@ plano general) dejando un lado o la parte superior con aire para el titulo.
|
||||
|
||||
Por que hires opcional: un key art se mira grande (pantalla completa), asi que el
|
||||
detalle importa; hires re-difunde la imagen por tiles y anade detalle real. En 8GB
|
||||
lowvram con SDXL puede ser pesado: bajar a SD1.5 (dreamshaper_8) o poner hires=False
|
||||
lowvram con SDXL puede ser pesado: bajar a SD1.5 (IMG_dreamshaper_8) o poner hires=False
|
||||
si la GPU se queda corta (OOM).
|
||||
|
||||
class_types/inputs verificados contra /object_info del servidor (8GB lowvram) a
|
||||
@@ -70,7 +70,7 @@ def comfyui_build_splash_art_workflow(
|
||||
scene: str,
|
||||
*,
|
||||
mood: str = "epic, cinematic",
|
||||
checkpoint: str = "juggernaut_xl_v11.safetensors",
|
||||
checkpoint: str = "IMG_juggernaut_xl_v11.safetensors",
|
||||
width: int = 1024,
|
||||
height: int = 576,
|
||||
hires: bool = True,
|
||||
@@ -98,10 +98,10 @@ def comfyui_build_splash_art_workflow(
|
||||
ominous", "bright, hopeful", "mysterious, ethereal"). Pasa el MISMO mood
|
||||
+ checkpoint + (lora) a varias pantallas para coherencia visual del
|
||||
juego. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL,
|
||||
checkpoint: checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL,
|
||||
mejor detalle a alta resolucion, ideal para key art) por defecto; en 8GB
|
||||
lowvram con hires puede ser pesado: si la GPU se queda corta, usa
|
||||
'dreamshaper_8.safetensors' (SD1.5) y/o hires=False. keyword-only.
|
||||
'IMG_dreamshaper_8.safetensors' (SD1.5) y/o hires=False. keyword-only.
|
||||
width: ancho del lienzo en px. Apaisado de pantalla -> width > height. 1024
|
||||
por defecto. keyword-only.
|
||||
height: alto del lienzo en px. 576 por defecto (16:9 exacto con width=1024,
|
||||
@@ -216,7 +216,7 @@ if __name__ == "__main__":
|
||||
wf = comfyui_build_splash_art_workflow(
|
||||
"a lone hero before a dark castle, storm",
|
||||
mood="epic, cinematic",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ def test_golden_hires_recipe():
|
||||
wf = comfyui_build_splash_art_workflow(
|
||||
"a lone hero before a dark castle, storm",
|
||||
mood="epic, cinematic",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=True,
|
||||
seed=7,
|
||||
)
|
||||
@@ -64,7 +64,7 @@ def test_golden_hires_recipe():
|
||||
def test_edge_no_hires_plain_txt2img():
|
||||
wf = comfyui_build_splash_art_workflow(
|
||||
"a spaceship fleet approaching a ringed planet",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
hires=False,
|
||||
)
|
||||
cls = _classes(wf)
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
purity: pure
|
||||
version: 1.0.0
|
||||
signature: "def comfyui_build_sprite_from_sketch_workflow(sketch_image: str, subject: str, *, control_type: str = \"lineart\", checkpoint: str = \"dreamshaper_8.safetensors\", style: str = \"game asset, clean, centered\", strength: float = 0.8, size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, preprocess: bool = True, controlnet_name: str | None = None, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"sprite_from_sketch\") -> dict"
|
||||
signature: "def comfyui_build_sprite_from_sketch_workflow(sketch_image: str, subject: str, *, control_type: str = \"lineart\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", style: str = \"game asset, clean, centered\", strength: float = 0.8, size: int = 512, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, preprocess: bool = True, controlnet_name: str | None = None, negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"sprite_from_sketch\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow ComfyUI que PINTA un sprite a partir del BOCETO del dev guiado por ControlNet: recibe el dibujo tosco (boceto, lineart o garabato) + un prompt de QUE es, y genera un sprite en estilo de juego que CONSERVA la forma dibujada. Es el tercer eje del catalogo gamedev-2d, distinto de txt2img (enemy_creature, item_icon: inventan la forma desde texto en blanco) y de img2img (asset_variant: reescribe una imagen YA pintada): aqui el dev marca la silueta con su dibujo y la IA pone material/color/acabado. Mecanismo: txt2img base (ruido, denoise 1.0) condicionado por un ControlNet atado al mapa de lineas del boceto. control_type elige el preprocesador (LineArtPreprocessor / ScribblePreprocessor / CannyEdgePreprocessor) y, por defecto, el modelo CN emparejado. Compone comfyui_build_txt2img_workflow + comfyui_inject_controlnet + comfyui_inject_lora (estilo opcional); el unico codigo propio es el helper que interpone el preprocesador entre el boceto y el ControlNet. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, controlnet, sketch, lineart, scribble, canny, sprite, asset-transform, stable-diffusion, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_controlnet_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -21,7 +21,7 @@ params:
|
||||
- name: control_type
|
||||
desc: "Preprocesador y modelo ControlNet a usar. 'lineart' (default, LineArtPreprocessor) para dibujos a lapiz/tinta; 'scribble' (ScribblePreprocessor) para garabatos sueltos con mas libertad a la IA; 'canny' (CannyEdgePreprocessor) para bocetos con bordes nitidos y es el unico cuyo modelo CN dedicado esta instalado en el server 8GB actual (ver Gotchas). keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto. keyword-only."
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene coherentes los sprites de un set (ej. 'game asset, clean, centered', 'dark fantasy creature', 'pixel art'). Mismo style + checkpoint + (lora) para todos los sprites del mismo juego. keyword-only."
|
||||
- name: strength
|
||||
|
||||
@@ -152,7 +152,7 @@ def comfyui_build_sprite_from_sketch_workflow(
|
||||
subject: str,
|
||||
*,
|
||||
control_type: str = "lineart",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
style: str = "game asset, clean, centered",
|
||||
strength: float = 0.8,
|
||||
size: int = 512,
|
||||
@@ -189,7 +189,7 @@ def comfyui_build_sprite_from_sketch_workflow(
|
||||
- "canny": CannyEdgePreprocessor. Para bocetos con bordes nitidos. Es el unico
|
||||
cuyo modelo CN dedicado esta instalado en el server 8GB actual (ver GOTCHA del
|
||||
modulo); funciona out-of-the-box.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en
|
||||
8GB lowvram) por defecto. keyword-only.
|
||||
style: descriptor de estilo que mantiene coherentes los sprites de un set (ej.
|
||||
"game asset, clean, centered", "dark fantasy creature", "pixel art"). Mismo style
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_sprite_sheet_workflow(subject: str, *, ref_image: str | None = None, pose_skeleton: str | None = None, ckpt_name: str = \"dreamshaper_8.safetensors\", char_lora: str | None = None, lora_strength: float = 1.0, controlnet_name: str = \"control_v11p_sd15_openpose_fp16.safetensors\", controlnet_strength: float = 0.55, controlnet_start: float = 0.0, controlnet_end: float = 0.8, transparent: bool = True, rembg_model: str = \"u2net\", weight: float = 0.75, negative: str = \"blurry, lowres, extra limbs, deformed\", width: int = 512, height: int = 768, steps: int = 24, cfg: float = 7.0, seed: int = 0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"sprite\") -> dict"
|
||||
signature: "def comfyui_build_sprite_sheet_workflow(subject: str, *, ref_image: str | None = None, pose_skeleton: str | None = None, ckpt_name: str = \"IMG_dreamshaper_8.safetensors\", char_lora: str | None = None, lora_strength: float = 1.0, controlnet_name: str = \"control_v11p_sd15_openpose_fp16.safetensors\", controlnet_strength: float = 0.55, controlnet_start: float = 0.0, controlnet_end: float = 0.8, transparent: bool = True, rembg_model: str = \"u2net\", weight: float = 0.75, negative: str = \"blurry, lowres, extra limbs, deformed\", width: int = 512, height: int = 768, steps: int = 24, cfg: float = 7.0, seed: int = 0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"sprite\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN sprite de personaje 2D: identidad (IPAdapter-FaceID si ref_image) + LoRA opcional + pose (ControlNet OpenPose con ControlNetApplyAdvanced end<1.0) + transparencia (Rembg). Compone comfyui_build_ipadapter_workflow / comfyui_build_txt2img_workflow + comfyui_inject_lora. Es UN frame; varias poses (misma seed) -> sprite sheet montado con comfyui_build_grid. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, sprite, character, faceid, openpose, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_build_ipadapter_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: pose_skeleton
|
||||
desc: "Imagen de esqueleto OpenPose en input/ para fijar la pose via ControlNet. None = pose libre. keyword-only."
|
||||
- name: ckpt_name
|
||||
desc: "Checkpoint SD1.5 (FaceID + OpenPose solo instalados en SD1.5; default 'dreamshaper_8.safetensors'). keyword-only."
|
||||
desc: "Checkpoint SD1.5 (FaceID + OpenPose solo instalados en SD1.5; default 'IMG_dreamshaper_8.safetensors'). keyword-only."
|
||||
- name: char_lora
|
||||
desc: "LoRA de personaje/estilo opcional en models/loras. keyword-only."
|
||||
- name: lora_strength
|
||||
@@ -99,7 +99,7 @@ monta los PNG resultantes con `comfyui_build_grid`.
|
||||
## Gotchas
|
||||
|
||||
- **Solo SD1.5 hoy**: IPAdapter-FaceID y ControlNet-OpenPose están instalados solo
|
||||
en SD1.5. Usa `dreamshaper_8` u otro checkpoint SD1.5.
|
||||
en SD1.5. Usa `IMG_dreamshaper_8` u otro checkpoint SD1.5.
|
||||
- **`ref_image`/`pose_skeleton` son nombres de archivos en el dir `input/` del
|
||||
servidor**, no rutas locales. Súbelas antes (LoadImage las lee de ahí).
|
||||
- **Usa `ControlNetApplyAdvanced`** (no el legacy `ControlNetApply`): `end_percent`
|
||||
|
||||
@@ -128,7 +128,7 @@ def comfyui_build_sprite_sheet_workflow(
|
||||
*,
|
||||
ref_image: str | None = None,
|
||||
pose_skeleton: str | None = None,
|
||||
ckpt_name: str = "dreamshaper_8.safetensors",
|
||||
ckpt_name: str = "IMG_dreamshaper_8.safetensors",
|
||||
char_lora: str | None = None,
|
||||
lora_strength: float = 1.0,
|
||||
controlnet_name: str = "control_v11p_sd15_openpose_fp16.safetensors",
|
||||
@@ -159,7 +159,7 @@ def comfyui_build_sprite_sheet_workflow(
|
||||
pose_skeleton: imagen de esqueleto OpenPose en input/ para fijar la pose
|
||||
via ControlNet. None = pose libre. keyword-only.
|
||||
ckpt_name: checkpoint SD1.5 (FaceID + OpenPose solo instalados en SD1.5;
|
||||
default 'dreamshaper_8.safetensors'). keyword-only.
|
||||
default 'IMG_dreamshaper_8.safetensors'). keyword-only.
|
||||
char_lora: LoRA de personaje/estilo opcional en models/loras.
|
||||
lora_strength: fuerza del char_lora sobre model y clip.
|
||||
controlnet_name: ControlNet OpenPose (default SD1.5).
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_status_effect_icon_workflow(effect: str, *, ui_style: str = \"game status icon, bold symbol, flat\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"status_effect_icon\") -> dict"
|
||||
signature: "def comfyui_build_status_effect_icon_workflow(effect: str, *, ui_style: str = \"game status icon, bold symbol, flat\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 256, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"status_effect_icon\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN icono de estado / buff-debuff 2D (veneno, quemadura, congelacion, escudo, regeneracion, aturdimiento, velocidad, sangrado, maldicion): simbolo unico audaz y LEGIBLE A TAMANO REDUCIDO, centrado, fondo limpio uniforme, estilo de UI consistente entre estados, recortable a alpha. Tamano por defecto menor (256) por ser iconos compactos del HUD. DISTINTO de item_icon (objeto de inventario) y ui_hud (chrome grande de interfaz): es un simbolo de estado compacto. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_item_icon/ui_hud_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, ui, status, buff, debuff, icon, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: ui_style
|
||||
desc: "Descriptor de estilo de UI que mantiene consistentes los iconos de un set (ej. 'game status icon, bold symbol, flat', 'sci-fi HUD status, neon glow', 'pixel art status icon', 'minimal flat status icon'). Pasa el MISMO ui_style + checkpoint + lora a todos los iconos de la barra de estados para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 256 por defecto: son iconos compactos que se muestran a tamano reducido en el HUD. keyword-only."
|
||||
- name: transparent
|
||||
@@ -116,8 +116,8 @@ Eligela frente a sus hermanos por el ROL del asset:
|
||||
"no text / no letters" para que la silueta quede limpia; el contador de turnos o el
|
||||
stack del buff se renderiza en el juego sobre el icono. Si quieres texto horneado,
|
||||
pasa un `negative` propio sin "text, letters".
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512/768; con dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 512/768; con IMG_dreamshaper_8 (SD1.5) deja 256 (holgado en 8GB lowvram).
|
||||
- `transparent=False` deja el simbolo opaco sobre fondo plano: util si prefieres
|
||||
recortar fuera del workflow o el motor compone sobre un slot solido.
|
||||
- Es una funcion **pura**: solo arma el dict. La generacion real (GPU) la hacen
|
||||
|
||||
@@ -104,7 +104,7 @@ def comfyui_build_status_effect_icon_workflow(
|
||||
effect: str,
|
||||
*,
|
||||
ui_style: str = "game status icon, bold symbol, flat",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 256,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -130,8 +130,8 @@ def comfyui_build_status_effect_icon_workflow(
|
||||
status, neon glow", "pixel art status icon", "minimal flat status
|
||||
icon"). Pasa el MISMO ui_style + checkpoint + (lora) a todos los iconos
|
||||
de la barra de estados para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 256 por defecto:
|
||||
son iconos compactos que se muestran a tamano reducido en el HUD.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_structure_workflow(structure: str, *, view: str = \"isometric\", style: str = \"game building\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"structure\") -> dict"
|
||||
signature: "def comfyui_build_structure_workflow(structure: str, *, view: str = \"isometric\", style: str = \"game building\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"structure\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN edificio/estructura de escenario de juego 2D (casa, torre, castillo, tienda, posada, ruina, muralla, puente, templo, faro): UN building COMPLETO y centrado a perspectiva de juego (isometrica/lateral via view), fondo limpio uniforme recortable a alpha, estilo consistente para poblar mapas/escenarios. Diferenciado de comfyui_build_prop_object (edificacion grande completa vs objeto pequeno suelto). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo/iso opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_prop_object/isometric_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, structure, building, architecture, scenery, environment, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes las estructuras del set (ej. 'game building', 'low poly stylized building', 'pixel art building', 'fantasy RPG building', 'cartoon village building'). Pasa el MISMO view + style + checkpoint + lora a todos los edificios del mapa para coherencia. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -110,8 +110,8 @@ cada una y monta los PNG con `comfyui_build_grid`.
|
||||
fija mejor el ángulo 2:1 que solo el prompt.
|
||||
- **Coherencia del set = mismos parámetros**: si cambias `view`/`style`/`checkpoint`/`lora`/
|
||||
`seed` entre edificios, el escenario deja de combinar. Fija esos y varía solo `structure`.
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
- Si el modelo mete varios edificios, personas o lo encoge a un objeto pequeño, el
|
||||
negativo por defecto ya empuja a "single building / no people / no small object";
|
||||
|
||||
@@ -108,7 +108,7 @@ def comfyui_build_structure_workflow(
|
||||
*,
|
||||
view: str = "isometric",
|
||||
style: str = "game building",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -138,8 +138,8 @@ def comfyui_build_structure_workflow(
|
||||
"fantasy RPG building", "cartoon village building"). Pasa el MISMO view +
|
||||
style + checkpoint + (lora) a todos los edificios del mapa para coherencia
|
||||
visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas
|
||||
VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto.
|
||||
keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_textured_3d_multiview_workflow(image_name: str, *, ckpt: str = \"hunyuan3d-dit-v2-mv.safetensors\", views: int = 6, octree: int = 384, max_faces: int = 50000, upscale_model: str = \"4x_foolhardy_Remacri.pth\") -> dict"
|
||||
signature: "def comfyui_build_textured_3d_multiview_workflow(image_name: str, *, ckpt: str = \"3D_hunyuan3d-dit-v2-mv.safetensors\", views: int = 6, octree: int = 384, max_faces: int = 50000, upscale_model: str = \"4x_foolhardy_Remacri.pth\") -> dict"
|
||||
description: "Construye el dict (API format) del pipeline imagen->malla 3D texturizada PBR multi-vista de ComfyUI via el wrapper Hunyuan3DWrapper (kijai). Cadena: LoadImage -> Hy3DModelLoader -> Hy3DGenerateMesh -> Hy3DVAEDecode(octree) -> Hy3DPostprocessMesh(max_faces) -> Hy3DMeshUVWrap -> Hy3DCameraConfig(4 o 6 vistas) + Hy3DRenderMultiView + Hy3DDelightImage -> Hy3DSampleMultiView -> [UpscaleModelLoader+ImageUpscaleWithModel(Remacri)+ImageResize+] -> Hy3DBakeFromMultiview -> Hy3DMeshVerticeInpaintTexture -> Hy3DApplyTexture -> Hy3DExportMesh(glb). Portado del report 0082 (cobertura de atlas 32.93% con 6 vistas + Remacri + octree 384). Pura, sin red ni I/O."
|
||||
tags: [comfyui, ml, img-to-3d, texture, multiview, hunyuan3d, workflow]
|
||||
uses_functions: []
|
||||
@@ -18,7 +18,7 @@ params:
|
||||
- name: image_name
|
||||
desc: "Nombre del archivo de imagen de referencia tal como lo ve el servidor ComfyUI en su carpeta input/ (subido con POST /upload/image)."
|
||||
- name: ckpt
|
||||
desc: "Checkpoint del modelo de forma Hunyuan3D para Hy3DModelLoader. Por defecto el variante multi-vista hunyuan3d-dit-v2-mv. keyword-only."
|
||||
desc: "Checkpoint del modelo de forma Hunyuan3D para Hy3DModelLoader. Por defecto el variante multi-vista 3D_hunyuan3d-dit-v2-mv. keyword-only."
|
||||
- name: views
|
||||
desc: "Numero de vistas de camara: 4 (front/left/back/right) o 6 (anade top/bottom, rellena concavidades). Otro valor lanza ValueError. keyword-only."
|
||||
- name: octree
|
||||
@@ -77,7 +77,7 @@ el UV. Para geometria sin textura usa `comfyui_build_image_to_3d_workflow`
|
||||
`4x_foolhardy_Remacri.pth` en `upscale_models/`. Si falta algo, ComfyUI rechaza
|
||||
el workflow con HTTP 400 (esta funcion es pura y no valida contra el servidor).
|
||||
- `ckpt` por defecto es el variante multi-vista (`-mv`). El report 0082 uso
|
||||
`hy3dgen/hunyuan3d-dit-v2-0-fp16.safetensors`; ajusta `ckpt` al nombre real que
|
||||
`hy3dgen/3D_hunyuan3d-dit-v2-0-fp16.safetensors`; ajusta `ckpt` al nombre real que
|
||||
el servidor enumere en Hy3DModelLoader.
|
||||
- `upscale_model=""` desactiva el upscale: el bake toma las vistas directas del
|
||||
Hy3DSampleMultiView. Pierde la mejora dominante de cobertura (el report midio
|
||||
|
||||
@@ -35,7 +35,7 @@ _CAMERA_PRESETS = {
|
||||
def comfyui_build_textured_3d_multiview_workflow(
|
||||
image_name: str,
|
||||
*,
|
||||
ckpt: str = "hunyuan3d-dit-v2-mv.safetensors",
|
||||
ckpt: str = "3D_hunyuan3d-dit-v2-mv.safetensors",
|
||||
views: int = 6,
|
||||
octree: int = 384,
|
||||
max_faces: int = 50000,
|
||||
@@ -47,7 +47,7 @@ def comfyui_build_textured_3d_multiview_workflow(
|
||||
image_name: nombre del archivo de imagen de referencia tal como lo ve el
|
||||
servidor ComfyUI en su carpeta input/ (subido con POST /upload/image).
|
||||
ckpt: checkpoint del modelo de forma Hunyuan3D para Hy3DModelLoader (por
|
||||
defecto el variante multi-vista hunyuan3d-dit-v2-mv). keyword-only.
|
||||
defecto el variante multi-vista 3D_hunyuan3d-dit-v2-mv). keyword-only.
|
||||
views: numero de vistas de camara: 4 (front/left/back/right) o 6 (anade
|
||||
top/bottom). Cualquier otro valor lanza ValueError. keyword-only.
|
||||
octree: octree_resolution del Hy3DVAEDecode (mas alto = malla mas fina,
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_title_lettering_workflow(text: str, *, letter_style: str = \"epic fantasy metallic\", checkpoint: str = \"juggernaut_xl_v11.safetensors\", width: int = 1024, height: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"title_lettering\") -> dict"
|
||||
signature: "def comfyui_build_title_lettering_workflow(text: str, *, letter_style: str = \"epic fantasy metallic\", checkpoint: str = \"IMG_juggernaut_xl_v11.safetensors\", width: int = 1024, height: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"title_lettering\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN texto/logo de titulo de juego 2D: el nombre del juego o una palabra renderizada con un TRATAMIENTO de lettering (metalico, fantasy tallado, neon, piedra, fuego, cristal, madera...), formato apaisado, fondo plano recortable a alpha, para usar como logo/titulo en menus, splash o cabecera. El valor del builder es el ESTILO del lettering; la difusion NO garantiza la ortografia exacta del texto (limitacion documentada). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_ui_hud/splash_art_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)."
|
||||
tags: [comfyui, ml, gamedev-2d, title, logo, lettering, typography, text, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: letter_style
|
||||
desc: "Tratamiento visual del lettering, el VALOR real del builder (ej. 'epic fantasy metallic', 'fire engraved', 'neon sci-fi glow', 'carved stone', 'cracked ice crystal', 'wooden carved', 'golden royal'). Pasa el MISMO letter_style + checkpoint + lora a varios titulos/subtitulos para coherencia de marca. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL, mejor render de texto y detalle) por defecto; en 8GB lowvram con apaisado grande puede ser pesado: usa 'dreamshaper_8.safetensors' (SD1.5) y/o baja la resolucion. keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL, mejor render de texto y detalle) por defecto; en 8GB lowvram con apaisado grande puede ser pesado: usa 'IMG_dreamshaper_8.safetensors' (SD1.5) y/o baja la resolucion. keyword-only."
|
||||
- name: width
|
||||
desc: "Ancho del lienzo en px. Logo de titulo -> apaisado (width > height). 1024 por defecto. keyword-only."
|
||||
- name: height
|
||||
@@ -65,7 +65,7 @@ from ml.comfyui_build_title_lettering_workflow import comfyui_build_title_letter
|
||||
wf = comfyui_build_title_lettering_workflow(
|
||||
"DRAGON",
|
||||
letter_style="fire engraved",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
transparent=True,
|
||||
seed=42,
|
||||
)
|
||||
@@ -124,8 +124,8 @@ Eligela frente a sus hermanos por el ROL del asset:
|
||||
- **Coherencia de marca = mismos parametros**: si cambias `letter_style`/`checkpoint`/
|
||||
`lora`/`seed` entre el titulo y los subtitulos, dejan de combinar. Fija esos y varia
|
||||
solo `text`.
|
||||
- **SDXL pide mas VRAM**: con `checkpoint="juggernaut_xl_v11.safetensors"` (default) y
|
||||
apaisado grande en 8GB lowvram puede ir justo; si hay OOM baja a `dreamshaper_8`
|
||||
- **SDXL pide mas VRAM**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"` (default) y
|
||||
apaisado grande en 8GB lowvram puede ir justo; si hay OOM baja a `IMG_dreamshaper_8`
|
||||
(SD1.5) y/o reduce `width`/`height`.
|
||||
- `transparent=False` deja el lettering opaco sobre fondo plano: util si prefieres
|
||||
recortar fuera del workflow o el motor compone sobre un slot solido.
|
||||
|
||||
@@ -113,7 +113,7 @@ def comfyui_build_title_lettering_workflow(
|
||||
text: str,
|
||||
*,
|
||||
letter_style: str = "epic fantasy metallic",
|
||||
checkpoint: str = "juggernaut_xl_v11.safetensors",
|
||||
checkpoint: str = "IMG_juggernaut_xl_v11.safetensors",
|
||||
width: int = 1024,
|
||||
height: int = 512,
|
||||
transparent: bool = True,
|
||||
@@ -141,10 +141,10 @@ def comfyui_build_title_lettering_workflow(
|
||||
"carved stone", "cracked ice crystal", "wooden carved", "golden royal").
|
||||
Pasa el MISMO letter_style + checkpoint + (lora) a varios titulos/subtitulos
|
||||
para coherencia de marca. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL,
|
||||
checkpoint: checkpoint del servidor. 'IMG_juggernaut_xl_v11.safetensors' (SDXL,
|
||||
mejor render de texto y detalle, recomendado para lettering) por defecto;
|
||||
en 8GB lowvram con apaisado grande puede ser pesado: si la GPU se queda
|
||||
corta usa 'dreamshaper_8.safetensors' (SD1.5) y/o baja la resolucion.
|
||||
corta usa 'IMG_dreamshaper_8.safetensors' (SD1.5) y/o baja la resolucion.
|
||||
keyword-only.
|
||||
width: ancho del lienzo en px. Logo de titulo -> apaisado (width > height).
|
||||
1024 por defecto. keyword-only.
|
||||
@@ -232,7 +232,7 @@ if __name__ == "__main__":
|
||||
wf = comfyui_build_title_lettering_workflow(
|
||||
"DRAGON",
|
||||
letter_style="fire engraved",
|
||||
checkpoint="dreamshaper_8.safetensors",
|
||||
checkpoint="IMG_dreamshaper_8.safetensors",
|
||||
transparent=True,
|
||||
seed=42,
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_topdown_sprite_workflow(subject: str, *, direction: str = \"south\", style: str = \"top-down game sprite, RPG\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"topdown_sprite\") -> dict"
|
||||
signature: "def comfyui_build_topdown_sprite_workflow(subject: str, *, direction: str = \"south\", style: str = \"top-down game sprite, RPG\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"topdown_sprite\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN sprite en VISTA CENITAL (top-down) 2D: personaje/objeto visto desde arriba estilo RPG clasico/roguelike (Zelda, juegos cenitales), centrado, fondo limpio uniforme recortable a alpha, listo para un mapa de tiles top-down. Opcion `direction` (south/north/east/west) para el sprite de movimiento: las 4 vistas = misma subject/style/seed variando solo direction. DISTINTO de comfyui_build_sprite_sheet_workflow (ese es vista LATERAL/frontal de plataformas) — el negativo por defecto rechaza side/front/isometric/perspective para forzar la vista cenital. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_enemy_creature/prop_object/item_icon_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, topdown, top-down, overhead, sprite, rpg, roguelike, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los sprites del set (ej. 'top-down game sprite, RPG', 'pixel art top-down', 'Zelda-like overhead sprite', 'roguelike tile character'). Pasa el MISMO style + checkpoint + lora a todos los sprites para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -112,8 +112,8 @@ desde lo alto.
|
||||
entre direcciones, las 4 vistas dejan de combinar. Fija esos y varia solo `direction`.
|
||||
- **`direction` se inserta como "{direction} facing"**: `direction="east"` ->
|
||||
"east facing" en el prompt. Deja `direction=""`/None para un sprite sin direccion fija.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
- `transparent=False` deja el sprite opaco sobre fondo plano: util si prefieres recortar
|
||||
fuera del workflow o el motor compone sobre un fondo solido.
|
||||
|
||||
@@ -110,7 +110,7 @@ def comfyui_build_topdown_sprite_workflow(
|
||||
*,
|
||||
direction: str = "south",
|
||||
style: str = "top-down game sprite, RPG",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -141,8 +141,8 @@ def comfyui_build_topdown_sprite_workflow(
|
||||
overhead sprite", "roguelike tile character"). Pasa el MISMO style +
|
||||
checkpoint + (lora) a todos los sprites para coherencia visual.
|
||||
keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_trap_hazard_workflow(hazard: str, *, view: str = \"side\", style: str = \"game hazard trap\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"trap_hazard\") -> dict"
|
||||
signature: "def comfyui_build_trap_hazard_workflow(hazard: str, *, view: str = \"side\", style: str = \"game hazard trap\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"trap_hazard\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UNA trampa/peligro de escenario de juego 2D (pinchos del suelo, sierra giratoria, foso de lava, placa de presion, columna de llamas, trampa de flechas, charco acido, descarga electrica, prensa, estaca cayendo): UN objeto de peligro JUGABLE aislado y centrado a perspectiva de juego (lateral/cenital via view), fondo limpio uniforme recortable a alpha, estilo consistente para poblar niveles. Diferenciado de comfyui_build_prop_object (peligro jugable con hitbox de daño vs objeto inerte de decoracion) y de comfyui_build_enemy_creature (trampa vs enemigo vivo). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_prop_object/structure/foliage_set_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, trap, hazard, danger, scenery, environment, level, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los peligros del set (ej. 'game hazard trap', 'pixel art hazard', 'low poly stylized trap', 'cartoon danger', 'dark fantasy trap'). Pasa el MISMO view + style + checkpoint + lora a todas las trampas del nivel para coherencia. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -117,8 +117,8 @@ atlas/contact-sheet de los peligros, genera cada uno y monta los PNG con
|
||||
vistas frontales. Mantén el mismo `view` que el resto de assets del nivel.
|
||||
- **Coherencia del set = mismos parámetros**: si cambias `view`/`style`/`checkpoint`/`lora`/
|
||||
`seed` entre trampas, el nivel deja de combinar. Fija esos y varía solo `hazard`.
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
- **SDXL pide más VRAM y resolución**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram). Si
|
||||
hay OOM, baja `size` o usa SD1.5.
|
||||
- Si el modelo mete un personaje, varios objetos o una escena completa, el negativo por
|
||||
defecto ya empuja a "single hazard object / no people / no creature"; refuerza `style`
|
||||
|
||||
@@ -110,7 +110,7 @@ def comfyui_build_trap_hazard_workflow(
|
||||
*,
|
||||
view: str = "side",
|
||||
style: str = "game hazard trap",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -139,8 +139,8 @@ def comfyui_build_trap_hazard_workflow(
|
||||
"game hazard trap", "pixel art hazard", "low poly stylized trap", "cartoon
|
||||
danger", "dark fantasy trap"). Pasa el MISMO view + style + checkpoint +
|
||||
(lora) a todas las trampas del nivel para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado
|
||||
en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas
|
||||
VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto.
|
||||
keyword-only.
|
||||
|
||||
@@ -16,7 +16,7 @@ error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: ckpt_name
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'v1-5-pruned-emaonly-fp16.safetensors'). Debe estar en la lista que devuelve comfyui_object_info para CheckpointLoaderSimple."
|
||||
desc: "Nombre del checkpoint tal como lo ve el servidor ComfyUI (ej. 'IMG_v1-5-pruned-emaonly-fp16.safetensors'). Debe estar en la lista que devuelve comfyui_object_info para CheckpointLoaderSimple."
|
||||
- name: positive
|
||||
desc: "Prompt positivo: lo que se quiere ver en la imagen."
|
||||
- name: negative
|
||||
@@ -52,7 +52,7 @@ sys.path.insert(0, os.path.join(os.environ["HOME"], "fn_registry", "python", "fu
|
||||
from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="v1-5-pruned-emaonly-fp16.safetensors",
|
||||
ckpt_name="IMG_v1-5-pruned-emaonly-fp16.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
steps=20,
|
||||
|
||||
@@ -30,7 +30,7 @@ def comfyui_build_txt2img_workflow(
|
||||
|
||||
Args:
|
||||
ckpt_name: nombre del checkpoint tal como lo ve el servidor ComfyUI
|
||||
(ej. "v1-5-pruned-emaonly-fp16.safetensors"). Debe estar entre los
|
||||
(ej. "IMG_v1-5-pruned-emaonly-fp16.safetensors"). Debe estar entre los
|
||||
que devuelve comfyui_object_info en CheckpointLoaderSimple.
|
||||
positive: prompt positivo (lo que se quiere ver en la imagen).
|
||||
negative: prompt negativo (lo que se quiere evitar). Por defecto "".
|
||||
@@ -94,7 +94,7 @@ if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
wf = comfyui_build_txt2img_workflow(
|
||||
ckpt_name="v1-5-pruned-emaonly-fp16.safetensors",
|
||||
ckpt_name="IMG_v1-5-pruned-emaonly-fp16.safetensors",
|
||||
positive="a red apple on a wooden table, sharp focus",
|
||||
negative="blurry, low quality",
|
||||
steps=20,
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_ui_hud_workflow(element: str, *, ui_style: str = \"fantasy game UI\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"ui_hud\") -> dict"
|
||||
signature: "def comfyui_build_ui_hud_workflow(element: str, *, ui_style: str = \"fantasy game UI\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"ui_hud\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN elemento de interfaz de juego (UI/HUD) 2D: botones, marcos/paneles, barras de vida/mana/XP, iconos de UI, cursores, vinhetas de menu. Pieza unica centrada, fondo limpio uniforme, estilo consistente entre elementos del set, recortable a alpha. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_item_icon/pixelart/sprite_sheet_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, ui, hud, button, frame, bar, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -20,7 +20,7 @@ params:
|
||||
- name: ui_style
|
||||
desc: "Descriptor de estilo de la interfaz que mantiene consistentes las piezas de un set (ej. 'fantasy game UI', 'sci-fi HUD, neon glow', 'pixel art UI', 'minimal flat UI'). Pasa el MISMO ui_style + checkpoint + lora a todos los elementos del HUD para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -97,8 +97,8 @@ genera cada elemento y monta los PNG con `comfyui_build_grid`.
|
||||
a "no text / no label" para que la silueta quede limpia; el numero de la barra o el
|
||||
texto del boton se renderizan en el juego sobre la pieza. Si quieres texto horneado,
|
||||
pasa un `negative` propio sin "text, label".
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- Si el modelo mete personajes o escena, el negativo por defecto ya empuja a "single
|
||||
element / plain background / no character"; refuerza `ui_style` con "isolated UI
|
||||
element" si insiste.
|
||||
|
||||
@@ -95,7 +95,7 @@ def comfyui_build_ui_hud_workflow(
|
||||
element: str,
|
||||
*,
|
||||
ui_style: str = "fantasy game UI",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -119,8 +119,8 @@ def comfyui_build_ui_hud_workflow(
|
||||
piezas de un set (ej. "fantasy game UI", "sci-fi HUD, neon glow",
|
||||
"pixel art UI", "minimal flat UI"). Pasa el MISMO ui_style + checkpoint +
|
||||
(lora) a todos los elementos del HUD para coherencia visual. keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_vehicle_mount_workflow(vehicle: str, *, view: str = \"side\", style: str = \"game vehicle\", checkpoint: str = \"dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"vehicle_mount\") -> dict"
|
||||
signature: "def comfyui_build_vehicle_mount_workflow(vehicle: str, *, view: str = \"side\", style: str = \"game vehicle\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", size: int = 512, transparent: bool = True, seed: int = 0, lora: str | None = None, lora_strength: float = 1.0, rembg_model: str = \"u2net\", negative: str | None = None, steps: int = 28, cfg: float = 7.0, sampler_name: str = \"dpmpp_2m\", scheduler: str = \"karras\", filename_prefix: str = \"vehicle_mount\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow de UN vehiculo o montura de juego 2D (caballo, dragon-montura, nave espacial, coche, barco, carro, grifo, mecha): el vehiculo COMPLETO en vista lateral o isometrica, centrado, fondo limpio uniforme recortable a alpha, SIN jinete/conductor, para que el motor coloque encima al personaje que lo usa/conduce. Diferenciado de enemy_creature (sujeto a combatir) y prop_object (atrezzo inanimado): aqui el objeto se USA/MONTA, se genera vacio y a escala de vehiculo. Compone comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional) + Image Rembg (fondo transparente si transparent). Hermano de comfyui_build_enemy_creature/prop_object_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, vehicle, mount, transport, rembg, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -22,7 +22,7 @@ params:
|
||||
- name: style
|
||||
desc: "Descriptor de estilo que mantiene consistentes los vehiculos del set (ej. 'game vehicle', 'stylized fantasy mount', 'sci-fi spaceship art', 'cartoon racing car', 'pixel art vehicle'). Pasa el MISMO style + checkpoint + lora + view a todos los vehiculos para coherencia visual. keyword-only."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
desc: "Checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5, holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors' para SDXL (mas VRAM, subir size). keyword-only."
|
||||
- name: size
|
||||
desc: "Lado del cuadrado en px (width = height = size). 512 SD1.5 por defecto. keyword-only."
|
||||
- name: transparent
|
||||
@@ -114,8 +114,8 @@ cada vehiculo y monta los PNG con `comfyui_build_grid`.
|
||||
- **Coherencia del set = mismos parametros**: si cambias `view`/`style`/`checkpoint`/
|
||||
`lora`/`seed` entre vehiculos, el parque movil deja de combinar. Fija esos y varia solo
|
||||
`vehicle`.
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
- **SDXL pide mas VRAM y resolucion**: con `checkpoint="IMG_juggernaut_xl_v11.safetensors"`
|
||||
sube `size` a 768/1024; con IMG_dreamshaper_8 (SD1.5) deja 512 (holgado en 8GB lowvram).
|
||||
Si hay OOM, baja `size` o usa SD1.5.
|
||||
- `transparent=False` deja el vehiculo opaco sobre fondo plano: util si prefieres
|
||||
recortar fuera del workflow o el motor compone sobre un fondo solido.
|
||||
|
||||
@@ -110,7 +110,7 @@ def comfyui_build_vehicle_mount_workflow(
|
||||
*,
|
||||
view: str = "side",
|
||||
style: str = "game vehicle",
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
size: int = 512,
|
||||
transparent: bool = True,
|
||||
seed: int = 0,
|
||||
@@ -141,8 +141,8 @@ def comfyui_build_vehicle_mount_workflow(
|
||||
"cartoon racing car", "pixel art vehicle"). Pasa el MISMO style +
|
||||
checkpoint + (lora) + view a todos los vehiculos para coherencia visual.
|
||||
keyword-only.
|
||||
checkpoint: checkpoint del servidor. 'dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'juggernaut_xl_v11.safetensors'
|
||||
checkpoint: checkpoint del servidor. 'IMG_dreamshaper_8.safetensors' (SD1.5,
|
||||
holgado en 8GB lowvram) por defecto; 'IMG_juggernaut_xl_v11.safetensors'
|
||||
para SDXL (mas VRAM, subir size a 768/1024). keyword-only.
|
||||
size: lado del cuadrado en px (width = height = size). 512 SD1.5 por
|
||||
defecto. keyword-only.
|
||||
|
||||
@@ -5,7 +5,7 @@ lang: py
|
||||
domain: ml
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def comfyui_build_vfx_spritesheet_workflow(prompt: str, *, checkpoint: str = \"dreamshaper_8.safetensors\", motion_model: str = \"mm_sd_v15_v2.ckpt\", beta_schedule: str = \"sqrt_linear (AnimateDiff)\", lora: str | None = None, lora_strength: float = 1.1, negative: str = \"low quality, watermark, text, background detail\", width: int = 512, height: int = 512, num_frames: int = 16, context_length: int = 16, context_stride: int = 1, context_overlap: int = 4, closed_loop: bool = True, steps: int = 20, cfg: float = 7.5, sampler_name: str = \"euler\", scheduler: str = \"normal\", seed: int = 0, filename_prefix: str = \"vfx_loop\") -> dict"
|
||||
signature: "def comfyui_build_vfx_spritesheet_workflow(prompt: str, *, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", motion_model: str = \"mm_sd_v15_v2.ckpt\", beta_schedule: str = \"sqrt_linear (AnimateDiff)\", lora: str | None = None, lora_strength: float = 1.1, negative: str = \"low quality, watermark, text, background detail\", width: int = 512, height: int = 512, num_frames: int = 16, context_length: int = 16, context_stride: int = 1, context_overlap: int = 4, closed_loop: bool = True, steps: int = 20, cfg: float = 7.5, sampler_name: str = \"euler\", scheduler: str = \"normal\", seed: int = 0, filename_prefix: str = \"vfx_loop\") -> dict"
|
||||
description: "Construye el dict (API format) del workflow ComfyUI AnimateDiff loop para generar N frames de un efecto VFX 2D (humo/fuego/magia/portal) en bucle seamless sobre fondo NEGRO. Inserta ADE_LoopedUniformContextOptions + ADE_AnimateDiffLoaderGen1 (motion mm_sd_v15_v2.ckpt) sobre un txt2img base y pone batch_size = num_frames. Los frames son insumo de comfyui_matting_luma_to_alpha + montaje del spritesheet (pipeline, no este builder). Compone comfyui_build_txt2img_workflow (+ comfyui_inject_lora). Pura. class_types verificados contra /object_info."
|
||||
tags: [comfyui, ml, gamedev-2d, gamedev-vfx, animatediff, vfx, spritesheet, workflow]
|
||||
uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_inject_lora_py_ml]
|
||||
@@ -18,7 +18,7 @@ params:
|
||||
- name: prompt
|
||||
desc: "Prompt del efecto. Deberia incluir 'on pure black background' (insumo de luma-as-alpha). No puede estar vacio."
|
||||
- name: checkpoint
|
||||
desc: "Checkpoint SD1.5 (AnimateDiff SD1.5 cabe en 8GB, SDXL-video no; default 'dreamshaper_8.safetensors'). keyword-only."
|
||||
desc: "Checkpoint SD1.5 (AnimateDiff SD1.5 cabe en 8GB, SDXL-video no; default 'IMG_dreamshaper_8.safetensors'). keyword-only."
|
||||
- name: motion_model
|
||||
desc: "Motion module en models/animatediff_models. Default 'mm_sd_v15_v2.ckpt'. Se asigna al input 'model_name' del loader (OJO: no 'motion_model'). keyword-only."
|
||||
- name: beta_schedule
|
||||
|
||||
@@ -41,7 +41,7 @@ def _is_link(v) -> bool:
|
||||
def comfyui_build_vfx_spritesheet_workflow(
|
||||
prompt: str,
|
||||
*,
|
||||
checkpoint: str = "dreamshaper_8.safetensors",
|
||||
checkpoint: str = "IMG_dreamshaper_8.safetensors",
|
||||
motion_model: str = "mm_sd_v15_v2.ckpt",
|
||||
beta_schedule: str = "sqrt_linear (AnimateDiff)",
|
||||
lora: str | None = None,
|
||||
@@ -66,7 +66,7 @@ def comfyui_build_vfx_spritesheet_workflow(
|
||||
Args:
|
||||
prompt: prompt del efecto. Deberia incluir "on pure black background"
|
||||
(insumo de luma-as-alpha). No puede estar vacio.
|
||||
checkpoint: checkpoint SD1.5 (default 'dreamshaper_8.safetensors'; AnimateDiff
|
||||
checkpoint: checkpoint SD1.5 (default 'IMG_dreamshaper_8.safetensors'; AnimateDiff
|
||||
SD1.5 cabe en 8GB, SDXL-video no). keyword-only.
|
||||
motion_model: motion module en models/animatediff_models
|
||||
(default 'mm_sd_v15_v2.ckpt'). Se asigna al input 'model_name' del loader.
|
||||
|
||||
@@ -73,8 +73,8 @@ si quieres el camino Wan2.1 1.3B (umt5 + vae aparte). Hermana de
|
||||
- Es API format (nodos numerados), NO el formato de la UI de ComfyUI. Es lo que
|
||||
acepta POST /prompt.
|
||||
- Los nombres de modelo estan fijados a los reales del equipo
|
||||
(`ltx-video-2b-v0.9.5.safetensors` + `t5xxl_fp8_e4m3fn_scaled.safetensors`;
|
||||
`wan2.1_t2v_1.3B_fp16.safetensors` + `umt5_xxl_fp8_e4m3fn_scaled.safetensors` +
|
||||
(`VIDEO_ltx-video-2b-v0.9.5.safetensors` + `t5xxl_fp8_e4m3fn_scaled.safetensors`;
|
||||
`VIDEO_wan2.1_t2v_1.3B_fp16.safetensors` + `umt5_xxl_fp8_e4m3fn_scaled.safetensors` +
|
||||
`wan_2.1_vae.safetensors`). Deben existir y ser visibles para el servidor o
|
||||
ComfyUI rechaza el workflow con HTTP 400 al enviarlo (esta funcion es pura y no
|
||||
valida contra el servidor).
|
||||
|
||||
@@ -18,9 +18,9 @@ Funcion pura: sin red, sin I/O. Determinista para los mismos argumentos.
|
||||
"""
|
||||
|
||||
# Nombres reales de los modelos tal como los ve el servidor ComfyUI.
|
||||
_LTX_CKPT = "ltx-video-2b-v0.9.5.safetensors"
|
||||
_LTX_CKPT = "VIDEO_ltx-video-2b-v0.9.5.safetensors"
|
||||
_LTX_CLIP = "t5xxl_fp8_e4m3fn_scaled.safetensors"
|
||||
_WAN_UNET = "wan2.1_t2v_1.3B_fp16.safetensors"
|
||||
_WAN_UNET = "VIDEO_wan2.1_t2v_1.3B_fp16.safetensors"
|
||||
_WAN_CLIP = "umt5_xxl_fp8_e4m3fn_scaled.safetensors"
|
||||
_WAN_VAE = "wan_2.1_vae.safetensors"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user