updated project name, fixed test workflows

This commit is contained in:
donny committed 2026-01-05 19:23:04 -07:00
1 parent 9da275d051
commit 7792f228b1
4 files changed
+61 -34

No files matched your search

+4 -5
View File
@@ -15,7 +15,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
from base import BaseWorkflow
from parameters import (
Prompt, NegativePrompt, Checkpoint, Seed, Sampler, Scheduler,
Width, Height
Dimensions
)
# ============================================
@@ -41,8 +41,7 @@ class WorkflowParams(BaseModel):
sampler: Sampler = "euler"
scheduler: Scheduler = "normal"
seed: Seed
width: Width = 1024
height: Height = 1024
dimensions: Dimensions
steps: int = Field(default=20, ge=1, le=150)
cfg: float = Field(default=8.0, ge=1.0, le=20.0, json_schema_extra={"step": 0.5})
@@ -56,7 +55,7 @@ class TestWorkflow1(BaseWorkflow):
conditioning = CLIPTextEncode(params.prompt, clip)
conditioning2 = CLIPTextEncode(params.negativePrompt, clip)
latent = EmptyLatentImage(params.width, params.height, 1)
latent = EmptyLatentImage(params.dimensions.width, params.dimensions.height, 1)
latent = KSampler(model, params.seed, params.steps, params.cfg, params.sampler, params.scheduler, conditioning, conditioning2, latent, 1)
@@ -72,7 +71,7 @@ class TestWorkflow1(BaseWorkflow):
# Module-level entry point
def run_workflow(**kwargs):
"""Entry point for the workflow."""
required = ['prompt', 'checkpoints', 'seed', 'steps', 'negativePrompt', 'width', 'height', 'cfg']
required = ['prompt', 'checkpoints', 'seed', 'steps', 'negativePrompt', 'dimensions', 'cfg']
missing = [f for f in required if f not in kwargs]
if missing:
raise ValueError(f"Missing required fields: {', '.join(missing)}")