vibe-aigc 0.6.2__tar.gz → 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {vibe_aigc-0.6.2/vibe_aigc.egg-info → vibe_aigc-0.6.3}/PKG-INFO +1 -1
  2. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/pyproject.toml +1 -1
  3. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/tools.py +14 -2
  4. vibe_aigc-0.6.3/vibe_aigc/tools_comfyui.py +271 -0
  5. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3/vibe_aigc.egg-info}/PKG-INFO +1 -1
  6. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc.egg-info/SOURCES.txt +1 -0
  7. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/LICENSE +0 -0
  8. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/README.md +0 -0
  9. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/setup.cfg +0 -0
  10. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_adaptive_replanning.py +0 -0
  11. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_agents.py +0 -0
  12. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_assets.py +0 -0
  13. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_auto_checkpoint.py +0 -0
  14. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_automatic_checkpoints.py +0 -0
  15. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_checkpoint_serialization.py +0 -0
  16. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_error_handling.py +0 -0
  17. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_executor.py +0 -0
  18. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_feedback_system.py +0 -0
  19. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_integration.py +0 -0
  20. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_knowledge_base.py +0 -0
  21. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_metaplanner_resume.py +0 -0
  22. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_metaplanner_visualization.py +0 -0
  23. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_models.py +0 -0
  24. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_parallel_execution.py +0 -0
  25. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_planner.py +0 -0
  26. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_progress_callbacks.py +0 -0
  27. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_tools.py +0 -0
  28. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_visualization.py +0 -0
  29. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/tests/test_workflow_resume.py +0 -0
  30. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/__init__.py +0 -0
  31. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/agents.py +0 -0
  32. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/assets.py +0 -0
  33. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/audio.py +0 -0
  34. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/character.py +0 -0
  35. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/cli.py +0 -0
  36. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/comfyui.py +0 -0
  37. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/composer_general.py +0 -0
  38. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/discovery.py +0 -0
  39. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/executor.py +0 -0
  40. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/fidelity.py +0 -0
  41. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/knowledge.py +0 -0
  42. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/llm.py +0 -0
  43. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/model_registry.py +0 -0
  44. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/models.py +0 -0
  45. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/mv_pipeline.py +0 -0
  46. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/persistence.py +0 -0
  47. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/planner.py +0 -0
  48. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/tools_multimodal.py +0 -0
  49. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/vibe_backend.py +0 -0
  50. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/video.py +0 -0
  51. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/visualization.py +0 -0
  52. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/vlm_feedback.py +0 -0
  53. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflow_backend.py +0 -0
  54. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflow_composer.py +0 -0
  55. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflow_executor.py +0 -0
  56. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflow_registry.py +0 -0
  57. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflow_strategies.py +0 -0
  58. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc/workflows.py +0 -0
  59. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc.egg-info/dependency_links.txt +0 -0
  60. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc.egg-info/entry_points.txt +0 -0
  61. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc.egg-info/requires.txt +0 -0
  62. {vibe_aigc-0.6.2 → vibe_aigc-0.6.3}/vibe_aigc.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibe-aigc
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: A New Paradigm for Content Generation via Agentic Orchestration
5
5
  Author: Vibe AIGC Contributors
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ exclude = ["tests*", "docs*", "examples*", "landing*"]
8
8
 
9
9
  [project]
10
10
  name = "vibe-aigc"
11
- version = "0.6.2"
11
+ version = "0.6.3"
12
12
  description = "A New Paradigm for Content Generation via Agentic Orchestration"
13
13
  authors = [{name = "Vibe AIGC Contributors"}]
14
14
  license = "MIT"
@@ -496,8 +496,12 @@ class ToolRegistry:
496
496
  return "\n".join(lines)
497
497
 
498
498
 
499
- def create_default_registry() -> ToolRegistry:
500
- """Create a registry with default tools."""
499
+ def create_default_registry(comfyui_url: str = "http://127.0.0.1:8188") -> ToolRegistry:
500
+ """Create a registry with default tools.
501
+
502
+ Args:
503
+ comfyui_url: URL for ComfyUI server (for image/video generation)
504
+ """
501
505
  registry = ToolRegistry()
502
506
 
503
507
  # Register built-in tools
@@ -505,4 +509,12 @@ def create_default_registry() -> ToolRegistry:
505
509
  registry.register(TemplateTool())
506
510
  registry.register(CombineTool())
507
511
 
512
+ # Register ComfyUI-based generation tools (Paper Section 5.4)
513
+ try:
514
+ from .tools_comfyui import create_comfyui_tools
515
+ for tool in create_comfyui_tools(comfyui_url):
516
+ registry.register(tool)
517
+ except ImportError:
518
+ pass # ComfyUI tools optional
519
+
508
520
  return registry
@@ -0,0 +1,271 @@
1
+ """
2
+ ComfyUI Generation Tools - Image and Video Generation via VibeBackend.
3
+
4
+ Integrates the VibeBackend into the Paper's tool architecture (Section 5.4):
5
+ "The Planner traverses the system's atomic tool library...to select
6
+ the optimal ensemble of components."
7
+
8
+ This makes ComfyUI-based generation available to MetaPlanner as atomic tools.
9
+ """
10
+
11
+ from typing import Dict, Any, Optional
12
+ from dataclasses import dataclass
13
+
14
+ from .tools import BaseTool, ToolSpec, ToolResult, ToolCategory
15
+ from .vibe_backend import VibeBackend, GenerationRequest, GenerationResult
16
+ from .discovery import Capability
17
+
18
+
19
+ class ImageGenerationTool(BaseTool):
20
+ """
21
+ Image generation tool using local ComfyUI.
22
+
23
+ Maps high-level image requests to VibeBackend execution.
24
+ MetaPlanner can use this for visual content generation.
25
+ """
26
+
27
+ def __init__(self, comfyui_url: str = "http://127.0.0.1:8188"):
28
+ self.comfyui_url = comfyui_url
29
+ self._backend: Optional[VibeBackend] = None
30
+
31
+ @property
32
+ def spec(self) -> ToolSpec:
33
+ return ToolSpec(
34
+ name="image_generation",
35
+ description="Generate images using local AI models (FLUX, SD, etc.)",
36
+ category=ToolCategory.IMAGE,
37
+ input_schema={
38
+ "type": "object",
39
+ "required": ["prompt"],
40
+ "properties": {
41
+ "prompt": {"type": "string", "description": "Image description"},
42
+ "negative_prompt": {"type": "string", "description": "What to avoid"},
43
+ "style": {"type": "string", "description": "Visual style hints"},
44
+ "width": {"type": "integer", "default": 768},
45
+ "height": {"type": "integer", "default": 512},
46
+ "steps": {"type": "integer", "default": 20},
47
+ "cfg": {"type": "number", "default": 7.0}
48
+ }
49
+ },
50
+ output_schema={
51
+ "type": "object",
52
+ "properties": {
53
+ "image_url": {"type": "string"},
54
+ "quality_score": {"type": "number"},
55
+ "feedback": {"type": "string"}
56
+ }
57
+ },
58
+ examples=[
59
+ {
60
+ "input": {"prompt": "cyberpunk cityscape at night, neon lights, rain"},
61
+ "output": {"image_url": "http://...", "quality_score": 7.5}
62
+ }
63
+ ]
64
+ )
65
+
66
+ async def _ensure_backend(self) -> VibeBackend:
67
+ """Lazily initialize backend."""
68
+ if self._backend is None:
69
+ self._backend = VibeBackend(
70
+ comfyui_url=self.comfyui_url,
71
+ enable_vlm=True,
72
+ max_attempts=2,
73
+ quality_threshold=6.0
74
+ )
75
+ await self._backend.initialize()
76
+ return self._backend
77
+
78
+ async def execute(
79
+ self,
80
+ inputs: Dict[str, Any],
81
+ context: Optional[Dict[str, Any]] = None
82
+ ) -> ToolResult:
83
+ """Generate an image based on inputs."""
84
+ try:
85
+ backend = await self._ensure_backend()
86
+
87
+ # Build prompt from inputs + context (knowledge base hints)
88
+ prompt = inputs.get("prompt", "")
89
+ style = inputs.get("style", "")
90
+
91
+ # If knowledge base provided style hints, incorporate them
92
+ if context and "technical_specs" in context:
93
+ specs = context["technical_specs"]
94
+ if "lighting" in specs:
95
+ prompt += f", {', '.join(specs['lighting'])}"
96
+ if "color_grading" in specs:
97
+ prompt += f", {specs['color_grading']}"
98
+
99
+ if style:
100
+ prompt = f"{prompt}, {style}"
101
+
102
+ result = await backend.generate(GenerationRequest(
103
+ prompt=prompt,
104
+ capability=Capability.TEXT_TO_IMAGE,
105
+ negative_prompt=inputs.get("negative_prompt", ""),
106
+ width=inputs.get("width", 768),
107
+ height=inputs.get("height", 512),
108
+ steps=inputs.get("steps", 20),
109
+ cfg=inputs.get("cfg", 7.0)
110
+ ))
111
+
112
+ if result.success:
113
+ return ToolResult(
114
+ success=True,
115
+ output={
116
+ "image_url": result.output_url,
117
+ "quality_score": result.quality_score,
118
+ "feedback": result.feedback,
119
+ "strengths": result.strengths,
120
+ "weaknesses": result.weaknesses
121
+ },
122
+ metadata={
123
+ "model_used": result.model_used,
124
+ "attempts": result.attempts
125
+ }
126
+ )
127
+ else:
128
+ return ToolResult(
129
+ success=False,
130
+ output=None,
131
+ error=result.error
132
+ )
133
+ except Exception as e:
134
+ return ToolResult(
135
+ success=False,
136
+ output=None,
137
+ error=str(e)
138
+ )
139
+
140
+
141
+ class VideoGenerationTool(BaseTool):
142
+ """
143
+ Video generation tool using local ComfyUI.
144
+
145
+ Uses the I2V pipeline: FLUX → Wan I2V animation.
146
+ MetaPlanner can use this for motion content.
147
+ """
148
+
149
+ def __init__(self, comfyui_url: str = "http://127.0.0.1:8188"):
150
+ self.comfyui_url = comfyui_url
151
+ self._backend: Optional[VibeBackend] = None
152
+
153
+ @property
154
+ def spec(self) -> ToolSpec:
155
+ return ToolSpec(
156
+ name="video_generation",
157
+ description="Generate videos using local AI models (FLUX + Wan I2V)",
158
+ category=ToolCategory.VIDEO,
159
+ input_schema={
160
+ "type": "object",
161
+ "required": ["prompt"],
162
+ "properties": {
163
+ "prompt": {"type": "string", "description": "Video description"},
164
+ "negative_prompt": {"type": "string", "description": "What to avoid"},
165
+ "style": {"type": "string", "description": "Visual style hints"},
166
+ "motion": {"type": "string", "description": "Motion description"},
167
+ "width": {"type": "integer", "default": 832},
168
+ "height": {"type": "integer", "default": 480},
169
+ "frames": {"type": "integer", "default": 33},
170
+ "fps": {"type": "integer", "default": 16}
171
+ }
172
+ },
173
+ output_schema={
174
+ "type": "object",
175
+ "properties": {
176
+ "video_url": {"type": "string"},
177
+ "duration_seconds": {"type": "number"}
178
+ }
179
+ },
180
+ examples=[
181
+ {
182
+ "input": {"prompt": "samurai walking through rain", "frames": 33},
183
+ "output": {"video_url": "http://...", "duration_seconds": 2.0}
184
+ }
185
+ ]
186
+ )
187
+
188
+ async def _ensure_backend(self) -> VibeBackend:
189
+ """Lazily initialize backend."""
190
+ if self._backend is None:
191
+ self._backend = VibeBackend(
192
+ comfyui_url=self.comfyui_url,
193
+ enable_vlm=False, # VLM slower for video
194
+ max_attempts=1
195
+ )
196
+ await self._backend.initialize()
197
+ return self._backend
198
+
199
+ async def execute(
200
+ self,
201
+ inputs: Dict[str, Any],
202
+ context: Optional[Dict[str, Any]] = None
203
+ ) -> ToolResult:
204
+ """Generate a video based on inputs."""
205
+ try:
206
+ backend = await self._ensure_backend()
207
+
208
+ # Build prompt
209
+ prompt = inputs.get("prompt", "")
210
+ style = inputs.get("style", "")
211
+ motion = inputs.get("motion", "")
212
+
213
+ # Incorporate knowledge base hints
214
+ if context and "technical_specs" in context:
215
+ specs = context["technical_specs"]
216
+ if "camera" in specs:
217
+ prompt += f", {', '.join(specs['camera'][:2])}"
218
+ if "editing" in specs:
219
+ motion = motion or specs["editing"][0] if specs["editing"] else ""
220
+
221
+ if style:
222
+ prompt = f"{prompt}, {style}"
223
+ if motion:
224
+ prompt = f"{prompt}, {motion}"
225
+
226
+ frames = inputs.get("frames", 33)
227
+ fps = inputs.get("fps", 16)
228
+
229
+ result = await backend.generate(GenerationRequest(
230
+ prompt=prompt,
231
+ capability=Capability.TEXT_TO_VIDEO,
232
+ negative_prompt=inputs.get("negative_prompt", ""),
233
+ width=inputs.get("width", 832),
234
+ height=inputs.get("height", 480),
235
+ frames=frames,
236
+ steps=20,
237
+ cfg=5.0
238
+ ))
239
+
240
+ if result.success:
241
+ return ToolResult(
242
+ success=True,
243
+ output={
244
+ "video_url": result.output_url,
245
+ "duration_seconds": frames / fps
246
+ },
247
+ metadata={
248
+ "frames": frames,
249
+ "fps": fps
250
+ }
251
+ )
252
+ else:
253
+ return ToolResult(
254
+ success=False,
255
+ output=None,
256
+ error=result.error
257
+ )
258
+ except Exception as e:
259
+ return ToolResult(
260
+ success=False,
261
+ output=None,
262
+ error=str(e)
263
+ )
264
+
265
+
266
+ def create_comfyui_tools(comfyui_url: str = "http://127.0.0.1:8188") -> list:
267
+ """Create ComfyUI-based generation tools."""
268
+ return [
269
+ ImageGenerationTool(comfyui_url=comfyui_url),
270
+ VideoGenerationTool(comfyui_url=comfyui_url)
271
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibe-aigc
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: A New Paradigm for Content Generation via Agentic Orchestration
5
5
  Author: Vibe AIGC Contributors
6
6
  License-Expression: MIT
@@ -40,6 +40,7 @@ vibe_aigc/mv_pipeline.py
40
40
  vibe_aigc/persistence.py
41
41
  vibe_aigc/planner.py
42
42
  vibe_aigc/tools.py
43
+ vibe_aigc/tools_comfyui.py
43
44
  vibe_aigc/tools_multimodal.py
44
45
  vibe_aigc/vibe_backend.py
45
46
  vibe_aigc/video.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes