diff --git a/python/functions/browser/comfyui_load_workflow_ui.md b/python/functions/browser/comfyui_load_workflow_ui.md index 90431c8c..083d82fe 100644 --- a/python/functions/browser/comfyui_load_workflow_ui.md +++ b/python/functions/browser/comfyui_load_workflow_ui.md @@ -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. diff --git a/python/functions/browser/comfyui_load_workflow_ui.py b/python/functions/browser/comfyui_load_workflow_ui.py index 9e7a1531..e19b225a 100644 --- a/python/functions/browser/comfyui_load_workflow_ui.py +++ b/python/functions/browser/comfyui_load_workflow_ui.py @@ -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)) diff --git a/python/functions/ml/comfyui_apply_style_preset_test.py b/python/functions/ml/comfyui_apply_style_preset_test.py index add02d5a..e09b2a15 100644 --- a/python/functions/ml/comfyui_apply_style_preset_test.py +++ b/python/functions/ml/comfyui_apply_style_preset_test.py @@ -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. diff --git a/python/functions/ml/comfyui_batch_generate.md b/python/functions/ml/comfyui_batch_generate.md index 51d319ae..aae50b07 100644 --- a/python/functions/ml/comfyui_batch_generate.md +++ b/python/functions/ml/comfyui_batch_generate.md @@ -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", ) diff --git a/python/functions/ml/comfyui_batch_generate.py b/python/functions/ml/comfyui_batch_generate.py index fef7b8d4..6889a8f8 100644 --- a/python/functions/ml/comfyui_batch_generate.py +++ b/python/functions/ml/comfyui_batch_generate.py @@ -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", ) diff --git a/python/functions/ml/comfyui_build_achievement_badge_workflow.md b/python/functions/ml/comfyui_build_achievement_badge_workflow.md index 2df378fe..5992fda6 100644 --- a/python/functions/ml/comfyui_build_achievement_badge_workflow.md +++ b/python/functions/ml/comfyui_build_achievement_badge_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_achievement_badge_workflow.py b/python/functions/ml/comfyui_build_achievement_badge_workflow.py index 229351b0..5df63d99 100644 --- a/python/functions/ml/comfyui_build_achievement_badge_workflow.py +++ b/python/functions/ml/comfyui_build_achievement_badge_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_asset_variant_workflow.md b/python/functions/ml/comfyui_build_asset_variant_workflow.md index 0af48c76..8fd54d6f 100644 --- a/python/functions/ml/comfyui_build_asset_variant_workflow.md +++ b/python/functions/ml/comfyui_build_asset_variant_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_asset_variant_workflow.py b/python/functions/ml/comfyui_build_asset_variant_workflow.py index ecf90a53..0e31c17a 100644 --- a/python/functions/ml/comfyui_build_asset_variant_workflow.py +++ b/python/functions/ml/comfyui_build_asset_variant_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_card_art_workflow.md b/python/functions/ml/comfyui_build_card_art_workflow.md index e94ff3ec..490be119 100644 --- a/python/functions/ml/comfyui_build_card_art_workflow.md +++ b/python/functions/ml/comfyui_build_card_art_workflow.md @@ -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`. diff --git a/python/functions/ml/comfyui_build_card_art_workflow.py b/python/functions/ml/comfyui_build_card_art_workflow.py index d0e1a3c0..3676982a 100644 --- a/python/functions/ml/comfyui_build_card_art_workflow.py +++ b/python/functions/ml/comfyui_build_card_art_workflow.py @@ -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, ) diff --git a/python/functions/ml/comfyui_build_card_art_workflow_test.py b/python/functions/ml/comfyui_build_card_art_workflow_test.py index 4638a7bd..1452e7d8 100644 --- a/python/functions/ml/comfyui_build_card_art_workflow_test.py +++ b/python/functions/ml/comfyui_build_card_art_workflow_test.py @@ -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 diff --git a/python/functions/ml/comfyui_build_controlnet_workflow.md b/python/functions/ml/comfyui_build_controlnet_workflow.md index 951997eb..30bc76df 100644 --- a/python/functions/ml/comfyui_build_controlnet_workflow.md +++ b/python/functions/ml/comfyui_build_controlnet_workflow.md @@ -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", diff --git a/python/functions/ml/comfyui_build_controlnet_workflow.py b/python/functions/ml/comfyui_build_controlnet_workflow.py index 10ab7229..95dbd44d 100644 --- a/python/functions/ml/comfyui_build_controlnet_workflow.py +++ b/python/functions/ml/comfyui_build_controlnet_workflow.py @@ -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", diff --git a/python/functions/ml/comfyui_build_decal_overlay_workflow.md b/python/functions/ml/comfyui_build_decal_overlay_workflow.md index 20dc638f..09c769fd 100644 --- a/python/functions/ml/comfyui_build_decal_overlay_workflow.md +++ b/python/functions/ml/comfyui_build_decal_overlay_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_decal_overlay_workflow.py b/python/functions/ml/comfyui_build_decal_overlay_workflow.py index 0e005f7b..c3ca77fc 100644 --- a/python/functions/ml/comfyui_build_decal_overlay_workflow.py +++ b/python/functions/ml/comfyui_build_decal_overlay_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_dialogue_box_workflow.md b/python/functions/ml/comfyui_build_dialogue_box_workflow.md index 8974f163..e27fa56b 100644 --- a/python/functions/ml/comfyui_build_dialogue_box_workflow.md +++ b/python/functions/ml/comfyui_build_dialogue_box_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_dialogue_box_workflow.py b/python/functions/ml/comfyui_build_dialogue_box_workflow.py index 870d549a..e232f696 100644 --- a/python/functions/ml/comfyui_build_dialogue_box_workflow.py +++ b/python/functions/ml/comfyui_build_dialogue_box_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_directional_sprite_workflow.md b/python/functions/ml/comfyui_build_directional_sprite_workflow.md index b790424a..367d4052 100644 --- a/python/functions/ml/comfyui_build_directional_sprite_workflow.md +++ b/python/functions/ml/comfyui_build_directional_sprite_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_directional_sprite_workflow.py b/python/functions/ml/comfyui_build_directional_sprite_workflow.py index fd79265b..3a689833 100644 --- a/python/functions/ml/comfyui_build_directional_sprite_workflow.py +++ b/python/functions/ml/comfyui_build_directional_sprite_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_emote_workflow.md b/python/functions/ml/comfyui_build_emote_workflow.md index c25e5fc3..9f0ba1bf 100644 --- a/python/functions/ml/comfyui_build_emote_workflow.md +++ b/python/functions/ml/comfyui_build_emote_workflow.md @@ -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`. diff --git a/python/functions/ml/comfyui_build_emote_workflow.py b/python/functions/ml/comfyui_build_emote_workflow.py index 5526a3d3..575efb52 100644 --- a/python/functions/ml/comfyui_build_emote_workflow.py +++ b/python/functions/ml/comfyui_build_emote_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_enemy_creature_workflow.md b/python/functions/ml/comfyui_build_enemy_creature_workflow.md index dfe33b26..8c90c102 100644 --- a/python/functions/ml/comfyui_build_enemy_creature_workflow.md +++ b/python/functions/ml/comfyui_build_enemy_creature_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_enemy_creature_workflow.py b/python/functions/ml/comfyui_build_enemy_creature_workflow.py index 677a9198..9f440216 100644 --- a/python/functions/ml/comfyui_build_enemy_creature_workflow.py +++ b/python/functions/ml/comfyui_build_enemy_creature_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_facedetailer_workflow.md b/python/functions/ml/comfyui_build_facedetailer_workflow.md index b614dd47..21f73770 100644 --- a/python/functions/ml/comfyui_build_facedetailer_workflow.md +++ b/python/functions/ml/comfyui_build_facedetailer_workflow.md @@ -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, diff --git a/python/functions/ml/comfyui_build_facedetailer_workflow.py b/python/functions/ml/comfyui_build_facedetailer_workflow.py index dd757b28..12fe65c6 100644 --- a/python/functions/ml/comfyui_build_facedetailer_workflow.py +++ b/python/functions/ml/comfyui_build_facedetailer_workflow.py @@ -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, diff --git a/python/functions/ml/comfyui_build_flux_workflow.md b/python/functions/ml/comfyui_build_flux_workflow.md index cc61a5ff..c53c30fd 100644 --- a/python/functions/ml/comfyui_build_flux_workflow.md +++ b/python/functions/ml/comfyui_build_flux_workflow.md @@ -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: [] diff --git a/python/functions/ml/comfyui_build_flux_workflow.py b/python/functions/ml/comfyui_build_flux_workflow.py index 5824cdb7..0f694cc1 100644 --- a/python/functions/ml/comfyui_build_flux_workflow.py +++ b/python/functions/ml/comfyui_build_flux_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_foliage_set_workflow.md b/python/functions/ml/comfyui_build_foliage_set_workflow.md index 9eef02aa..015f0eba 100644 --- a/python/functions/ml/comfyui_build_foliage_set_workflow.md +++ b/python/functions/ml/comfyui_build_foliage_set_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_foliage_set_workflow.py b/python/functions/ml/comfyui_build_foliage_set_workflow.py index 009d1bf5..682d602a 100644 --- a/python/functions/ml/comfyui_build_foliage_set_workflow.py +++ b/python/functions/ml/comfyui_build_foliage_set_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_hires_fix_workflow.md b/python/functions/ml/comfyui_build_hires_fix_workflow.md index a4e1109f..578e7379 100644 --- a/python/functions/ml/comfyui_build_hires_fix_workflow.md +++ b/python/functions/ml/comfyui_build_hires_fix_workflow.md @@ -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), diff --git a/python/functions/ml/comfyui_build_hires_fix_workflow.py b/python/functions/ml/comfyui_build_hires_fix_workflow.py index 243b6da9..5f8c6f60 100644 --- a/python/functions/ml/comfyui_build_hires_fix_workflow.py +++ b/python/functions/ml/comfyui_build_hires_fix_workflow.py @@ -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), diff --git a/python/functions/ml/comfyui_build_image_to_3d_workflow.md b/python/functions/ml/comfyui_build_image_to_3d_workflow.md index 8026e42e..fca7dcd1 100644 --- a/python/functions/ml/comfyui_build_image_to_3d_workflow.md +++ b/python/functions/ml/comfyui_build_image_to_3d_workflow.md @@ -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" diff --git a/python/functions/ml/comfyui_build_image_to_3d_workflow.py b/python/functions/ml/comfyui_build_image_to_3d_workflow.py index a0964029..312cecd8 100644 --- a/python/functions/ml/comfyui_build_image_to_3d_workflow.py +++ b/python/functions/ml/comfyui_build_image_to_3d_workflow.py @@ -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)) diff --git a/python/functions/ml/comfyui_build_img2img_workflow.md b/python/functions/ml/comfyui_build_img2img_workflow.md index cb834e63..8403616c 100644 --- a/python/functions/ml/comfyui_build_img2img_workflow.md +++ b/python/functions/ml/comfyui_build_img2img_workflow.md @@ -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", diff --git a/python/functions/ml/comfyui_build_img2img_workflow.py b/python/functions/ml/comfyui_build_img2img_workflow.py index fe7c1efe..1f0ea95e 100644 --- a/python/functions/ml/comfyui_build_img2img_workflow.py +++ b/python/functions/ml/comfyui_build_img2img_workflow.py @@ -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", diff --git a/python/functions/ml/comfyui_build_img2vid_workflow.md b/python/functions/ml/comfyui_build_img2vid_workflow.md index c584ba53..5964f413 100644 --- a/python/functions/ml/comfyui_build_img2vid_workflow.md +++ b/python/functions/ml/comfyui_build_img2vid_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_img2vid_workflow.py b/python/functions/ml/comfyui_build_img2vid_workflow.py index 6286f4c3..500f95cf 100644 --- a/python/functions/ml/comfyui_build_img2vid_workflow.py +++ b/python/functions/ml/comfyui_build_img2vid_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_inpaint_asset_workflow.md b/python/functions/ml/comfyui_build_inpaint_asset_workflow.md index 69bbefed..8f717ae5 100644 --- a/python/functions/ml/comfyui_build_inpaint_asset_workflow.md +++ b/python/functions/ml/comfyui_build_inpaint_asset_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_inpaint_asset_workflow.py b/python/functions/ml/comfyui_build_inpaint_asset_workflow.py index 08bb34bc..70cf04f2 100644 --- a/python/functions/ml/comfyui_build_inpaint_asset_workflow.py +++ b/python/functions/ml/comfyui_build_inpaint_asset_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_inpaint_workflow.md b/python/functions/ml/comfyui_build_inpaint_workflow.md index b62c60bb..b55e8564 100644 --- a/python/functions/ml/comfyui_build_inpaint_workflow.md +++ b/python/functions/ml/comfyui_build_inpaint_workflow.md @@ -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", diff --git a/python/functions/ml/comfyui_build_inpaint_workflow.py b/python/functions/ml/comfyui_build_inpaint_workflow.py index b6213e8b..44afc3c1 100644 --- a/python/functions/ml/comfyui_build_inpaint_workflow.py +++ b/python/functions/ml/comfyui_build_inpaint_workflow.py @@ -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", diff --git a/python/functions/ml/comfyui_build_ipadapter_workflow.md b/python/functions/ml/comfyui_build_ipadapter_workflow.md index 7a51ba2c..397dfaa0 100644 --- a/python/functions/ml/comfyui_build_ipadapter_workflow.md +++ b/python/functions/ml/comfyui_build_ipadapter_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_ipadapter_workflow.py b/python/functions/ml/comfyui_build_ipadapter_workflow.py index 19d33bfa..13ac13e4 100644 --- a/python/functions/ml/comfyui_build_ipadapter_workflow.py +++ b/python/functions/ml/comfyui_build_ipadapter_workflow.py @@ -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, ) diff --git a/python/functions/ml/comfyui_build_isometric_workflow.md b/python/functions/ml/comfyui_build_isometric_workflow.md index e521d734..9a54430f 100644 --- a/python/functions/ml/comfyui_build_isometric_workflow.md +++ b/python/functions/ml/comfyui_build_isometric_workflow.md @@ -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). diff --git a/python/functions/ml/comfyui_build_isometric_workflow.py b/python/functions/ml/comfyui_build_isometric_workflow.py index 72c83f3e..1cf33039 100644 --- a/python/functions/ml/comfyui_build_isometric_workflow.py +++ b/python/functions/ml/comfyui_build_isometric_workflow.py @@ -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'). diff --git a/python/functions/ml/comfyui_build_item_icon_workflow.md b/python/functions/ml/comfyui_build_item_icon_workflow.md index fd852bb9..afd53595 100644 --- a/python/functions/ml/comfyui_build_item_icon_workflow.md +++ b/python/functions/ml/comfyui_build_item_icon_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_item_icon_workflow.py b/python/functions/ml/comfyui_build_item_icon_workflow.py index 5f5d428b..400bcefc 100644 --- a/python/functions/ml/comfyui_build_item_icon_workflow.py +++ b/python/functions/ml/comfyui_build_item_icon_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_outpaint_asset_workflow.md b/python/functions/ml/comfyui_build_outpaint_asset_workflow.md index 1cb7c3ff..df4a4a75 100644 --- a/python/functions/ml/comfyui_build_outpaint_asset_workflow.md +++ b/python/functions/ml/comfyui_build_outpaint_asset_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_outpaint_asset_workflow.py b/python/functions/ml/comfyui_build_outpaint_asset_workflow.py index 6db4a1ee..d81a48e9 100644 --- a/python/functions/ml/comfyui_build_outpaint_asset_workflow.py +++ b/python/functions/ml/comfyui_build_outpaint_asset_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_parallax_background_workflow.md b/python/functions/ml/comfyui_build_parallax_background_workflow.md index 81f9a089..c935c7af 100644 --- a/python/functions/ml/comfyui_build_parallax_background_workflow.md +++ b/python/functions/ml/comfyui_build_parallax_background_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_parallax_background_workflow.py b/python/functions/ml/comfyui_build_parallax_background_workflow.py index ac2d9cc2..56b13b3d 100644 --- a/python/functions/ml/comfyui_build_parallax_background_workflow.py +++ b/python/functions/ml/comfyui_build_parallax_background_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_particle_texture_workflow.md b/python/functions/ml/comfyui_build_particle_texture_workflow.md index 87c87858..cfb631c2 100644 --- a/python/functions/ml/comfyui_build_particle_texture_workflow.md +++ b/python/functions/ml/comfyui_build_particle_texture_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_particle_texture_workflow.py b/python/functions/ml/comfyui_build_particle_texture_workflow.py index bbcc86a6..cacc7421 100644 --- a/python/functions/ml/comfyui_build_particle_texture_workflow.py +++ b/python/functions/ml/comfyui_build_particle_texture_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_pixelart_workflow.md b/python/functions/ml/comfyui_build_pixelart_workflow.md index a9ab7b84..d7e16a7a 100644 --- a/python/functions/ml/comfyui_build_pixelart_workflow.md +++ b/python/functions/ml/comfyui_build_pixelart_workflow.md @@ -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`. diff --git a/python/functions/ml/comfyui_build_pixelart_workflow.py b/python/functions/ml/comfyui_build_pixelart_workflow.py index c43a9f82..e5ddd7fe 100644 --- a/python/functions/ml/comfyui_build_pixelart_workflow.py +++ b/python/functions/ml/comfyui_build_pixelart_workflow.py @@ -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). diff --git a/python/functions/ml/comfyui_build_portrait_avatar_workflow.md b/python/functions/ml/comfyui_build_portrait_avatar_workflow.md index 7f1ba83e..448eff03 100644 --- a/python/functions/ml/comfyui_build_portrait_avatar_workflow.md +++ b/python/functions/ml/comfyui_build_portrait_avatar_workflow.md @@ -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`. diff --git a/python/functions/ml/comfyui_build_portrait_avatar_workflow.py b/python/functions/ml/comfyui_build_portrait_avatar_workflow.py index 5f653579..ef2da31c 100644 --- a/python/functions/ml/comfyui_build_portrait_avatar_workflow.py +++ b/python/functions/ml/comfyui_build_portrait_avatar_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_projectile_workflow.md b/python/functions/ml/comfyui_build_projectile_workflow.md index 645c9436..772f772f 100644 --- a/python/functions/ml/comfyui_build_projectile_workflow.md +++ b/python/functions/ml/comfyui_build_projectile_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_projectile_workflow.py b/python/functions/ml/comfyui_build_projectile_workflow.py index b69b18d0..54c8928b 100644 --- a/python/functions/ml/comfyui_build_projectile_workflow.py +++ b/python/functions/ml/comfyui_build_projectile_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_prop_object_workflow.md b/python/functions/ml/comfyui_build_prop_object_workflow.md index 478da1b2..7568a40a 100644 --- a/python/functions/ml/comfyui_build_prop_object_workflow.md +++ b/python/functions/ml/comfyui_build_prop_object_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_prop_object_workflow.py b/python/functions/ml/comfyui_build_prop_object_workflow.py index f6889b7a..d0dd535f 100644 --- a/python/functions/ml/comfyui_build_prop_object_workflow.py +++ b/python/functions/ml/comfyui_build_prop_object_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_rune_glyph_workflow.md b/python/functions/ml/comfyui_build_rune_glyph_workflow.md index 53416e5b..41ac7c70 100644 --- a/python/functions/ml/comfyui_build_rune_glyph_workflow.md +++ b/python/functions/ml/comfyui_build_rune_glyph_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_rune_glyph_workflow.py b/python/functions/ml/comfyui_build_rune_glyph_workflow.py index c6758189..f2bf2e84 100644 --- a/python/functions/ml/comfyui_build_rune_glyph_workflow.py +++ b/python/functions/ml/comfyui_build_rune_glyph_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_seamless_tile_workflow.md b/python/functions/ml/comfyui_build_seamless_tile_workflow.md index 8d40a0d0..06227293 100644 --- a/python/functions/ml/comfyui_build_seamless_tile_workflow.md +++ b/python/functions/ml/comfyui_build_seamless_tile_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_seamless_tile_workflow.py b/python/functions/ml/comfyui_build_seamless_tile_workflow.py index 8054118e..73ab3b11 100644 --- a/python/functions/ml/comfyui_build_seamless_tile_workflow.py +++ b/python/functions/ml/comfyui_build_seamless_tile_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_seamless_tile_workflow_test.py b/python/functions/ml/comfyui_build_seamless_tile_workflow_test.py index ae3ad2ae..50eb0a7c 100644 --- a/python/functions/ml/comfyui_build_seamless_tile_workflow_test.py +++ b/python/functions/ml/comfyui_build_seamless_tile_workflow_test.py @@ -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. diff --git a/python/functions/ml/comfyui_build_skill_tree_node_workflow.md b/python/functions/ml/comfyui_build_skill_tree_node_workflow.md index 8e7bd5f9..430dc60b 100644 --- a/python/functions/ml/comfyui_build_skill_tree_node_workflow.md +++ b/python/functions/ml/comfyui_build_skill_tree_node_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_skill_tree_node_workflow.py b/python/functions/ml/comfyui_build_skill_tree_node_workflow.py index 7ffbe4df..8de91b0c 100644 --- a/python/functions/ml/comfyui_build_skill_tree_node_workflow.py +++ b/python/functions/ml/comfyui_build_skill_tree_node_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_skill_workflow.md b/python/functions/ml/comfyui_build_skill_workflow.md index 26dc4c95..35016007 100644 --- a/python/functions/ml/comfyui_build_skill_workflow.md +++ b/python/functions/ml/comfyui_build_skill_workflow.md @@ -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}, diff --git a/python/functions/ml/comfyui_build_skill_workflow.py b/python/functions/ml/comfyui_build_skill_workflow.py index 485e1f20..d0435f6f 100644 --- a/python/functions/ml/comfyui_build_skill_workflow.py +++ b/python/functions/ml/comfyui_build_skill_workflow.py @@ -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}, diff --git a/python/functions/ml/comfyui_build_splash_art_workflow.md b/python/functions/ml/comfyui_build_splash_art_workflow.md index 433f442c..79f223b5 100644 --- a/python/functions/ml/comfyui_build_splash_art_workflow.md +++ b/python/functions/ml/comfyui_build_splash_art_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_splash_art_workflow.py b/python/functions/ml/comfyui_build_splash_art_workflow.py index 3e8f47d2..592470bc 100644 --- a/python/functions/ml/comfyui_build_splash_art_workflow.py +++ b/python/functions/ml/comfyui_build_splash_art_workflow.py @@ -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, ) diff --git a/python/functions/ml/comfyui_build_splash_art_workflow_test.py b/python/functions/ml/comfyui_build_splash_art_workflow_test.py index d8fe243b..53c53f95 100644 --- a/python/functions/ml/comfyui_build_splash_art_workflow_test.py +++ b/python/functions/ml/comfyui_build_splash_art_workflow_test.py @@ -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) diff --git a/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.md b/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.md index 1a4c6abc..0bddde13 100644 --- a/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.md +++ b/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.py b/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.py index 522862ca..2510e089 100644 --- a/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.py +++ b/python/functions/ml/comfyui_build_sprite_from_sketch_workflow.py @@ -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 diff --git a/python/functions/ml/comfyui_build_sprite_sheet_workflow.md b/python/functions/ml/comfyui_build_sprite_sheet_workflow.md index ffd1da82..0efdd792 100644 --- a/python/functions/ml/comfyui_build_sprite_sheet_workflow.md +++ b/python/functions/ml/comfyui_build_sprite_sheet_workflow.md @@ -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` diff --git a/python/functions/ml/comfyui_build_sprite_sheet_workflow.py b/python/functions/ml/comfyui_build_sprite_sheet_workflow.py index 3db9dd67..05b6799b 100644 --- a/python/functions/ml/comfyui_build_sprite_sheet_workflow.py +++ b/python/functions/ml/comfyui_build_sprite_sheet_workflow.py @@ -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). diff --git a/python/functions/ml/comfyui_build_status_effect_icon_workflow.md b/python/functions/ml/comfyui_build_status_effect_icon_workflow.md index d57dfb1e..bf0eb31b 100644 --- a/python/functions/ml/comfyui_build_status_effect_icon_workflow.md +++ b/python/functions/ml/comfyui_build_status_effect_icon_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_status_effect_icon_workflow.py b/python/functions/ml/comfyui_build_status_effect_icon_workflow.py index 5fbe46ea..d7d8fef2 100644 --- a/python/functions/ml/comfyui_build_status_effect_icon_workflow.py +++ b/python/functions/ml/comfyui_build_status_effect_icon_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_structure_workflow.md b/python/functions/ml/comfyui_build_structure_workflow.md index ef5091af..f58e90a2 100644 --- a/python/functions/ml/comfyui_build_structure_workflow.md +++ b/python/functions/ml/comfyui_build_structure_workflow.md @@ -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"; diff --git a/python/functions/ml/comfyui_build_structure_workflow.py b/python/functions/ml/comfyui_build_structure_workflow.py index 0bb785d0..2dc64f90 100644 --- a/python/functions/ml/comfyui_build_structure_workflow.py +++ b/python/functions/ml/comfyui_build_structure_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.md b/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.md index feaeb29d..117bd6fe 100644 --- a/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.md +++ b/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.py b/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.py index a1d3ddf3..2ccc94de 100644 --- a/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.py +++ b/python/functions/ml/comfyui_build_textured_3d_multiview_workflow.py @@ -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, diff --git a/python/functions/ml/comfyui_build_title_lettering_workflow.md b/python/functions/ml/comfyui_build_title_lettering_workflow.md index 3e8c7c70..4b2dfc8c 100644 --- a/python/functions/ml/comfyui_build_title_lettering_workflow.md +++ b/python/functions/ml/comfyui_build_title_lettering_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_title_lettering_workflow.py b/python/functions/ml/comfyui_build_title_lettering_workflow.py index 37b69a51..031127fd 100644 --- a/python/functions/ml/comfyui_build_title_lettering_workflow.py +++ b/python/functions/ml/comfyui_build_title_lettering_workflow.py @@ -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, ) diff --git a/python/functions/ml/comfyui_build_topdown_sprite_workflow.md b/python/functions/ml/comfyui_build_topdown_sprite_workflow.md index 1802c3d1..aee18fee 100644 --- a/python/functions/ml/comfyui_build_topdown_sprite_workflow.md +++ b/python/functions/ml/comfyui_build_topdown_sprite_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_topdown_sprite_workflow.py b/python/functions/ml/comfyui_build_topdown_sprite_workflow.py index f9f8288e..a4aa2919 100644 --- a/python/functions/ml/comfyui_build_topdown_sprite_workflow.py +++ b/python/functions/ml/comfyui_build_topdown_sprite_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_trap_hazard_workflow.md b/python/functions/ml/comfyui_build_trap_hazard_workflow.md index 9ca95e08..f26019f2 100644 --- a/python/functions/ml/comfyui_build_trap_hazard_workflow.md +++ b/python/functions/ml/comfyui_build_trap_hazard_workflow.md @@ -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` diff --git a/python/functions/ml/comfyui_build_trap_hazard_workflow.py b/python/functions/ml/comfyui_build_trap_hazard_workflow.py index 337d6834..e3b8bb17 100644 --- a/python/functions/ml/comfyui_build_trap_hazard_workflow.py +++ b/python/functions/ml/comfyui_build_trap_hazard_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_txt2img_workflow.md b/python/functions/ml/comfyui_build_txt2img_workflow.md index 44cb0cc3..11f0367f 100644 --- a/python/functions/ml/comfyui_build_txt2img_workflow.md +++ b/python/functions/ml/comfyui_build_txt2img_workflow.md @@ -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, diff --git a/python/functions/ml/comfyui_build_txt2img_workflow.py b/python/functions/ml/comfyui_build_txt2img_workflow.py index 774188d7..4990bb9b 100644 --- a/python/functions/ml/comfyui_build_txt2img_workflow.py +++ b/python/functions/ml/comfyui_build_txt2img_workflow.py @@ -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, diff --git a/python/functions/ml/comfyui_build_ui_hud_workflow.md b/python/functions/ml/comfyui_build_ui_hud_workflow.md index 405ecde1..45690a4a 100644 --- a/python/functions/ml/comfyui_build_ui_hud_workflow.md +++ b/python/functions/ml/comfyui_build_ui_hud_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_ui_hud_workflow.py b/python/functions/ml/comfyui_build_ui_hud_workflow.py index a86b6564..95837c91 100644 --- a/python/functions/ml/comfyui_build_ui_hud_workflow.py +++ b/python/functions/ml/comfyui_build_ui_hud_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_vehicle_mount_workflow.md b/python/functions/ml/comfyui_build_vehicle_mount_workflow.md index 041117f6..9efbbc67 100644 --- a/python/functions/ml/comfyui_build_vehicle_mount_workflow.md +++ b/python/functions/ml/comfyui_build_vehicle_mount_workflow.md @@ -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. diff --git a/python/functions/ml/comfyui_build_vehicle_mount_workflow.py b/python/functions/ml/comfyui_build_vehicle_mount_workflow.py index 50af3e03..fc16d3ef 100644 --- a/python/functions/ml/comfyui_build_vehicle_mount_workflow.py +++ b/python/functions/ml/comfyui_build_vehicle_mount_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.md b/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.md index abb17e89..10cc9f63 100644 --- a/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.md +++ b/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.md @@ -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 diff --git a/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.py b/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.py index dbf5c6d5..2505a8fc 100644 --- a/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.py +++ b/python/functions/ml/comfyui_build_vfx_spritesheet_workflow.py @@ -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. diff --git a/python/functions/ml/comfyui_build_video_workflow.md b/python/functions/ml/comfyui_build_video_workflow.md index 37fd3089..476ec06e 100644 --- a/python/functions/ml/comfyui_build_video_workflow.md +++ b/python/functions/ml/comfyui_build_video_workflow.md @@ -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). diff --git a/python/functions/ml/comfyui_build_video_workflow.py b/python/functions/ml/comfyui_build_video_workflow.py index 3fbc533c..1dd12248 100644 --- a/python/functions/ml/comfyui_build_video_workflow.py +++ b/python/functions/ml/comfyui_build_video_workflow.py @@ -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" diff --git a/python/functions/ml/comfyui_build_weather_overlay_workflow.md b/python/functions/ml/comfyui_build_weather_overlay_workflow.md index a527a75e..bdd649fd 100644 --- a/python/functions/ml/comfyui_build_weather_overlay_workflow.md +++ b/python/functions/ml/comfyui_build_weather_overlay_workflow.md @@ -5,7 +5,7 @@ lang: py domain: ml purity: pure version: 1.0.0 -signature: 'def comfyui_build_weather_overlay_workflow(weather: str, *, on_black: bool = True, style: str = "weather overlay, atmospheric", checkpoint: str = "dreamshaper_8.safetensors", width: int = 1024, height: int = 576, 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 = "weather_overlay") -> dict' +signature: 'def comfyui_build_weather_overlay_workflow(weather: str, *, on_black: bool = True, style: str = "weather overlay, atmospheric", checkpoint: str = "IMG_dreamshaper_8.safetensors", width: int = 1024, height: int = 576, 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 = "weather_overlay") -> dict' description: "Construye el dict (API format) del workflow de UN overlay de clima/atmosfera a PANTALLA COMPLETA: una capa que cubre toda la vista y se superpone sobre la escena con un blend mode del motor — lluvia, niebla, nieve, rayos de sol (god rays), polvo, viñeta de tormenta. Cobertura uniforme de borde a borde, generada APAISADA a resolucion de pantalla (16:9, 1024x576 por defecto). on_black=True (defecto) la pone sobre NEGRO puro con el clima brillante encima, para extraer alpha por luminancia con comfyui_matting_luma_to_alpha y blend additive/screen; on_black=False = pelicula translucida semi-transparente (niebla, tinte) para multiply/overlay o alpha global. NO inyecta Rembg (el matting de una capa es luma-to-alpha o alpha global, no un nodo). Compone comfyui_build_txt2img_workflow + comfyui_inject_lora. Hermano de comfyui_build_decal_overlay/particle_texture/vfx_spritesheet_workflow; distinto: capa de cobertura TOTAL, no mancha localizada ni secuencia animada. Pura, sin red ni I/O. class_types verificados contra /object_info." uses_functions: - comfyui_build_txt2img_workflow_py_ml @@ -38,7 +38,7 @@ params: - name: style desc: "Descriptor de estilo de la capa (ej. 'weather overlay, atmospheric', 'stylized rain, painterly', 'photoreal fog', 'anime sun rays'). Pasa el MISMO style + checkpoint + lora a todas las capas 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 width/height a 1344x768). 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 a 1344x768). keyword-only." - name: width desc: "Ancho de la capa en px (multiplo de 8). 1024 por defecto (16:9 con height 576: resolucion de pantalla apaisada). keyword-only." - name: height diff --git a/python/functions/ml/comfyui_build_weather_overlay_workflow.py b/python/functions/ml/comfyui_build_weather_overlay_workflow.py index ec0e4075..4459112e 100644 --- a/python/functions/ml/comfyui_build_weather_overlay_workflow.py +++ b/python/functions/ml/comfyui_build_weather_overlay_workflow.py @@ -90,7 +90,7 @@ def comfyui_build_weather_overlay_workflow( *, on_black: bool = True, style: str = "weather overlay, atmospheric", - checkpoint: str = "dreamshaper_8.safetensors", + checkpoint: str = "IMG_dreamshaper_8.safetensors", width: int = 1024, height: int = 576, seed: int = 0, @@ -123,8 +123,8 @@ def comfyui_build_weather_overlay_workflow( "stylized rain, painterly", "photoreal fog", "anime sun rays"). Pasa el MISMO style + checkpoint + (lora) a todas las capas 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 width/height a 1344x768). keyword-only. width: ancho de la capa en px (multiplo de 8). 1024 por defecto (16:9 con height 576: resolucion de pantalla apaisada). keyword-only. diff --git a/python/functions/ml/comfyui_build_world_map_workflow.md b/python/functions/ml/comfyui_build_world_map_workflow.md index 69f56c88..897379f1 100644 --- a/python/functions/ml/comfyui_build_world_map_workflow.md +++ b/python/functions/ml/comfyui_build_world_map_workflow.md @@ -5,7 +5,7 @@ lang: py domain: ml version: "1.0.0" purity: pure -signature: "def comfyui_build_world_map_workflow(region: str, *, map_style: str = \"fantasy cartography, aged parchment\", checkpoint: str = \"juggernaut_xl_v11.safetensors\", width: int = 768, height: int = 768, hires: bool = False, 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 = \"world_map\") -> dict" +signature: "def comfyui_build_world_map_workflow(region: str, *, map_style: str = \"fantasy cartography, aged parchment\", checkpoint: str = \"IMG_juggernaut_xl_v11.safetensors\", width: int = 768, height: int = 768, hires: bool = False, 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 = \"world_map\") -> dict" description: "Construye el dict (API format) del workflow de UN mapa de mundo / mapa de nivel ilustrado 2D: lamina cartografica estilo fantasy (continente, region, mazmorra, reino) en vista cenital, con marcas/regiones rotuladas y borde ornamental, para la pantalla de mapa del juego. Genera SOLO la ilustracion (las marcas interactivas, los iconos pinchables y el texto fiable los pone el motor). Cuadrado por defecto (768x768), hires opcional. Compone comfyui_build_hires_fix_workflow (si hires) o comfyui_build_txt2img_workflow + comfyui_inject_lora (estilo opcional). Hermano de comfyui_build_splash_art/parallax_background_workflow. Pura, sin red ni I/O. class_types verificados contra /object_info (8GB lowvram)." tags: [comfyui, ml, gamedev-2d, world-map, level-map, cartography, 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: map_style desc: "Tratamiento cartografico que define el look del mapa (ej. 'fantasy cartography, aged parchment', 'hand-drawn ink map', 'old nautical chart', 'painted region map, vibrant'). Pasa el MISMO map_style + checkpoint + lora a varios mapas para coherencia visual del juego. keyword-only." - name: checkpoint - desc: "Checkpoint del servidor. 'juggernaut_xl_v11.safetensors' (SDXL, mejor detalle de costa/relieve/ornamento) 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 de costa/relieve/ornamento) 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. 768 por defecto (cuadrado). Para un mundo apaisado (banda continental ancha) sube width. 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_world_map_workflow import comfyui_build_world_map_workflow # Mapa de mundo ilustrado de un reino fantasy en vista cenital cartografica. -# En 8GB lowvram va holgado con SD1.5 (dreamshaper_8) sin hires; SDXL+hires es mas pesado (puede OOM). +# En 8GB lowvram va holgado con SD1.5 (IMG_dreamshaper_8) sin hires; SDXL+hires es mas pesado (puede OOM). wf = comfyui_build_world_map_workflow( "a fantasy kingdom with mountains, forests and a coastline", map_style="fantasy cartography, aged parchment", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", hires=False, seed=7, ) # Atlas coherente: mismo map_style/checkpoint para varios mapas del juego, varia solo region. # for r in ["the northern ice provinces", "the central trade kingdoms", "the southern jungles"]: # wf = comfyui_build_world_map_workflow(r, map_style="fantasy cartography, aged parchment", -# checkpoint="dreamshaper_8.safetensors", seed=7) +# checkpoint="IMG_dreamshaper_8.safetensors", seed=7) # comfyui_submit_workflow(wf) # -> comfyui_wait_result -> comfyui_fetch_output_image # Las marcas interactivas, los iconos pinchables y el "estas aqui" los compone el motor sobre la lamina. ``` @@ -109,9 +109,9 @@ fiable los pone el motor de juego SOBRE la ilustracion — este builder NO los p - **Cuadrado por defecto (768x768)**: una pantalla de mapa suele encuadrar la region completa. Para un mundo apaisado (banda continental ancha) sube `width`; para un mapa en columna (torre/mazmorra vertical) sube `height`. -- **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), deja `hires=False`, o + corta: baja a `checkpoint="IMG_dreamshaper_8.safetensors"` (SD1.5), deja `hires=False`, o reduce `width/height`. Probado e2e en GPU con SD1.5 sin hires (ver report 0166). - **hires requiere UltimateSDUpscale + Remacri**: si el server responde HTTP 400 "node type not found: UltimateSDUpscale", falta el custom node; usa `hires=False`. El diff --git a/python/functions/ml/comfyui_build_world_map_workflow.py b/python/functions/ml/comfyui_build_world_map_workflow.py index 12bf8cdf..a3d40e17 100644 --- a/python/functions/ml/comfyui_build_world_map_workflow.py +++ b/python/functions/ml/comfyui_build_world_map_workflow.py @@ -41,7 +41,7 @@ sube width; para un mapa en columna (torre/mazmorra vertical) sube height. Por que hires opcional y False por defecto: un mapa se lee a escala media y el scaffold ya da bastante detalle; hires=True anade detalle real (costas, montañas, ornamento del borde) a costa de tiempo/VRAM. En 8GB lowvram con SDXL puede ser -pesado: baja a SD1.5 (dreamshaper_8) o deja hires=False si la GPU se queda corta (OOM). +pesado: baja a SD1.5 (IMG_dreamshaper_8) o deja hires=False si la GPU se queda corta (OOM). class_types/inputs verificados contra /object_info del servidor (8GB lowvram) a traves de los builders que compone (CheckpointLoaderSimple, CLIPTextEncode, @@ -73,7 +73,7 @@ def comfyui_build_world_map_workflow( region: str, *, map_style: str = "fantasy cartography, aged parchment", - checkpoint: str = "juggernaut_xl_v11.safetensors", + checkpoint: str = "IMG_juggernaut_xl_v11.safetensors", width: int = 768, height: int = 768, hires: bool = False, @@ -101,10 +101,10 @@ def comfyui_build_world_map_workflow( cartography, aged parchment", "hand-drawn ink map", "old nautical chart", "painted region map, vibrant"). Pasa el MISMO map_style + checkpoint + (lora) a varios mapas 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 de costa/relieve/ornamento) 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. 768 por defecto (cuadrado). Para un mundo apaisado (banda continental ancha) sube width. keyword-only. height: alto del lienzo en px. 768 por defecto (cuadrado). Para un mapa en @@ -220,7 +220,7 @@ if __name__ == "__main__": wf = comfyui_build_world_map_workflow( "a fantasy kingdom with mountains, forests and a coastline", map_style="fantasy cartography, aged parchment", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", hires=False, seed=7, ) diff --git a/python/functions/ml/comfyui_build_world_map_workflow_test.py b/python/functions/ml/comfyui_build_world_map_workflow_test.py index ad4bcc70..559b8780 100644 --- a/python/functions/ml/comfyui_build_world_map_workflow_test.py +++ b/python/functions/ml/comfyui_build_world_map_workflow_test.py @@ -31,7 +31,7 @@ def test_golden_plain_recipe(): wf = comfyui_build_world_map_workflow( "a fantasy kingdom with mountains, forests and a coastline", map_style="fantasy cartography, aged parchment", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", hires=False, seed=7, ) @@ -64,7 +64,7 @@ def test_golden_plain_recipe(): def test_edge_hires_chains_upscale(): wf = comfyui_build_world_map_workflow( "a desert continent with an oasis and ruins", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", hires=True, upscale_by=2.0, seed=3, diff --git a/python/functions/ml/comfyui_compose_capabilities.md b/python/functions/ml/comfyui_compose_capabilities.md index 5d15a078..3c3d99c3 100644 --- a/python/functions/ml/comfyui_compose_capabilities.md +++ b/python/functions/ml/comfyui_compose_capabilities.md @@ -42,7 +42,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 from ml.comfyui_compose_capabilities import comfyui_compose_capabilities -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a hero, 3d render style") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a hero, 3d render style") # 3 capacidades a la vez: 2 LoRAs + FaceDetailer (activar/desactivar = cambiar args) mixed = comfyui_compose_capabilities( diff --git a/python/functions/ml/comfyui_compose_capabilities.py b/python/functions/ml/comfyui_compose_capabilities.py index 55d67dbe..e09ed5e0 100644 --- a/python/functions/ml/comfyui_compose_capabilities.py +++ b/python/functions/ml/comfyui_compose_capabilities.py @@ -191,7 +191,7 @@ if __name__ == "__main__": from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a hero, 3d render") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a hero, 3d render") mixed = comfyui_compose_capabilities( base, loras=[ diff --git a/python/functions/ml/comfyui_generate_views_from_image.md b/python/functions/ml/comfyui_generate_views_from_image.md index fc8760ac..0c2990f6 100644 --- a/python/functions/ml/comfyui_generate_views_from_image.md +++ b/python/functions/ml/comfyui_generate_views_from_image.md @@ -107,8 +107,8 @@ report 0073). Esta función es el camino sintético cuando solo hay 1 vista. - **No finge resultados**: si el nodo o su checkpoint no están instalados, devuelve `{ok: False, reason: ...}` con el comando para habilitarlo y **NO encola nada** (no compite por la GPU). Estado en este equipo (24/06/2026, verificado contra `/object_info`): - `stable_zero123.ckpt` **SÍ** (zero123 viable) y `sv3d_p.safetensors` **SÍ** (sv3d viable - y probado en GPU, ver Capability growth log). Para sv3d acepta `sv3d_p.safetensors` + `3D_stable_zero123.ckpt` **SÍ** (zero123 viable) y `3D_sv3d_p.safetensors` **SÍ** (sv3d viable + y probado en GPU, ver Capability growth log). Para sv3d acepta `3D_sv3d_p.safetensors` (preferido, orbita con elevación variable) o `sv3d_u.safetensors` (orbita uniforme). - **`image_name` debe existir en `input/` ANTES de generar**: la función no sube la imagen (no la inventa). Si pasas un `image_name` que no está en el `input/` del servidor, el @@ -117,7 +117,7 @@ report 0073). Esta función es el camino sintético cuando solo hay 1 vista. Usa `validate_only=True` para comprobar el grafo sin necesidad de la imagen ni de GPU. - **SV3D y la VRAM (8 GB lowvram)**: el orbit nativo de 21 frames @576×576 **cabe** en 8 GB lowvram (medido: ~75 s, peak ~5.7 GB de 8 GB con el escritorio usando ~2.9 GB). El - checkpoint `sv3d_p.safetensors` pesa ~9.4 GB en disco (incluye el backbone SVD completo + + checkpoint `3D_sv3d_p.safetensors` pesa ~9.4 GB en disco (incluye el backbone SVD completo + CLIP-vision + VAE), NO ~2 GB; ComfyUI lo carga por capas en lowvram. Si diera OOM en un equipo más justo, baja `video_frames` (p. ej. 12) y/o `sv3d_width`/`sv3d_height` (p. ej. 320); reducir frames degrada la densidad del orbit (el modelo se entrenó para 21). @@ -139,6 +139,6 @@ report 0073). Esta función es el camino sintético cuando solo hay 1 vista. - v1.1.0 (24/06/2026) — implementado el camino `sv3d` (antes `NotImplementedError`): builder `SV3D_Conditioning` + `VideoLinearCFGGuidance` + `KSampler` + `VAEDecode` que produce el orbit de N frames; nuevos params `video_frames`/`sv3d_width`/`sv3d_height` - configurables; salida extendida con `frames`/`frame_count`; soporta `sv3d_p`/`sv3d_u`. + configurables; salida extendida con `frames`/`frame_count`; soporta `3D_sv3d_p`/`sv3d_u`. Probado en GPU (8 GB lowvram): 21 frames 576×576 en ~75 s, peak ~5.7 GB - (prompt_id `0caeedf4-…`). Modelo `sv3d_p.safetensors` descargado a `checkpoints/`. + (prompt_id `0caeedf4-…`). Modelo `3D_sv3d_p.safetensors` descargado a `checkpoints/`. diff --git a/python/functions/ml/comfyui_generate_views_from_image.py b/python/functions/ml/comfyui_generate_views_from_image.py index db75343e..ae07833d 100644 --- a/python/functions/ml/comfyui_generate_views_from_image.py +++ b/python/functions/ml/comfyui_generate_views_from_image.py @@ -7,9 +7,9 @@ vistas NATIVOS (sin custom node), confirmados en /object_info: - StableZero123 (`StableZero123_Conditioning_Batched`): control directo de azimuth por vista; un batch saca varias vistas en una pasada. Requiere el checkpoint - `stable_zero123.ckpt` (~8.58 GB; cabe en 8 GB solo para SINTESIS de vistas). + `3D_stable_zero123.ckpt` (~8.58 GB; cabe en 8 GB solo para SINTESIS de vistas). - SV3D (`SV3D_Conditioning`): orbita de 21 frames en una pasada, mejor consistencia; - requiere `sv3d_u.safetensors`/`sv3d_p.safetensors` (~2.3 GB; modelo de video, mas + requiere `sv3d_u.safetensors`/`3D_sv3d_p.safetensors` (~2.3 GB; modelo de video, mas exigente en VRAM). Esta funcion es HONESTA sobre la viabilidad: consulta el servidor, comprueba que el @@ -39,11 +39,11 @@ from comfyui_fetch_output_image import comfyui_fetch_output_image # noqa: E402 # Checkpoint(s) requerido(s) por cada metodo (los carga ImageOnlyCheckpointLoader). # Cada metodo declara una tupla de candidatos en orden de preferencia: se usa el -# primero que el servidor ofrezca. SV3D acepta sv3d_p (orbita con elevacion +# primero que el servidor ofrezca. SV3D acepta 3D_sv3d_p (orbita con elevacion # variable, preferido) o sv3d_u (orbita uniforme en el ecuador). _METHOD_CKPT = { - "zero123": ("stable_zero123.ckpt",), - "sv3d": ("sv3d_p.safetensors", "sv3d_u.safetensors"), + "zero123": ("3D_stable_zero123.ckpt",), + "sv3d": ("3D_sv3d_p.safetensors", "sv3d_u.safetensors"), } # azimuth (grados) -> nombre de vista. 0=front (la que aporta el caller). _AZIMUTH_NAME = {0: "front", 90: "right", 180: "back", 270: "left"} @@ -261,7 +261,7 @@ def _build_sv3d_workflow(image_name, ckpt_name, elevation, video_frames, """Workflow SV3D: 1 imagen -> orbit de `video_frames` vistas en una pasada. SV3D reutiliza la maquinaria img2vid de Stable Video Diffusion: el checkpoint - (sv3d_p / sv3d_u) se carga con ImageOnlyCheckpointLoader (MODEL+CLIP_VISION+VAE), + (3D_sv3d_p / sv3d_u) se carga con ImageOnlyCheckpointLoader (MODEL+CLIP_VISION+VAE), SV3D_Conditioning produce el conditioning del orbit y la latente, y se muestrea como un video con guia CFG lineal. El SaveImage emite los N frames del orbit. """ diff --git a/python/functions/ml/comfyui_get_gamedev_style_preset.md b/python/functions/ml/comfyui_get_gamedev_style_preset.md index 3f289864..8b988744 100644 --- a/python/functions/ml/comfyui_get_gamedev_style_preset.md +++ b/python/functions/ml/comfyui_get_gamedev_style_preset.md @@ -37,7 +37,7 @@ print(comfyui_get_gamedev_style_preset()) # {'names': ['gameboy', 'ghibli', 'pi # Receta de un estilo concreto (copia segura de mutar) preset = comfyui_get_gamedev_style_preset("gameboy") print(preset["checkpoint"], preset["lora"], preset["post"]["pixelize"]["palette"]) -# dreamshaper_8.safetensors None game-boy +# IMG_dreamshaper_8.safetensors None game-boy # Aplicarlo a un asset con el helper hermano (ver comfyui_apply_style_preset): # ap = comfyui_apply_style_preset(preset, "knight character") @@ -64,7 +64,7 @@ para descubrir los estilos disponibles. `comfyui_submit_workflow`/`comfyui_wait_result`/`comfyui_fetch_output_image` + `comfyui_pixelize_image`. - **El checkpoint y el LoRA deben casar de base**: `pixel-art-retro` usa el LoRA SDXL - `SDXL_pixel-art` -> exige `checkpoint` SDXL (`juggernaut_xl_v11`) y `size` 768. Aplicar un + `SDXL_pixel-art` -> exige `checkpoint` SDXL (`IMG_juggernaut_xl_v11`) y `size` 768. Aplicar un LoRA SDXL sobre un checkpoint SD1.5 da basura. Si anades un estilo con LoRA nuevo, descargalo a `models/loras` y verifica su base antes. - **ghibli no usa un LoRA Ghibli dedicado**: no hay ninguno instalado y no se descargo @@ -76,7 +76,7 @@ para descubrir los estilos disponibles. aplicar el post (`preset["post"]["pixelize"]`) o solo vera un sprite monocromo-ish sin la paleta sellada. - **Modelos verificados en el servidor** (8GB lowvram, modelos en `/mnt/2tb`): si cambias - de PC valida que `dreamshaper_8`, `juggernaut_xl_v11`, `SDXL_pixel-art` y + de PC valida que `IMG_dreamshaper_8`, `IMG_juggernaut_xl_v11`, `SDXL_pixel-art` y `SD15_watercolor_style` existan (`GET /object_info/CheckpointLoaderSimple` y `/LoraLoader`). ## Capability growth log diff --git a/python/functions/ml/comfyui_get_gamedev_style_preset.py b/python/functions/ml/comfyui_get_gamedev_style_preset.py index 3f776027..ad71c4a5 100644 --- a/python/functions/ml/comfyui_get_gamedev_style_preset.py +++ b/python/functions/ml/comfyui_get_gamedev_style_preset.py @@ -44,7 +44,7 @@ import copy # Modelos verificados presentes en el servidor (8GB lowvram, modelos en /mnt/2tb): -# checkpoints: dreamshaper_8 (SD1.5), juggernaut_xl_v11 (SDXL) +# checkpoints: IMG_dreamshaper_8 (SD1.5), IMG_juggernaut_xl_v11 (SDXL) # loras: SDXL_pixel-art (SDXL), SD15_watercolor_style (SD1.5), ... # Si se anade un estilo con un LoRA nuevo, descargar antes a models/loras y verificar # que el `checkpoint` casa con su base (un LoRA SDXL exige checkpoint SDXL). @@ -59,7 +59,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", 8-bit, simple shapes, limited palette, retro handheld", "style": "Game Boy DMG game art, monochrome green, retro handheld sprite, low detail, flat shading", "negative": "color, colorful, vibrant, photorealistic, photo, 3d render, smooth gradient, high detail, realistic lighting", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "lora": None, "lora_strength": 1.0, "size": 512, @@ -90,7 +90,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", anime illustration, soft lighting, painterly", "style": "Studio Ghibli style, hand-painted anime, soft colors, watercolor background, whimsical, gentle, detailed illustration", "negative": "photo, photorealistic, 3d render, harsh shadows, pixel art, lowres, deformed, text, watermark, signature", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "lora": "SD15_watercolor_style.safetensors", "lora_strength": 0.7, "size": 512, @@ -105,7 +105,7 @@ _PRESETS: dict[str, dict] = { ), }, # Pixel-art retro 16-bit (SNES/Genesis): reutiliza el LoRA SDXL_pixel-art ya instalado - # (es SDXL -> exige checkpoint SDXL juggernaut_xl_v11 y resolucion mayor). El post + # (es SDXL -> exige checkpoint SDXL IMG_juggernaut_xl_v11 y resolucion mayor). El post # pixelize a 16 colores sella los pixeles duros (el LoRA da el estilo, el post el grid). "pixel-art-retro": { "name": "pixel-art-retro", @@ -113,7 +113,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", pixel art, game sprite, crisp pixels", "style": "16-bit pixel art, SNES JRPG sprite, retro game, limited palette, clean outline, flat colors", "negative": "blurry, smooth, photorealistic, 3d render, realistic, antialiasing, soft, gradient, noise", - "checkpoint": "juggernaut_xl_v11.safetensors", + "checkpoint": "IMG_juggernaut_xl_v11.safetensors", "lora": "SDXL_pixel-art.safetensors", "lora_strength": 1.0, "size": 768, @@ -129,14 +129,14 @@ _PRESETS: dict[str, dict] = { }, "notes": ( "Reutiliza SDXL_pixel-art.safetensors (SDXL, ya instalado) -> requiere checkpoint " - "SDXL juggernaut_xl_v11 y size 768 (a 512 SDXL+SDXL_pixel-art pierde calidad). El " + "SDXL IMG_juggernaut_xl_v11 y size 768 (a 512 SDXL+SDXL_pixel-art pierde calidad). El " "post pixelize a 16 colores (paleta auto MEDIANCUT) da el grid duro 16-bit. OOM en " "8GB -> bajar size a 512 (NO matar procesos). El LoRA da el estilo; el post el grid." ), }, # Cyberpunk neón: ciudad nocturna, luces de neón, glow, alto contraste, atmósfera # Blade Runner. No hay un LoRA cyberpunk gratis instalado en el servidor; el look se - # logra con PROMPT puro sobre SD1.5 (dreamshaper_8 lo cubre bien) — es un estilo muy + # logra con PROMPT puro sobre SD1.5 (IMG_dreamshaper_8 lo cubre bien) — es un estilo muy # dirigible por prompt. Sin post (es ilustración con gradientes/glow, NO pixelart; # pixelizar mataría el brillo). transparent=False para conservar el fondo neón. "cyberpunk-neon": { @@ -145,7 +145,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", neon-lit, glowing edges, high contrast, futuristic", "style": "cyberpunk neon art, blade runner aesthetic, glowing neon lights, dark city night, vibrant magenta and cyan glow, rim lighting, reflective surfaces, atmospheric haze, detailed digital painting", "negative": "daylight, pastel, flat lighting, washed out, low contrast, pixel art, lowres, blurry, deformed, text, watermark, signature", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "lora": None, "lora_strength": 1.0, "size": 512, @@ -154,7 +154,7 @@ _PRESETS: dict[str, dict] = { "notes": ( "Sin LoRA: no hay un LoRA cyberpunk gratis instalado y no se descargo ninguno " "gated/de pago. El neón lo da el prompt (glow magenta/cyan, rim lighting, ciudad " - "nocturna) sobre dreamshaper_8 (SD1.5), que rinde bien en este registro. Sin post: " + "nocturna) sobre IMG_dreamshaper_8 (SD1.5), que rinde bien en este registro. Sin post: " "el brillo y los gradientes son la identidad del estilo; pixelizar los destruiria. " "transparent=False para conservar el ambiente neón del fondo." ), @@ -169,7 +169,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", low poly, faceted, flat shaded, geometric", "style": "low poly 3d art, flat shading, faceted geometry, minimal polygons, PS1 PSX aesthetic, clean solid colors, isometric game asset, no gradients, crisp facets", "negative": "photorealistic, smooth shading, soft gradient, high detail, realistic texture, blurry, noisy, pixel art, deformed, text, watermark, signature", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "lora": None, "lora_strength": 1.0, "size": 512, @@ -178,7 +178,7 @@ _PRESETS: dict[str, dict] = { "notes": ( "Sin LoRA a propósito: SD15_3d_render_redmond (instalado) empuja a render " "fotorrealista, lo OPUESTO a low-poly. El look faceteado/flat lo da el prompt " - "(low poly, faceted, flat shading, PS1) sobre dreamshaper_8 (SD1.5). Sin post: el " + "(low poly, faceted, flat shading, PS1) sobre IMG_dreamshaper_8 (SD1.5). Sin post: el " "flat shading es limpio de por sí, no necesita pixelize. transparent=True porque un " "asset low-poly suele ir recortado sobre el juego (silueta sólida bien definida)." ), @@ -193,7 +193,7 @@ _PRESETS: dict[str, dict] = { "subject_suffix": ", cel shaded, bold outlines, flat colors, cartoon", "style": "cartoon cel-shaded art, bold black outlines, flat color fills, hard cel shadows, vibrant saturated colors, clean vector look, anime toon shading, comic style", "negative": "photorealistic, soft shading, gradient, realistic texture, painterly, blurry, noisy, pixel art, lowres, grainy, deformed, text, watermark, signature", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "lora": "SD15_anime_style_box.safetensors", "lora_strength": 0.7, "size": 512, @@ -202,7 +202,7 @@ _PRESETS: dict[str, dict] = { "notes": ( "SD15_anime_style_box.safetensors (gratis, ya instalado en /mnt/2tb) a strength 0.7 " "empuja el toon/anime; el prompt sella el cel-shading (outlines negros gruesos, " - "sombras duras por celdas, colores planos saturados). SD1.5 (dreamshaper_8). Sin " + "sombras duras por celdas, colores planos saturados). SD1.5 (IMG_dreamshaper_8). Sin " "post: el look vectorial limpio no necesita pixelize. transparent=True para recortar " "la silueta del personaje/objeto cartoon sobre el juego." ), diff --git a/python/functions/ml/comfyui_get_gamedev_style_preset_test.py b/python/functions/ml/comfyui_get_gamedev_style_preset_test.py index 44d72f8b..71849890 100644 --- a/python/functions/ml/comfyui_get_gamedev_style_preset_test.py +++ b/python/functions/ml/comfyui_get_gamedev_style_preset_test.py @@ -50,7 +50,7 @@ def test_golden_pixel_retro_uses_sdxl_lora(): r = comfyui_get_gamedev_style_preset("pixel-art-retro") # Reutiliza SDXL_pixel-art (SDXL) -> checkpoint SDXL + size mayor + pixelize. assert r["lora"] == "SDXL_pixel-art.safetensors" - assert r["checkpoint"] == "juggernaut_xl_v11.safetensors" + assert r["checkpoint"] == "IMG_juggernaut_xl_v11.safetensors" assert r["size"] >= 768 assert "pixelize" in r["post"] diff --git a/python/functions/ml/comfyui_inject_controlnet.md b/python/functions/ml/comfyui_inject_controlnet.md index 2be49790..364e1126 100644 --- a/python/functions/ml/comfyui_inject_controlnet.md +++ b/python/functions/ml/comfyui_inject_controlnet.md @@ -40,7 +40,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 from ml.comfyui_inject_controlnet import comfyui_inject_controlnet -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a knight, dramatic light") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a knight, dramatic light") wf = comfyui_inject_controlnet(base, "pose_canny.png", "control_v11p_sd15_canny.pth", strength=0.8) # KSampler.positive ahora viene de ControlNetApply(conditioning=CLIPTextEncode+, image=pose_canny) ``` diff --git a/python/functions/ml/comfyui_inject_controlnet.py b/python/functions/ml/comfyui_inject_controlnet.py index d0c2c8a8..77023fba 100644 --- a/python/functions/ml/comfyui_inject_controlnet.py +++ b/python/functions/ml/comfyui_inject_controlnet.py @@ -137,7 +137,7 @@ if __name__ == "__main__": sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a knight, dramatic") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a knight, dramatic") wf = comfyui_inject_controlnet( base, "pose_canny.png", "control_v11p_sd15_canny.pth", strength=0.8 ) diff --git a/python/functions/ml/comfyui_inject_hires_fix.md b/python/functions/ml/comfyui_inject_hires_fix.md index 715f7137..478bd63b 100644 --- a/python/functions/ml/comfyui_inject_hires_fix.md +++ b/python/functions/ml/comfyui_inject_hires_fix.md @@ -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 from ml.comfyui_inject_hires_fix import comfyui_inject_hires_fix -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a fox in a forest, detailed") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a fox in a forest, detailed") # El base termina en VAEDecode ["8",0] -> SaveImage ["9"]. wf = comfyui_inject_hires_fix(base, upscale_by=2.0, denoise=0.35, seed=42) # Ahora: VAEDecode -> UltimateSDUpscale -> SaveImage, con UpscaleModelLoader cargando Remacri. diff --git a/python/functions/ml/comfyui_inject_hires_fix.py b/python/functions/ml/comfyui_inject_hires_fix.py index 4d4cc0c8..c1c1b2ef 100644 --- a/python/functions/ml/comfyui_inject_hires_fix.py +++ b/python/functions/ml/comfyui_inject_hires_fix.py @@ -175,6 +175,6 @@ if __name__ == "__main__": sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a cat, detailed") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a cat, detailed") wf = comfyui_inject_hires_fix(base, upscale_by=2.0, denoise=0.35, seed=42) print(json.dumps(wf, indent=2)) diff --git a/python/functions/ml/comfyui_inject_ipadapter.md b/python/functions/ml/comfyui_inject_ipadapter.md index e9494704..304cf133 100644 --- a/python/functions/ml/comfyui_inject_ipadapter.md +++ b/python/functions/ml/comfyui_inject_ipadapter.md @@ -59,7 +59,7 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow from ml.comfyui_inject_multi_lora import comfyui_inject_multi_lora from ml.comfyui_inject_ipadapter import comfyui_inject_ipadapter -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "portrait of a knight") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "portrait of a knight") wf = comfyui_inject_multi_lora(base, [{"name": "SD15_detail_tweaker.safetensors", "strength_model": 0.5}]) wf = comfyui_inject_ipadapter(wf, "hero_face.png", mode="faceid", weight=0.9) # KSampler.model viene de IPAdapterFaceID(model=ultimo LoraLoader, image=hero_face) @@ -81,7 +81,7 @@ aislado desde cero usa `comfyui_build_ipadapter_workflow`. - **ref_image obligatorio** y **mode in {style, faceid}**: ambos validados con `ValueError`. Es el error path tipico al activar la capacidad sin referencia. - **Compatibilidad de checkpoint**: usa modelos IPAdapter SD1.5 con checkpoints - SD1.5 (dreamshaper_8) y SDXL con SDXL. Mezclar familias da un error de shape en + SD1.5 (IMG_dreamshaper_8) y SDXL con SDXL. Mezclar familias da un error de shape en ejecucion. - `faceid` carga insightface (provider CPU por defecto) + un FaceID .bin + su LoRA: es la rama mas pesada. En 8GB lowvram funciona pero apilarla con diff --git a/python/functions/ml/comfyui_inject_ipadapter.py b/python/functions/ml/comfyui_inject_ipadapter.py index fbd50063..eb979273 100644 --- a/python/functions/ml/comfyui_inject_ipadapter.py +++ b/python/functions/ml/comfyui_inject_ipadapter.py @@ -212,7 +212,7 @@ if __name__ == "__main__": from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a knight, cinematic") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a knight, cinematic") wf_style = comfyui_inject_ipadapter(base, "style_ref.png", mode="style", weight=0.8) wf_face = comfyui_inject_ipadapter(base, "face_ref.png", mode="faceid", weight=0.9) print(json.dumps({"style_nodes": list(wf_style), "faceid_nodes": list(wf_face)}, indent=2)) diff --git a/python/functions/ml/comfyui_inject_lora.md b/python/functions/ml/comfyui_inject_lora.md index 29ae11d0..20dadb89 100644 --- a/python/functions/ml/comfyui_inject_lora.md +++ b/python/functions/ml/comfyui_inject_lora.md @@ -42,7 +42,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 from ml.comfyui_inject_lora import comfyui_inject_lora -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a cat, detailed") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a cat, detailed") wf = comfyui_inject_lora(base, "add_detail.safetensors", strength_model=0.8) # El LoraLoader nuevo recibe model/clip del checkpoint ["4",0]/["4",1] # y ahora KSampler.model == [lora_id, 0], CLIPTextEncode.clip == [lora_id, 1] diff --git a/python/functions/ml/comfyui_inject_lora.py b/python/functions/ml/comfyui_inject_lora.py index e297289f..aa686678 100644 --- a/python/functions/ml/comfyui_inject_lora.py +++ b/python/functions/ml/comfyui_inject_lora.py @@ -125,6 +125,6 @@ if __name__ == "__main__": sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a cat") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a cat") wf = comfyui_inject_lora(base, "add_detail.safetensors", strength_model=0.8) print(json.dumps(wf, indent=2)) diff --git a/python/functions/ml/comfyui_inject_multi_lora.md b/python/functions/ml/comfyui_inject_multi_lora.md index 4ab02e3e..7234f750 100644 --- a/python/functions/ml/comfyui_inject_multi_lora.md +++ b/python/functions/ml/comfyui_inject_multi_lora.md @@ -34,7 +34,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 from ml.comfyui_inject_multi_lora import comfyui_inject_multi_lora -base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a robot, 3D Render Style") +base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a robot, 3D Render Style") wf = comfyui_inject_multi_lora(base, [ {"name": "SD15_3d_render_redmond.safetensors", "strength_model": 0.9}, {"name": "SD15_detail_tweaker.safetensors", "strength_model": 0.5, "strength_clip": 0.5}, diff --git a/python/functions/ml/comfyui_inject_multi_lora.py b/python/functions/ml/comfyui_inject_multi_lora.py index 3fc71eb5..17dda27e 100644 --- a/python/functions/ml/comfyui_inject_multi_lora.py +++ b/python/functions/ml/comfyui_inject_multi_lora.py @@ -75,7 +75,7 @@ if __name__ == "__main__": from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - base = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a robot, 3d render") + base = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a robot, 3d render") wf = comfyui_inject_multi_lora( base, [ diff --git a/python/functions/ml/comfyui_install_3d_model.md b/python/functions/ml/comfyui_install_3d_model.md index d5275549..cba53c48 100644 --- a/python/functions/ml/comfyui_install_3d_model.md +++ b/python/functions/ml/comfyui_install_3d_model.md @@ -37,7 +37,7 @@ from ml.comfyui_install_3d_model import comfyui_install_3d_model res = comfyui_install_3d_model("mini") # Si ya esta (cache o instalado): reused_cache=True, sin re-bajar 3.8 GB. -# res == {"ok": True, "path": "/mnt/2tb/comfyui_models/checkpoints/hunyuan3d-dit-v2-mini.safetensors", +# res == {"ok": True, "path": "/mnt/2tb/comfyui_models/checkpoints/3D_hunyuan3d-dit-v2-mini.safetensors", # "bytes": 3819958234, "reused_cache": True, "error": ""} ``` diff --git a/python/functions/ml/comfyui_install_3d_model.py b/python/functions/ml/comfyui_install_3d_model.py index d56c7761..26f02596 100644 --- a/python/functions/ml/comfyui_install_3d_model.py +++ b/python/functions/ml/comfyui_install_3d_model.py @@ -22,17 +22,17 @@ _VARIANTS = { "mini": ( "tencent/Hunyuan3D-2mini", "hunyuan3d-dit-v2-mini/model.fp16.safetensors", - "hunyuan3d-dit-v2-mini.safetensors", + "3D_hunyuan3d-dit-v2-mini.safetensors", ), "standard": ( "tencent/Hunyuan3D-2", "hunyuan3d-dit-v2-0/model.fp16.safetensors", - "hunyuan3d-dit-v2-0.safetensors", + "3D_hunyuan3d-dit-v2-0.safetensors", ), "mv": ( "tencent/Hunyuan3D-2mv", "hunyuan3d-dit-v2-mv/model.fp16.safetensors", - "hunyuan3d-dit-v2-mv.safetensors", + "3D_hunyuan3d-dit-v2-mv.safetensors", ), } diff --git a/python/functions/ml/comfyui_list_installed_models.md b/python/functions/ml/comfyui_list_installed_models.md index 8b9abd34..8c698db6 100644 --- a/python/functions/ml/comfyui_list_installed_models.md +++ b/python/functions/ml/comfyui_list_installed_models.md @@ -35,7 +35,7 @@ from ml.comfyui_list_installed_models import comfyui_list_installed_models out = comfyui_list_installed_models() print(out["models"]["checkpoints"]) -# ['dreamshaper_8.safetensors', 'juggernaut_xl_v11.safetensors', 'v1-5-pruned-emaonly-fp16.safetensors', ...] +# ['IMG_dreamshaper_8.safetensors', 'IMG_juggernaut_xl_v11.safetensors', 'IMG_v1-5-pruned-emaonly-fp16.safetensors', ...] # -> resueltos desde /mnt/2tb/comfyui_models/checkpoints/ via extra_model_paths.yaml # Una sola carpeta: diff --git a/python/functions/ml/comfyui_object_info.md b/python/functions/ml/comfyui_object_info.md index 1c23f2c4..f010d939 100644 --- a/python/functions/ml/comfyui_object_info.md +++ b/python/functions/ml/comfyui_object_info.md @@ -38,7 +38,7 @@ from ml.comfyui_object_info import comfyui_object_info info = comfyui_object_info() # catalogo completo print(len(info)) # ~792 nodos ckpts = info["CheckpointLoaderSimple"]["input"]["required"]["ckpt_name"][0] -print(ckpts) # ['v1-5-pruned-emaonly-fp16.safetensors'] +print(ckpts) # ['IMG_v1-5-pruned-emaonly-fp16.safetensors'] ks = comfyui_object_info(node_class="KSampler") # solo un nodo print(list(ks.keys())) # ['KSampler'] diff --git a/python/functions/ml/comfyui_read_png_metadata.md b/python/functions/ml/comfyui_read_png_metadata.md index 1395b148..42c7a19a 100644 --- a/python/functions/ml/comfyui_read_png_metadata.md +++ b/python/functions/ml/comfyui_read_png_metadata.md @@ -34,7 +34,7 @@ from ml.comfyui_read_png_metadata import comfyui_read_png_metadata res = comfyui_read_png_metadata(os.path.expanduser("~/ComfyUI/output/comfy_00001_.png")) # res["ok"] == True # res["parameters"]["seed"] # ej. 20260623 -# res["parameters"]["model"] # ej. "dreamshaper_8.safetensors" +# res["parameters"]["model"] # ej. "IMG_dreamshaper_8.safetensors" # res["parameters"]["positive"] # el prompt positivo usado ``` diff --git a/python/functions/ml/comfyui_resolve_workflow_deps.py b/python/functions/ml/comfyui_resolve_workflow_deps.py index c5707dbc..588742a6 100644 --- a/python/functions/ml/comfyui_resolve_workflow_deps.py +++ b/python/functions/ml/comfyui_resolve_workflow_deps.py @@ -96,7 +96,7 @@ if __name__ == "__main__": # Workflow con un nodo inexistente -> debe aparecer en missing_nodes. wf = { "1": {"class_type": "CheckpointLoaderSimple", - "inputs": {"ckpt_name": "dreamshaper_8.safetensors"}}, + "inputs": {"ckpt_name": "IMG_dreamshaper_8.safetensors"}}, "2": {"class_type": "NodoQueNoExiste_XYZ", "inputs": {}}, } print(json.dumps(comfyui_resolve_workflow_deps(wf), indent=2)) diff --git a/python/functions/ml/comfyui_save_skill.md b/python/functions/ml/comfyui_save_skill.md index eb1178e9..b5dd2840 100644 --- a/python/functions/ml/comfyui_save_skill.md +++ b/python/functions/ml/comfyui_save_skill.md @@ -36,7 +36,7 @@ from ml.comfyui_save_skill import comfyui_save_skill recipe = { "schema_version": 1, "slug": "portrait_cinematic_sdxl", "version": "1.0.0", "title": "Retrato cinematográfico SDXL", "base_workflow": "txt2img", - "checkpoint": "juggernaut_xl_v11.safetensors", + "checkpoint": "IMG_juggernaut_xl_v11.safetensors", "params": {"steps": 30, "cfg": 5.5, "sampler_name": "dpmpp_2m", "scheduler": "karras"}, "prompt_scaffold": {"positive": "cinematic portrait of {subject}", "negative": "blurry", "trigger_words": []}, diff --git a/python/functions/ml/comfyui_save_skill.py b/python/functions/ml/comfyui_save_skill.py index ac00319e..5a4b2840 100644 --- a/python/functions/ml/comfyui_save_skill.py +++ b/python/functions/ml/comfyui_save_skill.py @@ -151,7 +151,7 @@ if __name__ == "__main__": demo = { "schema_version": 1, "slug": "demo_skill", "version": "1.0.0", "title": "Demo", "base_workflow": "txt2img", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "params": {"steps": 20, "cfg": 7.0}, "prompt_scaffold": {"positive": "{subject}", "negative": "", "trigger_words": []}, "provenance": {"source": "manual", "nsfw": False}, diff --git a/python/functions/ml/comfyui_stream_progress.md b/python/functions/ml/comfyui_stream_progress.md index 74216e30..0ad75472 100644 --- a/python/functions/ml/comfyui_stream_progress.md +++ b/python/functions/ml/comfyui_stream_progress.md @@ -41,7 +41,7 @@ from ml.comfyui_stream_progress import comfyui_stream_progress cid = uuid.uuid4().hex # MISMO clientId en submit y en stream para ver progress en vivo wf = comfyui_build_txt2img_workflow( - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="an ornate brass clockwork dragon", steps=25, seed=424242) pid = comfyui_submit_workflow(wf, client_id=cid)["prompt_id"] diff --git a/python/functions/ml/comfyui_submit_workflow.md b/python/functions/ml/comfyui_submit_workflow.md index b5b9c076..6f874107 100644 --- a/python/functions/ml/comfyui_submit_workflow.md +++ b/python/functions/ml/comfyui_submit_workflow.md @@ -39,7 +39,7 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow from ml.comfyui_submit_workflow import comfyui_submit_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", ) diff --git a/python/functions/ml/comfyui_submit_workflow.py b/python/functions/ml/comfyui_submit_workflow.py index dfa11bf0..06b4f160 100644 --- a/python/functions/ml/comfyui_submit_workflow.py +++ b/python/functions/ml/comfyui_submit_workflow.py @@ -70,7 +70,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", steps=20, diff --git a/python/functions/ml/comfyui_validate_workflow.md b/python/functions/ml/comfyui_validate_workflow.md index 72d6fc77..eba176cc 100644 --- a/python/functions/ml/comfyui_validate_workflow.md +++ b/python/functions/ml/comfyui_validate_workflow.md @@ -36,7 +36,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 from ml.comfyui_validate_workflow import comfyui_validate_workflow -wf = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a cat") +wf = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a cat") res = comfyui_validate_workflow(wf) # server 127.0.0.1:8188 vivo # res == {"ok": True, "valid": True, "missing_nodes": [], "missing_models": [], "error": ""} diff --git a/python/functions/ml/comfyui_validate_workflow.py b/python/functions/ml/comfyui_validate_workflow.py index bcc24cc9..5053eb0f 100644 --- a/python/functions/ml/comfyui_validate_workflow.py +++ b/python/functions/ml/comfyui_validate_workflow.py @@ -106,5 +106,5 @@ if __name__ == "__main__": sys.path.insert(0, _THIS_DIR) from comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow - wf = comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "a cat") + wf = comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "a cat") print(json.dumps(comfyui_validate_workflow(wf), indent=2)) diff --git a/python/functions/ml/comfyui_wait_result.md b/python/functions/ml/comfyui_wait_result.md index 40d0a717..ebc79ae8 100644 --- a/python/functions/ml/comfyui_wait_result.md +++ b/python/functions/ml/comfyui_wait_result.md @@ -40,7 +40,7 @@ from ml.comfyui_submit_workflow import comfyui_submit_workflow from ml.comfyui_wait_result import comfyui_wait_result 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", ) pid = comfyui_submit_workflow(wf)["prompt_id"] diff --git a/python/functions/ml/comfyui_wait_result.py b/python/functions/ml/comfyui_wait_result.py index 08e962fe..303a2406 100644 --- a/python/functions/ml/comfyui_wait_result.py +++ b/python/functions/ml/comfyui_wait_result.py @@ -106,7 +106,7 @@ if __name__ == "__main__": from comfyui_submit_workflow import comfyui_submit_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, diff --git a/python/functions/ml/tests/test_comfyui_build_facedetailer_workflow.py b/python/functions/ml/tests/test_comfyui_build_facedetailer_workflow.py index 430e48d0..2c5edf6c 100644 --- a/python/functions/ml/tests/test_comfyui_build_facedetailer_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_facedetailer_workflow.py @@ -14,7 +14,7 @@ from ml.comfyui_build_txt2img_workflow import comfyui_build_txt2img_workflow # def test_image_mode_builds_detailer_chain(): wf = comfyui_build_facedetailer_workflow( "portrait_00001_.png", - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="detailed face", seed=42, ) @@ -33,13 +33,13 @@ def test_image_mode_builds_detailer_chain(): def test_workflow_mode_reuses_base_nodes(): base = comfyui_build_txt2img_workflow( - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="portrait of a woman", seed=7, ) wf = comfyui_build_facedetailer_workflow( base, - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="detailed face", denoise=0.45, ) @@ -56,13 +56,13 @@ def test_workflow_mode_reuses_base_nodes(): def test_normalizes_short_bbox_model(): wf = comfyui_build_facedetailer_workflow( - "x.png", ckpt_name="dreamshaper_8.safetensors", positive="face", + "x.png", ckpt_name="IMG_dreamshaper_8.safetensors", positive="face", bbox_model="face_yolov8m.pt", ) assert wf["fd_det"]["inputs"]["model_name"] == "bbox/face_yolov8m.pt" # Un nombre ya prefijado se respeta. wf2 = comfyui_build_facedetailer_workflow( - "x.png", ckpt_name="dreamshaper_8.safetensors", positive="face", + "x.png", ckpt_name="IMG_dreamshaper_8.safetensors", positive="face", bbox_model="bbox/face_yolov8m.pt", ) assert wf2["fd_det"]["inputs"]["model_name"] == "bbox/face_yolov8m.pt" @@ -72,7 +72,7 @@ def test_dict_without_vaedecode_raises(): with pytest.raises(ValueError): comfyui_build_facedetailer_workflow( {"1": {"class_type": "LoadImage", "inputs": {"image": "x.png"}}}, - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="face", ) @@ -80,13 +80,13 @@ def test_dict_without_vaedecode_raises(): def test_invalid_base_type_raises(): with pytest.raises(ValueError): comfyui_build_facedetailer_workflow( - 123, ckpt_name="dreamshaper_8.safetensors", positive="face", + 123, ckpt_name="IMG_dreamshaper_8.safetensors", positive="face", ) def test_determinista(): # Builder puro: misma entrada -> mismo dict (sin red, seed fijo, sin estado). - kw = dict(ckpt_name="dreamshaper_8.safetensors", positive="detailed face", seed=42) + kw = dict(ckpt_name="IMG_dreamshaper_8.safetensors", positive="detailed face", seed=42) a = comfyui_build_facedetailer_workflow("portrait_00001_.png", **kw) b = comfyui_build_facedetailer_workflow("portrait_00001_.png", **kw) assert a == b diff --git a/python/functions/ml/tests/test_comfyui_build_flux_workflow.py b/python/functions/ml/tests/test_comfyui_build_flux_workflow.py index eb84ffc0..cc86e65c 100644 --- a/python/functions/ml/tests/test_comfyui_build_flux_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_flux_workflow.py @@ -30,14 +30,14 @@ def test_loaders_separados_de_flux(): # Flux carga UNET + dos text encoders + VAE por separado (no checkpoint unico). wf = comfyui_build_flux_workflow( "POS", - unet="flux1-schnell-fp8-e4m3fn.safetensors", + unet="IMG_flux1-schnell-fp8-e4m3fn.safetensors", clip_l="clip_l.safetensors", t5xxl="t5xxl_fp8_e4m3fn_scaled.safetensors", vae="ae.safetensors", weight_dtype="fp8_e4m3fn", ) unet = node_by_ct(wf, "UNETLoader")["inputs"] - assert unet["unet_name"] == "flux1-schnell-fp8-e4m3fn.safetensors" + assert unet["unet_name"] == "IMG_flux1-schnell-fp8-e4m3fn.safetensors" assert unet["weight_dtype"] == "fp8_e4m3fn" dual = node_by_ct(wf, "DualCLIPLoader")["inputs"] assert dual["type"] == "flux" diff --git a/python/functions/ml/tests/test_comfyui_build_hires_fix_workflow.py b/python/functions/ml/tests/test_comfyui_build_hires_fix_workflow.py index 9cc4286d..adb718aa 100644 --- a/python/functions/ml/tests/test_comfyui_build_hires_fix_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_hires_fix_workflow.py @@ -10,7 +10,7 @@ from ml.comfyui_build_hires_fix_workflow import comfyui_build_hires_fix_workflow def test_base_ksampler_and_ultimate_upscale_present(): wf = comfyui_build_hires_fix_workflow( - ckpt_name="dreamshaper_8.safetensors", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="a fox", seed=42, ) @@ -26,14 +26,14 @@ def test_ultimate_upscale_provee_batch_size(): # /object_info marca batch_size como input REQUERIDO de UltimateSDUpscale. # Sin el, el submit fallaba con node_errors. Regresion guard. wf = comfyui_build_hires_fix_workflow( - ckpt_name="dreamshaper_8.safetensors", positive="x", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="x", ) assert wf["12"]["inputs"]["batch_size"] == 1 def test_second_pass_denoise_is_partial(): wf = comfyui_build_hires_fix_workflow( - ckpt_name="dreamshaper_8.safetensors", positive="x", denoise=0.4, + ckpt_name="IMG_dreamshaper_8.safetensors", positive="x", denoise=0.4, ) # La base re-genera entera (denoise=1.0); la 2a pasada solo anade detalle (<1). assert wf["3"]["inputs"]["denoise"] == 1.0 @@ -43,7 +43,7 @@ def test_second_pass_denoise_is_partial(): def test_first_pass_dims_reflected(): wf = comfyui_build_hires_fix_workflow( - ckpt_name="dreamshaper_8.safetensors", positive="x", first_pass=(640, 960), + ckpt_name="IMG_dreamshaper_8.safetensors", positive="x", first_pass=(640, 960), ) assert wf["5"]["inputs"]["width"] == 640 assert wf["5"]["inputs"]["height"] == 960 @@ -51,7 +51,7 @@ def test_first_pass_dims_reflected(): def test_upscale_model_wired(): wf = comfyui_build_hires_fix_workflow( - ckpt_name="dreamshaper_8.safetensors", positive="x", + ckpt_name="IMG_dreamshaper_8.safetensors", positive="x", upscale_model="4x_foolhardy_Remacri.pth", ) assert wf["11"]["class_type"] == "UpscaleModelLoader" @@ -61,7 +61,7 @@ def test_upscale_model_wired(): def test_determinista(): # Builder puro: misma entrada -> mismo dict (sin red, seed fijo, sin estado). - kw = dict(ckpt_name="dreamshaper_8.safetensors", positive="a fox", seed=42) + kw = dict(ckpt_name="IMG_dreamshaper_8.safetensors", positive="a fox", seed=42) a = comfyui_build_hires_fix_workflow(**kw) b = comfyui_build_hires_fix_workflow(**kw) assert a == b diff --git a/python/functions/ml/tests/test_comfyui_build_image_to_3d_workflow.py b/python/functions/ml/tests/test_comfyui_build_image_to_3d_workflow.py index d7bb89c6..6611fda9 100644 --- a/python/functions/ml/tests/test_comfyui_build_image_to_3d_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_image_to_3d_workflow.py @@ -30,12 +30,12 @@ def test_cadena_hunyuan3d_nativa(): def test_imagen_checkpoint_y_salida_glb(): wf = comfyui_build_image_to_3d_workflow( - "robot.png", ckpt_name="hunyuan3d-dit-v2-mini.safetensors", seed=42 + "robot.png", ckpt_name="3D_hunyuan3d-dit-v2-mini.safetensors", seed=42 ) assert node_by_ct(wf, "LoadImage")["inputs"]["image"] == "robot.png" assert ( node_by_ct(wf, "ImageOnlyCheckpointLoader")["inputs"]["ckpt_name"] - == "hunyuan3d-dit-v2-mini.safetensors" + == "3D_hunyuan3d-dit-v2-mini.safetensors" ) assert node_by_ct(wf, "KSampler")["inputs"]["seed"] == 42 # SaveGLB es el nodo de salida: produce la malla .glb. diff --git a/python/functions/ml/tests/test_comfyui_build_img2vid_workflow.py b/python/functions/ml/tests/test_comfyui_build_img2vid_workflow.py index 98e9a9cf..e6ee2d69 100644 --- a/python/functions/ml/tests/test_comfyui_build_img2vid_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_img2vid_workflow.py @@ -26,7 +26,7 @@ def test_estructura_y_nodos_svd(): assert ct in cts, f"falta {ct} en SVD img2vid" # El checkpoint SVD es todo-en-uno cargado con el loader image-only. assert node_by_ct(wf, "ImageOnlyCheckpointLoader")["inputs"]["ckpt_name"] == ( - "svd.safetensors" + "VIDEO_svd.safetensors" ) # La imagen base entra por LoadImage. assert node_by_ct(wf, "LoadImage")["inputs"]["image"] == "example.png" diff --git a/python/functions/ml/tests/test_comfyui_build_ipadapter_workflow.py b/python/functions/ml/tests/test_comfyui_build_ipadapter_workflow.py index 0e552025..bfa3e9b7 100644 --- a/python/functions/ml/tests/test_comfyui_build_ipadapter_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_ipadapter_workflow.py @@ -23,7 +23,7 @@ def _node_id(wf, class_type): def test_style_mode_nodos_y_conexiones(): wf = comfyui_build_ipadapter_workflow( "a castle, oil painting", "ref.png", - base_checkpoint="dreamshaper_8.safetensors", mode="style", weight=0.75, + base_checkpoint="IMG_dreamshaper_8.safetensors", mode="style", weight=0.75, ) assert_api_format(wf) cts = class_types(wf) @@ -54,7 +54,7 @@ def test_style_mode_nodos_y_conexiones(): def test_faceid_mode_nodos_y_conexiones(): wf = comfyui_build_ipadapter_workflow( "a knight portrait", "face.png", - base_checkpoint="dreamshaper_8.safetensors", mode="faceid", + base_checkpoint="IMG_dreamshaper_8.safetensors", mode="faceid", weight=0.9, lora_strength=0.7, ) assert_api_format(wf) diff --git a/python/functions/ml/tests/test_comfyui_build_skill_workflow.py b/python/functions/ml/tests/test_comfyui_build_skill_workflow.py index 61e22774..8b4c1107 100644 --- a/python/functions/ml/tests/test_comfyui_build_skill_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_skill_workflow.py @@ -27,7 +27,7 @@ def _recipe_base(**over): "slug": "portrait_cinematic_sdxl", "version": "1.0.0", "base_workflow": "txt2img", - "checkpoint": "juggernaut_xl_v11.safetensors", + "checkpoint": "IMG_juggernaut_xl_v11.safetensors", "loras": [], "params": {"steps": 30, "cfg": 5.5, "sampler_name": "dpmpp_2m", "scheduler": "karras", "width": 832, "height": 1216}, diff --git a/python/functions/ml/tests/test_comfyui_build_video_workflow.py b/python/functions/ml/tests/test_comfyui_build_video_workflow.py index 22a2b081..fc4edb47 100644 --- a/python/functions/ml/tests/test_comfyui_build_video_workflow.py +++ b/python/functions/ml/tests/test_comfyui_build_video_workflow.py @@ -34,7 +34,7 @@ def test_ltx_estructura_y_nodos(): assert clip["type"] == "ltxv" assert clip["clip_name"] == "t5xxl_fp8_e4m3fn_scaled.safetensors" assert node_by_ct(wf, "CheckpointLoaderSimple")["inputs"]["ckpt_name"] == ( - "ltx-video-2b-v0.9.5.safetensors" + "VIDEO_ltx-video-2b-v0.9.5.safetensors" ) @@ -55,7 +55,7 @@ def test_wan_estructura_y_nodos(): ): assert ct in cts, f"falta {ct} en Wan" assert node_by_ct(wf, "UNETLoader")["inputs"]["unet_name"] == ( - "wan2.1_t2v_1.3B_fp16.safetensors" + "VIDEO_wan2.1_t2v_1.3B_fp16.safetensors" ) assert node_by_ct(wf, "CLIPLoader")["inputs"]["type"] == "wan" assert node_by_ct(wf, "VAELoader")["inputs"]["vae_name"] == "wan_2.1_vae.safetensors" diff --git a/python/functions/ml/tests/test_comfyui_bump_skill_version.py b/python/functions/ml/tests/test_comfyui_bump_skill_version.py index 9d101a3c..2540dd67 100644 --- a/python/functions/ml/tests/test_comfyui_bump_skill_version.py +++ b/python/functions/ml/tests/test_comfyui_bump_skill_version.py @@ -23,7 +23,7 @@ def _seed_skill(lib, slug="demo_skill", version="1.0.0", **extra): sdir = os.path.join(lib, slug) os.makedirs(os.path.join(sdir, "versions"), exist_ok=True) recipe = {"schema_version": 1, "slug": slug, "version": version, - "base_workflow": "txt2img", "checkpoint": "dreamshaper_8.safetensors", + "base_workflow": "txt2img", "checkpoint": "IMG_dreamshaper_8.safetensors", "params": {"steps": 28, "cfg": 6.0}, **extra} with open(os.path.join(sdir, "recipe.json"), "w", encoding="utf-8") as f: json.dump(recipe, f) diff --git a/python/functions/ml/tests/test_comfyui_compose_capabilities.py b/python/functions/ml/tests/test_comfyui_compose_capabilities.py index 44c39f11..e835cbad 100644 --- a/python/functions/ml/tests/test_comfyui_compose_capabilities.py +++ b/python/functions/ml/tests/test_comfyui_compose_capabilities.py @@ -19,7 +19,7 @@ from _comfyui_wf_assert import assert_api_format, class_types, node_by_ct def _base(): - return comfyui_build_txt2img_workflow("dreamshaper_8.safetensors", "POS", "NEG") + return comfyui_build_txt2img_workflow("IMG_dreamshaper_8.safetensors", "POS", "NEG") def _count_ct(wf, ct): diff --git a/python/functions/ml/tests/test_comfyui_export_skill_template.py b/python/functions/ml/tests/test_comfyui_export_skill_template.py index fc972efd..e5858ec6 100644 --- a/python/functions/ml/tests/test_comfyui_export_skill_template.py +++ b/python/functions/ml/tests/test_comfyui_export_skill_template.py @@ -41,7 +41,7 @@ def _recipe_txt2img(**over): "slug": "demo_skill", "version": "1.0.0", "base_workflow": "txt2img", - "checkpoint": "dreamshaper_8.safetensors", + "checkpoint": "IMG_dreamshaper_8.safetensors", "loras": [], "params": {"steps": 28, "cfg": 6.0, "width": 512, "height": 768}, "prompt_scaffold": { diff --git a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.md b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.md index 9ec7cd9a..57ba7a99 100644 --- a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.md +++ b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.md @@ -5,7 +5,7 @@ lang: py domain: pipelines version: "1.0.0" purity: impure -signature: "def comfyui_generate_asset_pack_oneshot(pack: list, *, checkpoint: str = \"dreamshaper_8.safetensors\", style: str = \"\", lora: str | None = None, lora_strength: float = 1.0, base_seed: int = 0, size: int | None = None, server: str = \"127.0.0.1:8188\", export_godot: str | None = None, out_dir: str | None = None, wait_timeout: float = 600.0, godot_bin: str | None = None) -> dict" +signature: "def comfyui_generate_asset_pack_oneshot(pack: list, *, checkpoint: str = \"IMG_dreamshaper_8.safetensors\", style: str = \"\", lora: str | None = None, lora_strength: float = 1.0, base_seed: int = 0, size: int | None = None, server: str = \"127.0.0.1:8188\", export_godot: str | None = None, out_dir: str | None = None, wait_timeout: float = 600.0, godot_bin: str | None = None) -> dict" description: "One-shot del grupo gamedev-2d: recibe una spec de pack (lista de assets, cada uno con kind + subject) y genera el set 2D ENTERO de un juego compartiendo el MISMO checkpoint, el MISMO LoRA de estilo, un estilo comun (concatenado al subject de cada asset) y una semilla derivada (seed = base_seed + indice), de modo que sprite + iconos + tiles + UI peguen entre si (misma mano, misma paleta, mismo modelo). Despacha cada kind a su builder atomico del registry (item_icon, enemy_creature, prop_object, seamless_tile, ui_hud, particle_texture, ... 26 kinds), encola con comfyui_submit_workflow, espera con comfyui_wait_result, descarga el PNG con comfyui_fetch_output_image y (si export_godot) exporta cada asset al proyecto Godot con comfyui_export_asset_to_godot. Promueve a UNA llamada la composicion repetida 'llamar N builders con el mismo estilo' (issue 0087): el registry no crece inflando builders, crece promoviendo composiciones a pipelines. Un fallo aislado (p.ej. OOM en un asset) NO aborta el resto. Devuelve {ok, pack_dir, checkpoint, style, lora, base_seed, coherence_note, count, generated, failed, assets, error}. Impuro: HTTP a ComfyUI + disco + (export) subprocess." tags: [gamedev-2d, pipelines, comfyui, ml, godot] uses_functions: [comfyui_build_achievement_badge_workflow_py_ml, comfyui_build_card_art_workflow_py_ml, comfyui_build_decal_overlay_workflow_py_ml, comfyui_build_dialogue_box_workflow_py_ml, comfyui_build_emote_workflow_py_ml, comfyui_build_enemy_creature_workflow_py_ml, comfyui_build_foliage_set_workflow_py_ml, comfyui_build_item_icon_workflow_py_ml, comfyui_build_parallax_background_workflow_py_ml, comfyui_build_particle_texture_workflow_py_ml, comfyui_build_portrait_avatar_workflow_py_ml, comfyui_build_projectile_workflow_py_ml, comfyui_build_prop_object_workflow_py_ml, comfyui_build_rune_glyph_workflow_py_ml, comfyui_build_seamless_tile_workflow_py_ml, comfyui_build_skill_tree_node_workflow_py_ml, comfyui_build_splash_art_workflow_py_ml, comfyui_build_status_effect_icon_workflow_py_ml, comfyui_build_structure_workflow_py_ml, comfyui_build_title_lettering_workflow_py_ml, comfyui_build_topdown_sprite_workflow_py_ml, comfyui_build_trap_hazard_workflow_py_ml, comfyui_build_ui_hud_workflow_py_ml, comfyui_build_vehicle_mount_workflow_py_ml, comfyui_build_weather_overlay_workflow_py_ml, comfyui_build_world_map_workflow_py_ml, comfyui_submit_workflow_py_ml, comfyui_wait_result_py_ml, comfyui_fetch_output_image_py_ml, comfyui_export_asset_to_godot_py_pipelines] @@ -65,7 +65,7 @@ res = comfyui_generate_asset_pack_oneshot( {"kind": "item_icon", "subject": "magic sword"}, {"kind": "enemy_creature", "subject": "goblin warrior"}, ], - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", style="dark fantasy, hand-painted", # firma visual compartida base_seed=42, # seeds 42, 43, ... size=512, @@ -73,7 +73,7 @@ res = comfyui_generate_asset_pack_oneshot( ) # res["ok"] -> True # res["assets"][0] -> {"kind":"item_icon","seed":42,"prompt_id":"...","path":"/tmp/asset_pack_demo/item_icon_00042_.png", ...} -# res["coherence_note"] -> "Set coherente: checkpoint='dreamshaper_8.safetensors', style='dark fantasy, hand-painted', ..." +# res["coherence_note"] -> "Set coherente: checkpoint='IMG_dreamshaper_8.safetensors', style='dark fantasy, hand-painted', ..." # Con export directo a un proyecto Godot 4 (cada PNG a res://assets/... + .import): res = comfyui_generate_asset_pack_oneshot( @@ -107,7 +107,7 @@ Si ademas quieres llevarlos a Godot sin tocar imports, pasa `export_godot`. "game icon, clean, centered"). Si un item trae su propio `checkpoint`/`style` en los kwargs extra, ESE asset rompe la coherencia a proposito (override explicito). - **VRAM / OOM.** Genera secuencialmente (un asset cada vez), pero cada uno carga el - modelo. Con poca VRAM usa SD1.5 (`dreamshaper_8`) + `size=512` y packs pequenos. + modelo. Con poca VRAM usa SD1.5 (`IMG_dreamshaper_8`) + `size=512` y packs pequenos. Si un asset peta por OOM, **NO** aborta el pack: ese asset queda `ok=False` con su `error` y el resto continua. Reduce el pack o `size`, no mates procesos. Conviene liberar VRAM antes: `POST http://127.0.0.1:8188/free {"unload_models":true,"free_memory":true}`. diff --git a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.py b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.py index 53de3ce1..ebdee6c6 100644 --- a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.py +++ b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot.py @@ -217,7 +217,7 @@ def _first_image(outputs: dict) -> dict | None: def comfyui_generate_asset_pack_oneshot( pack: list, *, - checkpoint: str = "dreamshaper_8.safetensors", + checkpoint: str = "IMG_dreamshaper_8.safetensors", style: str = "", lora: str | None = None, lora_strength: float = 1.0, @@ -390,7 +390,7 @@ if __name__ == "__main__": {"kind": "item_icon", "subject": "magic sword"}, {"kind": "enemy_creature", "subject": "goblin warrior"}, ], - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", style="dark fantasy, hand-painted", base_seed=42, size=512, diff --git a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot_test.py b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot_test.py index 1c10cd50..ab7385f8 100644 --- a/python/functions/pipelines/comfyui_generate_asset_pack_oneshot_test.py +++ b/python/functions/pipelines/comfyui_generate_asset_pack_oneshot_test.py @@ -28,13 +28,13 @@ from pipelines.comfyui_generate_asset_pack_oneshot import ( # noqa: E402 def test_dispatch_shares_checkpoint_and_seed(): wf, subject_eff, godot_kind, seed = _build_item_workflow( {"kind": "item_icon", "subject": "magic sword"}, - checkpoint="dreamshaper_8.safetensors", style="dark fantasy, hand-painted", + checkpoint="IMG_dreamshaper_8.safetensors", style="dark fantasy, hand-painted", lora=None, lora_strength=1.0, base_seed=42, size=512, index=0, ) blob = json.dumps(wf) assert godot_kind == "sprite" assert seed == 42 # base_seed(42) + index(0) - assert "dreamshaper_8.safetensors" in blob # checkpoint compartido + assert "IMG_dreamshaper_8.safetensors" in blob # checkpoint compartido assert "dark fantasy, hand-painted" in subject_eff # style inyectado al subject assert "magic sword" in subject_eff assert "42" in blob # seed en el sampler @@ -43,7 +43,7 @@ def test_dispatch_shares_checkpoint_and_seed(): def test_seed_is_base_plus_index(): _, _, _, seed = _build_item_workflow( {"kind": "enemy_creature", "subject": "goblin"}, - checkpoint="dreamshaper_8.safetensors", style="", lora=None, + checkpoint="IMG_dreamshaper_8.safetensors", style="", lora=None, lora_strength=1.0, base_seed=100, size=None, index=3, ) assert seed == 103 @@ -61,7 +61,7 @@ def test_godot_kind_per_category(): for kind, expected in cases.items(): _, _, godot_kind, _ = _build_item_workflow( {"kind": kind, "subject": "x"}, - checkpoint="dreamshaper_8.safetensors", style="", lora=None, + checkpoint="IMG_dreamshaper_8.safetensors", style="", lora=None, lora_strength=1.0, base_seed=0, size=None, index=0, ) assert godot_kind == expected, kind @@ -71,13 +71,13 @@ def test_emote_requires_expression(): with pytest.raises(ValueError, match="expression"): _build_item_workflow( {"kind": "emote", "subject": "hero"}, # falta 'expression' - checkpoint="dreamshaper_8.safetensors", style="", lora=None, + checkpoint="IMG_dreamshaper_8.safetensors", style="", lora=None, lora_strength=1.0, base_seed=0, size=None, index=0, ) # con expression sí construye wf, _, godot_kind, _ = _build_item_workflow( {"kind": "emote", "subject": "hero", "expression": "angry"}, - checkpoint="dreamshaper_8.safetensors", style="", lora=None, + checkpoint="IMG_dreamshaper_8.safetensors", style="", lora=None, lora_strength=1.0, base_seed=0, size=None, index=0, ) assert godot_kind == "sprite" and isinstance(wf, dict) @@ -87,7 +87,7 @@ def test_per_item_kwargs_passthrough(): # 'tier' es un kwarg propio de achievement_badge -> debe llegar al builder. wf, _, _, _ = _build_item_workflow( {"kind": "achievement_badge", "subject": "first kill", "tier": "platinum"}, - checkpoint="dreamshaper_8.safetensors", style="", lora=None, + checkpoint="IMG_dreamshaper_8.safetensors", style="", lora=None, lora_strength=1.0, base_seed=0, size=None, index=0, ) assert "platinum" in json.dumps(wf) @@ -99,7 +99,7 @@ def test_unknown_kind_fails_without_network(): res = comfyui_generate_asset_pack_oneshot( [{"kind": "item_icon", "subject": "ok"}, {"kind": "does_not_exist", "subject": "x"}], - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", ) assert res["ok"] is False assert "no soportado" in res["error"] @@ -142,7 +142,7 @@ def test_full_flow_mocked(monkeypatch, tmp_path): res = comfyui_generate_asset_pack_oneshot( [{"kind": "item_icon", "subject": "magic sword"}, {"kind": "enemy_creature", "subject": "goblin warrior"}], - checkpoint="dreamshaper_8.safetensors", style="dark fantasy, hand-painted", + checkpoint="IMG_dreamshaper_8.safetensors", style="dark fantasy, hand-painted", base_seed=42, size=512, server="http://127.0.0.1:8188", out_dir=str(tmp_path), ) @@ -151,8 +151,8 @@ def test_full_flow_mocked(monkeypatch, tmp_path): assert [a["seed"] for a in res["assets"]] == [42, 43] assert all(a["prompt_id"].startswith("pid-") for a in res["assets"]) assert all(os.path.isfile(a["path"]) for a in res["assets"]) - assert "dreamshaper_8.safetensors" in res["coherence_note"] - assert res["checkpoint"] == "dreamshaper_8.safetensors" + assert "IMG_dreamshaper_8.safetensors" in res["coherence_note"] + assert res["checkpoint"] == "IMG_dreamshaper_8.safetensors" def test_one_asset_fails_others_survive(monkeypatch, tmp_path): diff --git a/python/functions/pipelines/comfyui_generate_character_set_oneshot.md b/python/functions/pipelines/comfyui_generate_character_set_oneshot.md index dddbc209..664c51d7 100644 --- a/python/functions/pipelines/comfyui_generate_character_set_oneshot.md +++ b/python/functions/pipelines/comfyui_generate_character_set_oneshot.md @@ -5,7 +5,7 @@ lang: py domain: pipelines version: "1.0.0" purity: impure -signature: "def comfyui_generate_character_set_oneshot(character: str, *, style: str = \"game character, full body, clean background\", checkpoint: str = \"dreamshaper_8.safetensors\", base_kind: str = \"enemy_creature\", directions: int = 8, make_directional: bool = True, make_3d: bool = True, directional_model: str = \"sv3d\", elevation: float = 15.0, seed: int = 0, size: int = 512, directional_size: int | None = None, flatten_color: tuple = (255, 255, 255), variant_3d: str = \"mini\", lora: str | None = None, lora_strength: float = 1.0, server: str = \"http://127.0.0.1:8188\", export_godot: str | None = None, out_dir: str | None = None, wait_timeout: float = 600.0, free_vram: bool = True, godot_bin: str | None = None) -> dict" +signature: "def comfyui_generate_character_set_oneshot(character: str, *, style: str = \"game character, full body, clean background\", checkpoint: str = \"IMG_dreamshaper_8.safetensors\", base_kind: str = \"enemy_creature\", directions: int = 8, make_directional: bool = True, make_3d: bool = True, directional_model: str = \"sv3d\", elevation: float = 15.0, seed: int = 0, size: int = 512, directional_size: int | None = None, flatten_color: tuple = (255, 255, 255), variant_3d: str = \"mini\", lora: str | None = None, lora_strength: float = 1.0, server: str = \"http://127.0.0.1:8188\", export_godot: str | None = None, out_dir: str | None = None, wait_timeout: float = 600.0, free_vram: bool = True, godot_bin: str | None = None) -> dict" description: "Culminacion del grupo gamedev-2d: genera el set COMPLETO y coherente de UN personaje de juego de un solo tiro — (1) imagen base 2D recortada a alpha, (2) sprite direccional N-way (vistas 3D consistentes SV3D/Zero123) y (3) malla 3D .glb (Hunyuan3D-2). La CLAVE es la coherencia cross-frontera: la vista direccional y la malla 3D parten de la MISMA imagen base 2D aplanada, no de tres generaciones independientes, asi que las tres representaciones son del MISMO personaje con el mismo estilo (no tres personajes distintos). Promueve a UNA llamada la secuencia que hoy exige 4 funciones a mano (issue 0087). Compone: un builder de personaje (enemy_creature/portrait_avatar/topdown_sprite) + comfyui_flatten_alpha_on_color + comfyui_image_to_3d_oneshot + comfyui_build_directional_sprite_workflow + submit/wait/fetch + comfyui_export_asset_to_godot. Secuencial liberando VRAM (POST /free) entre los pasos pesados para caber en 8 GB; el 3D va antes que el direccional (SV3D es el de mayor pico). Un fallo aislado (p.ej. OOM en el 3D) NO aborta el resto: deja el set PARCIAL. Devuelve {ok, character, style, checkpoint, base_kind, seed, coherence_note, base_image, base_flat, base_prompt_id, directional, mesh, exported, steps, error}. Impuro: HTTP a ComfyUI + disco + (export) subprocess." tags: [gamedev-2d, pipelines, comfyui, ml, godot] uses_functions: [comfyui_build_enemy_creature_workflow_py_ml, comfyui_build_portrait_avatar_workflow_py_ml, comfyui_build_topdown_sprite_workflow_py_ml, comfyui_build_directional_sprite_workflow_py_ml, comfyui_flatten_alpha_on_color_py_ml, comfyui_submit_workflow_py_ml, comfyui_wait_result_py_ml, comfyui_fetch_output_image_py_ml, comfyui_image_to_3d_oneshot_py_pipelines, comfyui_export_asset_to_godot_py_pipelines] diff --git a/python/functions/pipelines/comfyui_generate_character_set_oneshot.py b/python/functions/pipelines/comfyui_generate_character_set_oneshot.py index 9b79c23f..feb7efdb 100644 --- a/python/functions/pipelines/comfyui_generate_character_set_oneshot.py +++ b/python/functions/pipelines/comfyui_generate_character_set_oneshot.py @@ -180,7 +180,7 @@ def comfyui_generate_character_set_oneshot( character: str, *, style: str = "game character, full body, clean background", - checkpoint: str = "dreamshaper_8.safetensors", + checkpoint: str = "IMG_dreamshaper_8.safetensors", base_kind: str = "enemy_creature", directions: int = 8, make_directional: bool = True, diff --git a/python/functions/pipelines/comfyui_generate_character_set_oneshot_test.py b/python/functions/pipelines/comfyui_generate_character_set_oneshot_test.py index a3910a66..ce2c18e6 100644 --- a/python/functions/pipelines/comfyui_generate_character_set_oneshot_test.py +++ b/python/functions/pipelines/comfyui_generate_character_set_oneshot_test.py @@ -54,11 +54,11 @@ def test_nothing_to_generate_fails(): def test_base_builder_introspection_injects_coherence(): wf = _build_base_workflow( "enemy_creature", "armored paladin", - checkpoint="dreamshaper_8.safetensors", style="dark fantasy", + checkpoint="IMG_dreamshaper_8.safetensors", style="dark fantasy", size=512, seed=77, lora=None, lora_strength=1.0, ) blob = json.dumps(wf) - assert "dreamshaper_8.safetensors" in blob # checkpoint compartido + assert "IMG_dreamshaper_8.safetensors" in blob # checkpoint compartido assert "armored paladin" in blob # personaje assert "77" in blob # seed en el sampler # transparent=True -> el builder inyecta el nodo Rembg (base recortada a alpha) diff --git a/python/functions/pipelines/comfyui_generate_mixed_oneshot.md b/python/functions/pipelines/comfyui_generate_mixed_oneshot.md index eec314ed..8c0df4f7 100644 --- a/python/functions/pipelines/comfyui_generate_mixed_oneshot.md +++ b/python/functions/pipelines/comfyui_generate_mixed_oneshot.md @@ -62,7 +62,7 @@ from pipelines.comfyui_generate_mixed_oneshot import comfyui_generate_mixed_ones res = comfyui_generate_mixed_oneshot( "txt2img", "a heroic knight in 3d render style, dramatic lighting", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", capabilities={ "loras": [ {"name": "SD15_3d_render_redmond.safetensors", "strength_model": 0.9}, diff --git a/python/functions/pipelines/comfyui_generate_mixed_oneshot.py b/python/functions/pipelines/comfyui_generate_mixed_oneshot.py index 52362064..7ce98f83 100644 --- a/python/functions/pipelines/comfyui_generate_mixed_oneshot.py +++ b/python/functions/pipelines/comfyui_generate_mixed_oneshot.py @@ -207,7 +207,7 @@ if __name__ == "__main__": res = comfyui_generate_mixed_oneshot( "txt2img", "a heroic knight in 3d render style, dramatic lighting", - checkpoint="dreamshaper_8.safetensors", + checkpoint="IMG_dreamshaper_8.safetensors", capabilities={ "loras": [ {"name": "SD15_3d_render_redmond.safetensors", "strength_model": 0.9}, diff --git a/python/functions/pipelines/comfyui_generate_styled_asset_oneshot.md b/python/functions/pipelines/comfyui_generate_styled_asset_oneshot.md index 3b0b578b..0d951079 100644 --- a/python/functions/pipelines/comfyui_generate_styled_asset_oneshot.md +++ b/python/functions/pipelines/comfyui_generate_styled_asset_oneshot.md @@ -127,8 +127,8 @@ este pipeline lo recoge sin tocarse. invalido devuelve `ok=False` con error claro y `prompt_id == ""`. La parte pura es invocable sola con `styled_asset_build_only(...)` para inspeccionar el grafo y el post sin generar. -- **VRAM / OOM (RTX 3070 8 GB).** Los presets nuevos usan SD1.5 (dreamshaper_8) a 512 y caben - holgados; pixel-art-retro usa SDXL (juggernaut_xl_v11) a 768 y pica mas. Con modelos ya +- **VRAM / OOM (RTX 3070 8 GB).** Los presets nuevos usan SD1.5 (IMG_dreamshaper_8) a 512 y caben + holgados; pixel-art-retro usa SDXL (IMG_juggernaut_xl_v11) a 768 y pica mas. Con modelos ya cargados de otra tarea, pasa `free_vram=True` (hace `POST /free` antes de generar) o limpia tu mismo (`POST http://127.0.0.1:8188/free {"unload_models":true,"free_memory":true}`). Si hay OOM, baja la resolucion del preset o el `size` del builder via `builder_extra`; NO se diff --git a/python/functions/pipelines/comfyui_generate_styled_asset_oneshot_test.py b/python/functions/pipelines/comfyui_generate_styled_asset_oneshot_test.py index c28638c9..ee9386a3 100644 --- a/python/functions/pipelines/comfyui_generate_styled_asset_oneshot_test.py +++ b/python/functions/pipelines/comfyui_generate_styled_asset_oneshot_test.py @@ -55,7 +55,7 @@ def test_build_only_preset_drives_workflow(): built = styled_asset_build_only("item_icon", "knight character", "gameboy", seed=7) blob = json.dumps(built["workflow"]) # checkpoint del preset gameboy (SD1.5) - assert "dreamshaper_8.safetensors" in blob + assert "IMG_dreamshaper_8.safetensors" in blob # el subject combinó el sufijo del estilo gameboy assert "8-bit" in built["applied"]["subject"] # el style del preset SUSTITUYE el style categórico del builder diff --git a/python/functions/pipelines/comfyui_generate_with_skill_oneshot.md b/python/functions/pipelines/comfyui_generate_with_skill_oneshot.md index 6b7268e3..f74d9c44 100644 --- a/python/functions/pipelines/comfyui_generate_with_skill_oneshot.md +++ b/python/functions/pipelines/comfyui_generate_with_skill_oneshot.md @@ -89,5 +89,5 @@ variante con `recipe_patch`, compara `judge.score`, y si la variante gana llama cuanto los outputs están listos. - **Juez caído ≠ fallo fatal**: si el panel entero falla, la imagen ya está en disco; el resultado vuelve con `ok=True`, `judge=None` y `error` anotado. -- **OOM en 8GB**: si el server va corto de VRAM, usa una skill SD1.5 (`dreamshaper_8`) a resolución +- **OOM en 8GB**: si el server va corto de VRAM, usa una skill SD1.5 (`IMG_dreamshaper_8`) a resolución modesta; el error de OOM se propaga en `{ok:False, error}` sin reiniciar el server. diff --git a/python/functions/pipelines/comfyui_image_to_3d_oneshot.py b/python/functions/pipelines/comfyui_image_to_3d_oneshot.py index 138bc76a..f2a9d48d 100644 --- a/python/functions/pipelines/comfyui_image_to_3d_oneshot.py +++ b/python/functions/pipelines/comfyui_image_to_3d_oneshot.py @@ -38,9 +38,9 @@ from ml.comfyui_wait_result import comfyui_wait_result # variant -> nombre del checkpoint que espera ImageOnlyCheckpointLoader. _VARIANT_CKPT = { - "mini": "hunyuan3d-dit-v2-mini.safetensors", - "standard": "hunyuan3d-dit-v2-0.safetensors", - "mv": "hunyuan3d-dit-v2-mv.safetensors", + "mini": "3D_hunyuan3d-dit-v2-mini.safetensors", + "standard": "3D_hunyuan3d-dit-v2-0.safetensors", + "mv": "3D_hunyuan3d-dit-v2-mv.safetensors", } diff --git a/python/functions/pipelines/comfyui_replicate_civitai_oneshot.md b/python/functions/pipelines/comfyui_replicate_civitai_oneshot.md index 9af1b0b6..2eb3baac 100644 --- a/python/functions/pipelines/comfyui_replicate_civitai_oneshot.md +++ b/python/functions/pipelines/comfyui_replicate_civitai_oneshot.md @@ -57,7 +57,7 @@ from pipelines.comfyui_replicate_civitai_oneshot import comfyui_replicate_civita out = comfyui_replicate_civitai_oneshot("https://civitai.com/images/23526611") print(out["ok"], out["replica_image_path"]) print(out["source"]["family"], out["source"]["sampler_name"]) # flux euler -print(out["missing_models"]) # [{'kind':'checkpoint','name':'FLUX','substituted_with':'juggernaut_xl_v11.safetensors',...}] +print(out["missing_models"]) # [{'kind':'checkpoint','name':'FLUX','substituted_with':'IMG_juggernaut_xl_v11.safetensors',...}] print(out["judge"]["verdict"], round(out["judge"]["score"], 2)) # bad 4.74 (parecido aproximado sin el modelo exacto) ``` diff --git a/python/functions/pipelines/comfyui_replicate_civitai_oneshot_test.py b/python/functions/pipelines/comfyui_replicate_civitai_oneshot_test.py index 08345f03..2f0d74e1 100644 --- a/python/functions/pipelines/comfyui_replicate_civitai_oneshot_test.py +++ b/python/functions/pipelines/comfyui_replicate_civitai_oneshot_test.py @@ -30,18 +30,18 @@ def test_classify_input_image_modelversion_workflow_error(): def test_pick_checkpoint_familia_y_exacto(): - installed = ["dreamshaper_8.safetensors", "juggernaut_xl_v11.safetensors", - "v1-5-pruned-emaonly-fp16.safetensors", "svd.safetensors", - "hunyuan3d-dit-v2-mini.safetensors"] + installed = ["IMG_dreamshaper_8.safetensors", "IMG_juggernaut_xl_v11.safetensors", + "IMG_v1-5-pruned-emaonly-fp16.safetensors", "VIDEO_svd.safetensors", + "3D_hunyuan3d-dit-v2-mini.safetensors"] # familia sdxl -> elige el que tiene 'xl' ck, exact = _pick_checkpoint(installed, "sdxl", "algun_modelo_no_instalado") - assert ck == "juggernaut_xl_v11.safetensors" and exact is False + assert ck == "IMG_juggernaut_xl_v11.safetensors" and exact is False # familia sd15 -> evita los xl y los de video/3d ck, exact = _pick_checkpoint(installed, "sd15", "otro") assert "xl" not in ck.lower() and "svd" not in ck and exact is False # hint exacto instalado -> exact True - ck, exact = _pick_checkpoint(installed, "sd15", "dreamshaper_8") - assert ck == "dreamshaper_8.safetensors" and exact is True + ck, exact = _pick_checkpoint(installed, "sd15", "IMG_dreamshaper_8") + assert ck == "IMG_dreamshaper_8.safetensors" and exact is True def test_find_installed_match_normalizado(): diff --git a/python/functions/pipelines/comfyui_text_to_3d_oneshot.md b/python/functions/pipelines/comfyui_text_to_3d_oneshot.md index 9a437258..4af4e96e 100644 --- a/python/functions/pipelines/comfyui_text_to_3d_oneshot.md +++ b/python/functions/pipelines/comfyui_text_to_3d_oneshot.md @@ -5,7 +5,7 @@ lang: py domain: pipelines version: "1.0.0" purity: impure -signature: "def comfyui_text_to_3d_oneshot(prompt: str, *, server: str = \"127.0.0.1:8188\", ckpt_name: str = \"v1-5-pruned-emaonly.safetensors\", negative: str = \"\", textured: bool = False, variant: str = \"mini\", dest: str | None = None, image_wait_timeout: float = 300.0, wait_timeout: float = 600.0, **gen) -> dict" +signature: "def comfyui_text_to_3d_oneshot(prompt: str, *, server: str = \"127.0.0.1:8188\", ckpt_name: str = \"IMG_v1-5-pruned-emaonly-fp16.safetensors\", negative: str = \"\", textured: bool = False, variant: str = \"mini\", dest: str | None = None, image_wait_timeout: float = 300.0, wait_timeout: float = 600.0, **gen) -> dict" description: "Pipeline prompt de texto -> malla 3D GLB en una sola llamada. Genera una imagen desde texto con Stable Diffusion (txt2img), la sube al input/ del servidor y reconstruye una malla 3D desde ella (malla nativa Hunyuan3D-2 o, con textured=True, malla texturizada PBR multi-vista). Compone comfyui_build_txt2img_workflow + submit + wait + fetch_output_image + comfyui_build_image_to_3d_workflow (o comfyui_build_textured_3d_multiview_workflow) + submit + wait + comfyui_fetch_output_mesh. Reutiliza el helper de upload del pipeline hermano comfyui_image_to_3d_oneshot. Promocion de secuencia texto->imagen->3D (issue 0087). Impuro: HTTP + disco." tags: [comfyui, img-to-3d, pipelines, ml, stable-diffusion, hunyuan3d] uses_functions: @@ -28,7 +28,7 @@ params: - name: server desc: "host:port del servidor ComfyUI (sin esquema). keyword-only." - name: ckpt_name - desc: "Checkpoint Stable Diffusion para el txt2img (default SD1.5 v1-5-pruned-emaonly). keyword-only." + desc: "Checkpoint Stable Diffusion para el txt2img (default SD1.5 IMG_v1-5-pruned-emaonly-fp16). keyword-only." - name: negative desc: "Prompt negativo del txt2img. keyword-only." - name: textured diff --git a/python/functions/pipelines/comfyui_text_to_3d_oneshot.py b/python/functions/pipelines/comfyui_text_to_3d_oneshot.py index 9d9f72a4..44921a47 100644 --- a/python/functions/pipelines/comfyui_text_to_3d_oneshot.py +++ b/python/functions/pipelines/comfyui_text_to_3d_oneshot.py @@ -47,9 +47,9 @@ from pipelines.comfyui_image_to_3d_oneshot import _upload_image # variant -> nombre del checkpoint Hunyuan3D-2 para el paso 3D no texturizado. _VARIANT_CKPT = { - "mini": "hunyuan3d-dit-v2-mini.safetensors", - "standard": "hunyuan3d-dit-v2-0.safetensors", - "mv": "hunyuan3d-dit-v2-mv.safetensors", + "mini": "3D_hunyuan3d-dit-v2-mini.safetensors", + "standard": "3D_hunyuan3d-dit-v2-0.safetensors", + "mv": "3D_hunyuan3d-dit-v2-mv.safetensors", } # Claves de **gen que reenviamos a comfyui_build_txt2img_workflow; cualquier otra @@ -88,7 +88,7 @@ def comfyui_text_to_3d_oneshot( prompt: str, *, server: str = "127.0.0.1:8188", - ckpt_name: str = "v1-5-pruned-emaonly.safetensors", + ckpt_name: str = "IMG_v1-5-pruned-emaonly-fp16.safetensors", negative: str = "", textured: bool = False, variant: str = "mini", diff --git a/python/functions/pipelines/comfyui_txt2img_oneshot.md b/python/functions/pipelines/comfyui_txt2img_oneshot.md index 45c7da4a..7fe04944 100644 --- a/python/functions/pipelines/comfyui_txt2img_oneshot.md +++ b/python/functions/pipelines/comfyui_txt2img_oneshot.md @@ -5,7 +5,7 @@ lang: py domain: pipelines version: "1.0.0" purity: impure -signature: "def comfyui_txt2img_oneshot(prompt: str, *, ckpt: str = \"dreamshaper_8.safetensors\", negative: str = \"\", server: str = \"127.0.0.1:8188\", dest: str | None = None, wait_timeout: float = 300.0, **gen) -> dict" +signature: "def comfyui_txt2img_oneshot(prompt: str, *, ckpt: str = \"IMG_dreamshaper_8.safetensors\", negative: str = \"\", server: str = \"127.0.0.1:8188\", dest: str | None = None, wait_timeout: float = 300.0, **gen) -> dict" description: "Pipeline prompt de texto -> PNG en disco en una sola llamada. Construye el workflow txt2img de Stable Diffusion, lo encola en ComfyUI, espera y descarga la imagen. Compone comfyui_build_txt2img_workflow + comfyui_submit_workflow + comfyui_wait_result + comfyui_fetch_output_image. Promocion de secuencia (issue 0087). Impuro: HTTP + disco." tags: [comfyui, pipelines, txt2img, stable-diffusion, launcher] uses_functions: [comfyui_build_txt2img_workflow_py_ml, comfyui_submit_workflow_py_ml, comfyui_wait_result_py_ml, comfyui_fetch_output_image_py_ml] @@ -18,7 +18,7 @@ params: - name: prompt desc: "Prompt positivo (lo que se quiere ver en la imagen)." - name: ckpt - desc: "Checkpoint Stable Diffusion tal como lo ve el servidor (CheckpointLoaderSimple). Por defecto 'dreamshaper_8.safetensors'. keyword-only." + desc: "Checkpoint Stable Diffusion tal como lo ve el servidor (CheckpointLoaderSimple). Por defecto 'IMG_dreamshaper_8.safetensors'. keyword-only." - name: negative desc: "Prompt negativo. Por defecto ''. keyword-only." - name: server @@ -73,7 +73,7 @@ este pipeline ejecuta el camino básico end-to-end). - Impuro: requiere el **servidor ComfyUI vivo** en `server` (default `127.0.0.1:8188`). Si está caído, falla en el paso submit con el error de conexión. - `ckpt` debe existir en el servidor (CheckpointLoaderSimple). Default - `dreamshaper_8.safetensors`; cámbialo si usas SDXL u otro. + `IMG_dreamshaper_8.safetensors`; cámbialo si usas SDXL u otro. - `dest` es un **directorio** (se crea si no existe), no un nombre de archivo: el PNG conserva el nombre que le da ComfyUI (`_NNNNN_.png`). - `wait_timeout` por defecto 300 s. Subir resolución/steps puede requerir más; si diff --git a/python/functions/pipelines/comfyui_txt2img_oneshot.py b/python/functions/pipelines/comfyui_txt2img_oneshot.py index ffb0bc7e..d92b7163 100644 --- a/python/functions/pipelines/comfyui_txt2img_oneshot.py +++ b/python/functions/pipelines/comfyui_txt2img_oneshot.py @@ -31,7 +31,7 @@ from ml.comfyui_wait_result import comfyui_wait_result def comfyui_txt2img_oneshot( prompt: str, *, - ckpt: str = "dreamshaper_8.safetensors", + ckpt: str = "IMG_dreamshaper_8.safetensors", negative: str = "", server: str = "127.0.0.1:8188", dest: str | None = None, @@ -43,7 +43,7 @@ def comfyui_txt2img_oneshot( Args: prompt: prompt positivo (lo que se quiere ver en la imagen). ckpt: checkpoint Stable Diffusion tal como lo ve el servidor - (CheckpointLoaderSimple). Por defecto "dreamshaper_8.safetensors". + (CheckpointLoaderSimple). Por defecto "IMG_dreamshaper_8.safetensors". keyword-only. negative: prompt negativo. Por defecto "". keyword-only. server: host:port del servidor ComfyUI (sin esquema). keyword-only.