Text-to-Image
MLX
Safetensors
Diffusion Single File
Anima-mlx / anima_mlx /runtime /workflow.py
fukujusou's picture
Upload folder using huggingface_hub
3bdc93d verified
Raw
History Blame Contribute Delete
1.79 kB
"""Baseline workflow settings derived from Anima's official ComfyUI material."""
from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class WorkflowSpec:
diffusion_model: str
text_encoder: str
vae: str
positive_prompt: str
negative_prompt: str
width: int
height: int
batch_size: int
seed: int
steps: int
cfg: float
sampler_name: str
scheduler: str
denoise: float
flow_shift: float
flow_multiplier: float
@property
def latent_height(self) -> int:
return self.height // 8
@property
def latent_width(self) -> int:
return self.width // 8
@property
def latent_shape_2d(self) -> tuple[int, int, int, int]:
return (self.batch_size, 16, self.latent_height, self.latent_width)
@property
def comfy_empty_latent_shape(self) -> tuple[int, int, int, int]:
return (self.batch_size, 4, self.latent_height, self.latent_width)
DEFAULT_WORKFLOW_SPEC = WorkflowSpec(
diffusion_model="anima-base-v1.0-mlx.safetensors",
text_encoder="qwen_3_06b_base-mlx.safetensors",
vae="qwen_image_vae-mlx.safetensors",
positive_prompt=(
"masterpiece, best quality, score_7, safe, 1girl, fern "
"\\(sousou no frieren\\), sousou no frieren, @izei1337, "
"purple hair, black robe, white dress, butterfly on hand, "
"purple eyes, looking at viewer, simple background"
),
negative_prompt="worst quality, low quality, score_1, score_2, score_3, blurry, jpeg artifacts",
width=896,
height=1152,
batch_size=1,
seed=807_882_066_116_956,
steps=30,
cfg=4.0,
sampler_name="er_sde",
scheduler="simple",
denoise=1.0,
flow_shift=3.0,
flow_multiplier=1.0,
)