RioShiina commited on
Commit
4e82511
·
verified ·
1 Parent(s): 76aea54

Add Anima-3.8B architecture model.

Browse files
README.md CHANGED
@@ -98,6 +98,7 @@ models:
98
  - lightx2v/Qwen-Image-2512-Lightning
99
  - lightx2v/Qwen-Image-Edit-2511-Lightning
100
  - LyliaEngine/Pony_Diffusion_V6_XL
 
101
  - MIC-Lab/illustriousXLv0.1_controlnet
102
  - MIC-Lab/illustriousXLv1.1_controlnet
103
  - misri/hassakuXLIllustrious_v30
 
98
  - lightx2v/Qwen-Image-2512-Lightning
99
  - lightx2v/Qwen-Image-Edit-2511-Lightning
100
  - LyliaEngine/Pony_Diffusion_V6_XL
101
+ - lylogummy/Anima-3.8B
102
  - MIC-Lab/illustriousXLv0.1_controlnet
103
  - MIC-Lab/illustriousXLv1.1_controlnet
104
  - misri/hassakuXLIllustrious_v30
comfy_integration/setup.py CHANGED
@@ -88,6 +88,14 @@ def initialize_comfyui():
88
  else:
89
  print("✅ comfyui-krea2edit extension already exists.")
90
 
 
 
 
 
 
 
 
 
91
  print(f"✅ Current working directory is: {os.getcwd()}")
92
 
93
  import comfy.model_management
 
88
  else:
89
  print("✅ comfyui-krea2edit extension already exists.")
90
 
91
+ # 6. comfyui-anima-3-8B
92
+ anima_38b_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-anima-3-8B")
93
+ if not os.path.exists(anima_38b_nodes_path):
94
+ os.system(f"git clone https://github.com/GumGum10/comfyui-anima-3-8B.git {anima_38b_nodes_path}")
95
+ print("✅ comfyui-anima-3-8B extension cloned.")
96
+ else:
97
+ print("✅ comfyui-anima-3-8B extension already exists.")
98
+
99
  print(f"✅ Current working directory is: {os.getcwd()}")
100
 
101
  import comfy.model_management
core/pipelines/sd_image_pipeline.py CHANGED
@@ -190,6 +190,7 @@ class SdImagePipeline(BasePipeline):
190
  }
191
 
192
  if isinstance(path_or_components, dict):
 
193
  workflow_inputs.update({
194
  'unet_name': path_or_components.get('unet'),
195
  'unet_uncond_name': path_or_components.get('unet_uncond'),
@@ -200,6 +201,9 @@ class SdImagePipeline(BasePipeline):
200
  'clip3_name': path_or_components.get('clip3'),
201
  'clip4_name': path_or_components.get('clip4'),
202
  'lora_name': path_or_components.get('lora'),
 
 
 
203
  })
204
  else:
205
  workflow_inputs['model_name'] = path_or_components
 
190
  }
191
 
192
  if isinstance(path_or_components, dict):
193
+ workflow_inputs.update(path_or_components)
194
  workflow_inputs.update({
195
  'unet_name': path_or_components.get('unet'),
196
  'unet_uncond_name': path_or_components.get('unet_uncond'),
 
201
  'clip3_name': path_or_components.get('clip3'),
202
  'clip4_name': path_or_components.get('clip4'),
203
  'lora_name': path_or_components.get('lora'),
204
+ 'qwen35_model': path_or_components.get('qwen35_model'),
205
+ 'adapter_name': path_or_components.get('adapter_name'),
206
+ 'adapter_strength': path_or_components.get('adapter_strength', 1.0),
207
  })
208
  else:
209
  workflow_inputs['model_name'] = path_or_components
core/pipelines/workflow_recipes/_partials/conditioning/anima-3.8b.yaml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ nodes:
2
+ unet_loader:
3
+ class_type: UNETLoader
4
+ title: "Load Diffusion Model"
5
+ params:
6
+ weight_dtype: "default"
7
+ clip_loader:
8
+ class_type: CLIPLoader
9
+ title: "Load CLIP"
10
+ params:
11
+ type: "stable_diffusion"
12
+ device: "default"
13
+ qwen35_loader:
14
+ class_type: AnimaQwen35Loader
15
+ title: "Load Anima Qwen35"
16
+ unified_prompt:
17
+ class_type: AnimaQwen35UnifiedPrompt
18
+ title: "Anima Qwen35 Unified Prompt"
19
+ params:
20
+ adapter_name: "Anima-3.8B-expanded_adapter.safetensors"
21
+ adapter_strength: 1.0
22
+ neg_prompt:
23
+ class_type: CLIPTextEncode
24
+ title: "CLIP Text Encode (Negative)"
25
+ vae_loader:
26
+ class_type: VAELoader
27
+ title: "Load VAE"
28
+
29
+ connections:
30
+ - from: "unet_loader:0"
31
+ to: "ksampler:model"
32
+ - from: "unet_loader:0"
33
+ to: "unified_prompt:model"
34
+ - from: "clip_loader:0"
35
+ to: "unified_prompt:native_clip"
36
+ - from: "qwen35_loader:0"
37
+ to: "unified_prompt:qwen35_clip"
38
+ - from: "clip_loader:0"
39
+ to: "neg_prompt:clip"
40
+ - from: "unified_prompt:0"
41
+ to: "ksampler:positive"
42
+ - from: "neg_prompt:0"
43
+ to: "ksampler:negative"
44
+ - from: "vae_loader:0"
45
+ to: "vae_decode:vae"
46
+ - from: "vae_loader:0"
47
+ to: "vae_encode:vae"
48
+
49
+ dynamic_lora_chains:
50
+ lora_chain:
51
+ template: "LoraLoader"
52
+ output_map:
53
+ "unet_loader:0": "model"
54
+ "clip_loader:0": "clip"
55
+ input_map:
56
+ "model": "model"
57
+ "clip": "clip"
58
+ end_input_map:
59
+ "model": ["ksampler:model", "unified_prompt:model"]
60
+ "clip": ["unified_prompt:native_clip", "neg_prompt:clip"]
61
+
62
+ dynamic_anima_controlnet_lllite_chains:
63
+ anima_controlnet_lllite_chain:
64
+ ksampler_node: "ksampler"
65
+
66
+ dynamic_conditioning_chains:
67
+ conditioning_chain:
68
+ ksampler_node: "ksampler"
69
+ clip_source: "clip_loader:0"
70
+
71
+ dynamic_pid_chains:
72
+ pid_chain:
73
+ ksampler_node: "ksampler"
74
+
75
+ ui_map:
76
+ positive_prompt: "unified_prompt:prompt"
77
+ negative_prompt: "neg_prompt:text"
78
+ unet_name: "unet_loader:unet_name"
79
+ clip_name: "clip_loader:clip_name"
80
+ qwen35_model: "qwen35_loader:qwen35_model"
81
+ adapter_name: "unified_prompt:adapter_name"
82
+ adapter_strength: "unified_prompt:adapter_strength"
83
+ vae_name: "vae_loader:vae_name"
mcp_tools/common.py CHANGED
@@ -166,8 +166,7 @@ _COMMON_OPTIONAL_INPUTS_SCHEMA = {
166
  "type": "integer",
167
  "default": 60,
168
  "minimum": 1,
169
- "maximum": 120,
170
- "description": "GPU execution time quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60, maximum: 120)."
171
  },
172
  "steps": {
173
  "type": "integer",
 
166
  "type": "integer",
167
  "default": 60,
168
  "minimum": 1,
169
+ "description": "GPU execution time quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60)."
 
170
  },
171
  "steps": {
172
  "type": "integer",
mcp_tools/mcp_gradio_integration.py CHANGED
@@ -116,7 +116,7 @@ def register_high_level_mcp_apis(demo):
116
  OPTIONAL CONTROL PARAMETERS:
117
  - seed (int): Random seed (-1 for random, >=0 for deterministic reproducibility). Default: -1.
118
  - batch_size (int): Number of images generated per batch (1 to 16). Default: 1.
119
- - zero_gpu_duration (int): GPU quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60, max: 120).
120
  - negative_prompt (str): Text prompt specifying elements to avoid.
121
 
122
  IMPORTANT FORMAT RULES FOR 'chain':
 
116
  OPTIONAL CONTROL PARAMETERS:
117
  - seed (int): Random seed (-1 for random, >=0 for deterministic reproducibility). Default: -1.
118
  - batch_size (int): Number of images generated per batch (1 to 16). Default: 1.
119
+ - zero_gpu_duration (int): GPU quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60).
120
  - negative_prompt (str): Text prompt specifying elements to avoid.
121
 
122
  IMPORTANT FORMAT RULES FOR 'chain':
mcp_tools/run.py CHANGED
@@ -23,7 +23,7 @@ def handle_run(params: dict) -> dict:
23
  [OPTIONAL CONTROL PARAMETERS]
24
  - seed (int): Random seed for generation. Default: -1 (random seed). Specify >=0 for deterministic reproducibility.
25
  - batch_size (int): Number of images generated in a single batch (1 to 16, default: 1).
26
- - zero_gpu_duration (int): GPU quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60, max: 120).
27
  - negative_prompt (str): Text prompt specifying undesirable elements to avoid.
28
  - steps (int), cfg (float), sampler (str), scheduler (str): Inference hyperparams (auto-applied from model defaults if omitted).
29
 
 
23
  [OPTIONAL CONTROL PARAMETERS]
24
  - seed (int): Random seed for generation. Default: -1 (random seed). Specify >=0 for deterministic reproducibility.
25
  - batch_size (int): Number of images generated in a single batch (1 to 16, default: 1).
26
+ - zero_gpu_duration (int): GPU quota allocation in seconds on HuggingFace ZeroGPU spaces (default: 60).
27
  - negative_prompt (str): Text prompt specifying undesirable elements to avoid.
28
  - steps (int), cfg (float), sampler (str), scheduler (str): Inference hyperparams (auto-applied from model defaults if omitted).
29
 
ui/imagegen_ui.py CHANGED
@@ -164,7 +164,7 @@ def create_ui():
164
  components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
165
  components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
166
  with gr.Row():
167
- components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")
168
 
169
  with gr.Column(scale=1):
170
  components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)
 
164
  components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
165
  components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
166
  with gr.Row():
167
+ components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")
168
 
169
  with gr.Column(scale=1):
170
  components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)
ui/shared/ui_components.py CHANGED
@@ -114,7 +114,7 @@ def create_base_parameter_ui(prefix, defaults=None):
114
  components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
115
  components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
116
  with gr.Row():
117
- components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")
118
 
119
  return components
120
 
 
114
  components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
115
  components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
116
  with gr.Row():
117
+ components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s", info="Optional: Set how long to reserve the GPU.")
118
 
119
  return components
120
 
utils/app_utils.py CHANGED
@@ -649,7 +649,16 @@ def get_model_generation_defaults(model_display_name: str, model_type: str, defa
649
  if 'Default' in defaults_config:
650
  final_defaults.update(defaults_config['Default'])
651
 
652
- model_type_key = next((key for key in defaults_config if key.lower().replace(" ", "-").replace(".", "") == model_type.lower()), None)
 
 
 
 
 
 
 
 
 
653
  if model_type_key:
654
  model_type_config = defaults_config[model_type_key]
655
  if '_defaults' in model_type_config:
 
649
  if 'Default' in defaults_config:
650
  final_defaults.update(defaults_config['Default'])
651
 
652
+ def _norm(s):
653
+ return str(s).lower().replace(" ", "-").replace(".", "")
654
+
655
+ norm_type = _norm(model_type)
656
+ model_type_key = next((
657
+ key for key in defaults_config
658
+ if key.lower() == model_type.lower()
659
+ or _norm(key) == norm_type
660
+ or _norm(key) == model_type.lower()
661
+ ), None)
662
  if model_type_key:
663
  model_type_config = defaults_config[model_type_key]
664
  if '_defaults' in model_type_config:
yaml/constants.yaml CHANGED
@@ -119,6 +119,14 @@ RESOLUTION_MAP:
119
  "3:4 (Classic Portrait)": [896, 1152]
120
  "3:2 (Photography)": [1216, 832]
121
  "2:3 (Photography Portrait)": [832, 1216]
 
 
 
 
 
 
 
 
122
  anima:
123
  "1:1 (Square)": [1024, 1024]
124
  "16:9 (Landscape)": [1344, 768]
@@ -263,6 +271,7 @@ MULTIPLIERS_MAP:
263
  qwen-image: 1
264
  longcat-image: 1
265
  cosmos-predict2: 1
 
266
  anima: 1
267
  newbie-image: 1
268
  kandinsky-5: 32
 
119
  "3:4 (Classic Portrait)": [896, 1152]
120
  "3:2 (Photography)": [1216, 832]
121
  "2:3 (Photography Portrait)": [832, 1216]
122
+ anima-3.8b:
123
+ "1:1 (Square)": [1024, 1024]
124
+ "16:9 (Landscape)": [1344, 768]
125
+ "9:16 (Portrait)": [768, 1344]
126
+ "4:3 (Classic)": [1152, 896]
127
+ "3:4 (Classic Portrait)": [896, 1152]
128
+ "3:2 (Photography)": [1216, 832]
129
+ "2:3 (Photography Portrait)": [832, 1216]
130
  anima:
131
  "1:1 (Square)": [1024, 1024]
132
  "16:9 (Landscape)": [1344, 768]
 
271
  qwen-image: 1
272
  longcat-image: 1
273
  cosmos-predict2: 1
274
+ anima-3.8b: 1
275
  anima: 1
276
  newbie-image: 1
277
  kandinsky-5: 32
yaml/file_list.yaml CHANGED
@@ -509,6 +509,11 @@ file:
509
  source: "hf"
510
  repo_id: "nvidia/Cosmos-Predict2-14B-Text2Image"
511
  repository_file_path: "model.pt"
 
 
 
 
 
512
  # Anima
513
  - filename: "anima-turbo-v1.0.safetensors"
514
  source: "hf"
@@ -888,6 +893,15 @@ file:
888
  source: "hf"
889
  repo_id: "Comfy-Org/Lens"
890
  repository_file_path: "text_encoders/gpt_oss_20b_nvfp4.safetensors"
 
 
 
 
 
 
 
 
 
891
  # Anima
892
  - filename: "qwen_3_06b_base.safetensors"
893
  source: "hf"
 
509
  source: "hf"
510
  repo_id: "nvidia/Cosmos-Predict2-14B-Text2Image"
511
  repository_file_path: "model.pt"
512
+ # Anima-3.8B
513
+ - filename: "Anima-3.8B.safetensors"
514
+ source: "hf"
515
+ repo_id: "lylogummy/Anima-3.8B"
516
+ repository_file_path: "difussion_models/Anima-3.8B.safetensors"
517
  # Anima
518
  - filename: "anima-turbo-v1.0.safetensors"
519
  source: "hf"
 
893
  source: "hf"
894
  repo_id: "Comfy-Org/Lens"
895
  repository_file_path: "text_encoders/gpt_oss_20b_nvfp4.safetensors"
896
+ # Anima-3.8B
897
+ - filename: "qwen35_4b.safetensors"
898
+ source: "hf"
899
+ repo_id: "lylogummy/Anima-3.8B"
900
+ repository_file_path: "text_encoders/qwen35_4b.safetensors"
901
+ - filename: "Anima-3.8B-expanded_adapter.safetensors"
902
+ source: "hf"
903
+ repo_id: "lylogummy/Anima-3.8B"
904
+ repository_file_path: "text_encoders/Anima-3.8B-expanded_adapter.safetensors"
905
  # Anima
906
  - filename: "qwen_3_06b_base.safetensors"
907
  source: "hf"
yaml/model_architecture_features.yaml CHANGED
@@ -84,6 +84,14 @@ cosmos-predict2:
84
  - conditioning
85
  - vae
86
 
 
 
 
 
 
 
 
 
87
  anima:
88
  enabled_chains:
89
  - lora
 
84
  - conditioning
85
  - vae
86
 
87
+ anima-3.8b:
88
+ enabled_chains:
89
+ - lora
90
+ - conditioning
91
+ - anima_controlnet_lllite
92
+ - vae
93
+ - pid
94
+
95
  anima:
96
  enabled_chains:
97
  - lora
yaml/model_architectures.yaml CHANGED
@@ -13,6 +13,7 @@ architecture_order:
13
  - "Qwen-Image"
14
  - "LongCat-Image"
15
  - "Cosmos-Predict2"
 
16
  - "Anima"
17
  - "NewBie-Image"
18
  - "Kandinsky-5"
@@ -65,6 +66,9 @@ architectures:
65
  "Cosmos-Predict2":
66
  model_type: "cosmos-predict2"
67
  controlnet_key: "Cosmos-Predict2"
 
 
 
68
  "Anima":
69
  model_type: "anima"
70
  controlnet_key: "Anima"
 
13
  - "Qwen-Image"
14
  - "LongCat-Image"
15
  - "Cosmos-Predict2"
16
+ - "Anima-3.8B"
17
  - "Anima"
18
  - "NewBie-Image"
19
  - "Kandinsky-5"
 
66
  "Cosmos-Predict2":
67
  model_type: "cosmos-predict2"
68
  controlnet_key: "Cosmos-Predict2"
69
+ "Anima-3.8B":
70
+ model_type: "anima-3.8b"
71
+ controlnet_key: "Anima"
72
  "Anima":
73
  model_type: "anima"
74
  controlnet_key: "Anima"
yaml/model_defaults.yaml CHANGED
@@ -152,6 +152,16 @@ Cosmos-Predict2:
152
  sampler_name: "euler"
153
  scheduler: "karras"
154
 
 
 
 
 
 
 
 
 
 
 
155
  Anima:
156
  _defaults:
157
  steps: 30
 
152
  sampler_name: "euler"
153
  scheduler: "karras"
154
 
155
+ Anima-3.8B:
156
+ _defaults:
157
+ steps: 32
158
+ cfg: 7.5
159
+ sampler_name: "res_multistep"
160
+ scheduler: "beta"
161
+ positive_prompt: "masterpiece, best quality, high quality, newest, year 2025, year 2024, \nDescription:\n"
162
+ negative_prompt: "worst quality, low quality, score_1, score_2, score_3, blurry, jpeg artifacts, sepia"
163
+ filename_prefix: "anima_3_8b"
164
+
165
  Anima:
166
  _defaults:
167
  steps: 30
yaml/model_list.yaml CHANGED
@@ -232,6 +232,16 @@ Checkpoint:
232
  unet: "cosmos_predict2_14B_t2i.pt"
233
  clip: "oldt5_xxl_fp8_e4m3fn_scaled.safetensors"
234
  vae: "wan_2.1_vae.safetensors"
 
 
 
 
 
 
 
 
 
 
235
  Anima:
236
  latent_type: latent
237
  models:
 
232
  unet: "cosmos_predict2_14B_t2i.pt"
233
  clip: "oldt5_xxl_fp8_e4m3fn_scaled.safetensors"
234
  vae: "wan_2.1_vae.safetensors"
235
+ Anima-3.8B:
236
+ latent_type: sd3_latent
237
+ models:
238
+ - display_name: "lylogummy/Anima-3.8B"
239
+ components:
240
+ unet: "Anima-3.8B.safetensors"
241
+ clip: "qwen_3_06b_base.safetensors"
242
+ qwen35_model: "qwen35_4b.safetensors"
243
+ adapter_name: "Anima-3.8B-expanded_adapter.safetensors"
244
+ vae: "qwen_image_vae.safetensors"
245
  Anima:
246
  latent_type: latent
247
  models:
yaml/pid.yaml CHANGED
@@ -4,7 +4,7 @@ PiD:
4
  architectures: ["flux2", "flux2-kv", "ideogram-4", "lens", "ernie-image"]
5
  - filepath: "pid_1.5_qwenimage_1024_to_4096_4step_int8_convrot.safetensors"
6
  latent_format: "qwenimage"
7
- architectures: ["anima", "qwen-image", "krea-2"]
8
  - filepath: "pid_1.5_flux1_1024_to_4096_4step_int8_convrot.safetensors"
9
  latent_format: "flux"
10
  architectures: ["longcat-image", "newbie-image", "z-image", "kandinsky-5", "ovis-image", "omnigen2", "chroma1", "hidream-i1", "flux1", "boogu-image"]
 
4
  architectures: ["flux2", "flux2-kv", "ideogram-4", "lens", "ernie-image"]
5
  - filepath: "pid_1.5_qwenimage_1024_to_4096_4step_int8_convrot.safetensors"
6
  latent_format: "qwenimage"
7
+ architectures: ["anima", "anima-3.8b", "qwen-image", "krea-2"]
8
  - filepath: "pid_1.5_flux1_1024_to_4096_4step_int8_convrot.safetensors"
9
  latent_format: "flux"
10
  architectures: ["longcat-image", "newbie-image", "z-image", "kandinsky-5", "ovis-image", "omnigen2", "chroma1", "hidream-i1", "flux1", "boogu-image"]