Merge pull request #169 from Runware/feature-versioning
Added support for logging versions
This commit is contained in:
@@ -3,7 +3,7 @@ Runware Wan Animate Advanced Feature Settings Node
|
||||
Provides Wan Animate-specific settings for video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareWanAnimateAdvancedFeatureSettings:
|
||||
"""Runware Wan Animate Advanced Feature Settings Node"""
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import uuid
|
||||
import requests
|
||||
import torch
|
||||
import numpy as np
|
||||
import librosa
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from .utils import runwareUtils as rwUtils
|
||||
from typing import Dict, Any, List
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class audioInferenceInputs:
|
||||
|
||||
@@ -4,7 +4,6 @@ Builds speech.voices[] for multi-speaker audio inference speech payloads.
|
||||
"""
|
||||
|
||||
import re
|
||||
from typing import Dict, List
|
||||
|
||||
|
||||
class RunwareAudioInferenceSpeechVoices:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Audio Input Node
|
||||
Creates an audio input configuration with id and source
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareAudioInput:
|
||||
|
||||
+3
-11
@@ -7,10 +7,10 @@ import soundfile as sf
|
||||
import numpy as np
|
||||
from io import BytesIO
|
||||
from .utils.runwareUtils import (
|
||||
RUNWARE_API_KEY,
|
||||
RUNWARE_API_BASE_URL,
|
||||
generalRequestWrapper,
|
||||
genRandUUID,
|
||||
getRunwareApiHeaders,
|
||||
sanitize_for_logging,
|
||||
safe_json_dumps,
|
||||
sendMediaUUID,
|
||||
@@ -237,21 +237,13 @@ class RunwareMediaUpload:
|
||||
"media": mediaData,
|
||||
}]
|
||||
|
||||
def _getApiHeaders(self):
|
||||
"""Get API request headers"""
|
||||
return {
|
||||
"Authorization": f"Bearer {RUNWARE_API_KEY}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
}
|
||||
|
||||
def _makeUploadRequest(self, uploadConfig):
|
||||
"""Make upload request to Runware API"""
|
||||
def recaller():
|
||||
print(f"[Debug] Making POST request to Runware API...")
|
||||
return requests.post(
|
||||
RUNWARE_API_BASE_URL,
|
||||
headers=self._getApiHeaders(),
|
||||
headers=getRunwareApiHeaders(),
|
||||
json=uploadConfig,
|
||||
timeout=self.REQUEST_TIMEOUT,
|
||||
allow_redirects=False,
|
||||
@@ -301,7 +293,7 @@ class RunwareMediaUpload:
|
||||
def recaller():
|
||||
return requests.post(
|
||||
RUNWARE_API_BASE_URL,
|
||||
headers=self._getApiHeaders(),
|
||||
headers=getRunwareApiHeaders(),
|
||||
json=pollConfig,
|
||||
timeout=self.REQUEST_TIMEOUT,
|
||||
allow_redirects=False,
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Alibaba Provider Settings Node
|
||||
Provides Alibaba-specific settings for image/video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareAlibabaProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware BlackForest Labs Provider Settings Node
|
||||
Provides BlackForest Labs-specific settings for image generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareBlackForestProviderSettings:
|
||||
"""Runware BlackForest Labs Provider Settings Node"""
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Bria Provider Mask Node
|
||||
Creates mask configuration for Bria video eraser settings
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any, List
|
||||
from typing import Dict, Any, List
|
||||
|
||||
|
||||
class RunwareBriaProviderMask:
|
||||
|
||||
@@ -3,8 +3,7 @@ Runware Bria Provider Settings Node
|
||||
Provides Bria-specific settings for image/video generation
|
||||
"""
|
||||
|
||||
import torch
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareBriaProviderSettings:
|
||||
"""Runware Bria Provider Settings Node"""
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Bytedance Provider Settings Node
|
||||
Provides Bytedance-specific settings for image/video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareBytedanceProviderSettings:
|
||||
"""Runware Bytedance Provider Settings Node"""
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Google Provider Settings Node
|
||||
Provides Google-specific settings for image/video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareGoogleProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware KlingAI Provider Settings Node
|
||||
Provides KlingAI-specific settings for video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any, List
|
||||
from typing import Dict, Any, List
|
||||
|
||||
|
||||
class RunwareKlingProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Lightricks Provider Settings Node
|
||||
Provides Lightricks-specific settings for video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareLightricksProviderSettings:
|
||||
"""Runware Lightricks Provider Settings Node"""
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware MiniMax Provider Settings Node
|
||||
Provides MiniMax-specific settings for video generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class RunwareMiniMaxProviderSettings:
|
||||
"""Runware MiniMax Provider Settings Node"""
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Mirelo Provider Settings Node
|
||||
Provides Mirelo-specific settings for audio generation
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareMireloProviderSettings:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from ..utils import runwareUtils as rwUtils
|
||||
|
||||
|
||||
class RunwareOpenAIProviderSettings:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from ..utils import runwareUtils as rwUtils
|
||||
|
||||
|
||||
class RunwarePixverseProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Sourceful Provider Settings Node
|
||||
Provides Sourceful-specific settings for image generation (providerSettings.sourceful.*)
|
||||
"""
|
||||
|
||||
from typing import Dict, Any, List
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareSourcefulProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Sync Provider Settings Node
|
||||
Provides Sync-specific settings for video generation with lip-sync capabilities
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any, List
|
||||
from typing import Dict, Any, List
|
||||
|
||||
|
||||
class RunwareSyncProviderSettings:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Sync Segment Node
|
||||
Creates a sync segment configuration for sync provider settings
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareSyncSegment:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from ..utils import runwareUtils as rwUtils
|
||||
|
||||
class RunwareViduProviderSettings:
|
||||
@classmethod
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class safetyInputs:
|
||||
|
||||
@@ -3,7 +3,7 @@ Runware Speech Input Node
|
||||
Creates a speech input configuration with TTS provider settings
|
||||
"""
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class RunwareSpeechInput:
|
||||
|
||||
@@ -3,7 +3,6 @@ Runware Speech Input Combine Node
|
||||
Combines multiple speech inputs into a list
|
||||
"""
|
||||
|
||||
from typing import List, Dict, Any
|
||||
|
||||
|
||||
class RunwareSpeechInputCombine:
|
||||
|
||||
@@ -20,8 +20,27 @@ import io
|
||||
import threading
|
||||
import re
|
||||
|
||||
from ..version import __version__
|
||||
|
||||
load_dotenv()
|
||||
|
||||
def getRunwareApiHeaders(include_auth=True):
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"X-SDK-Name": "comfyui",
|
||||
"X-SDK-Version": __version__,
|
||||
}
|
||||
if include_auth:
|
||||
api_key = getAPIKey()
|
||||
if not api_key:
|
||||
raise Exception(
|
||||
"Runware API key is not configured. Add your API key in the Runware API Manager node."
|
||||
)
|
||||
headers["Authorization"] = f"Bearer {api_key}"
|
||||
return headers
|
||||
|
||||
BASEFOLDER = Path(__file__).parent.parent.parent
|
||||
IMAGE_CACHE_FILE = BASEFOLDER / "imagesCache.json"
|
||||
|
||||
@@ -250,12 +269,7 @@ def getOrdinal(num):
|
||||
return ordinals.get(num, f"{num}th")
|
||||
|
||||
def checkAPIKey(apiKey):
|
||||
headers = {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
}
|
||||
|
||||
headers = getRunwareApiHeaders(include_auth=False)
|
||||
genConfig = [
|
||||
{
|
||||
"taskType": "authentication",
|
||||
@@ -359,11 +373,7 @@ def inferenecRequest(genConfig):
|
||||
global RUNWARE_API_KEY, RUNWARE_API_BASE_URL, SESSION_TIMEOUT
|
||||
RUNWARE_API_KEY = os.getenv("RUNWARE_API_KEY")
|
||||
SESSION_TIMEOUT = int(os.getenv("RUNWARE_TIMEOUT"))
|
||||
headers = {
|
||||
"Authorization": f"Bearer {RUNWARE_API_KEY}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
}
|
||||
headers = getRunwareApiHeaders()
|
||||
|
||||
try:
|
||||
def recaller():
|
||||
@@ -720,11 +730,7 @@ def pollVideoResult(taskUUID):
|
||||
}
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": f"Bearer {RUNWARE_API_KEY}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
}
|
||||
headers = getRunwareApiHeaders()
|
||||
|
||||
try:
|
||||
def recaller():
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
__version__ = "1.8.6"
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Optional, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
class videoAdvancedFeatureInputs:
|
||||
"""Runware Video Advanced Feature Inputs Node"""
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from .utils import runwareUtils as rwUtils
|
||||
from .videoModelSearch import videoModelSearch
|
||||
import comfy.model_management
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from .utils import runwareUtils as rwUtils
|
||||
from typing import List
|
||||
|
||||
|
||||
class videoInferenceInputs:
|
||||
|
||||
@@ -4,7 +4,6 @@ Builds settings.activeSpeakerDetection.boundingBoxes for Sync models.
|
||||
Each element is [x1, y1, x2, y2] or null. Up to 4 elements.
|
||||
"""
|
||||
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
def _parse_box(raw: str, label: str):
|
||||
|
||||
Reference in New Issue
Block a user