mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
@@ -57,6 +57,7 @@ Plus quite a lot more, see full [changelog](https://github.com/vladmandic/automa
|
||||
reduces memory spikes during model load at the cost of disk i/o and slower load times
|
||||
- use `GRADIO_TEMP_DIR` env variable for temp folder if set
|
||||
- update ui login form
|
||||
- update file logging
|
||||
- **Video**
|
||||
- reorganized *video* tab
|
||||
- better support for video codeces and formats
|
||||
|
||||
+1
-1
Submodule extensions-builtin/sdnq updated: 92b86996db...c5d505a96d
@@ -216,6 +216,9 @@ def start_server(immediate=True, server=None):
|
||||
if args.test:
|
||||
from pipelines.generic_test import test_pipelines
|
||||
test_pipelines()
|
||||
# log.info("Console test: \033[31m ANSI color red \033[0m")
|
||||
# log.info("Console test: \033[34m ANSI color blue \033[0m")
|
||||
# log.info("Console test: \033[33m ANSI color yellow \033[0m")
|
||||
log.info("Test only: exiting...")
|
||||
server.wants_restart = False
|
||||
uvicorn = server.webui(restart=not immediate, _exit=True)
|
||||
|
||||
+21
-5
@@ -104,6 +104,8 @@ def setup_logging(debug=None, trace=None, filename=None):
|
||||
self.formatter = logging.Formatter('{ "asctime":"%(asctime)s", "created":%(created)f, "facility":"%(name)s", "pid":%(process)d, "tid":%(thread)d, "level":"%(levelname)s", "module":"%(module)s", "func":"%(funcName)s", "msg":"%(message)s" }')
|
||||
|
||||
def strip(self, line):
|
||||
if line is None:
|
||||
return ""
|
||||
ansi_escape = re.compile(r'(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]')
|
||||
return ansi_escape.sub('', str(line))
|
||||
|
||||
@@ -143,6 +145,24 @@ def setup_logging(debug=None, trace=None, filename=None):
|
||||
def get(self):
|
||||
return self.buffer
|
||||
|
||||
class FileBuffer(RotatingFileHandler):
|
||||
def __init__(self, filename, maxBytes=32*1024*1024, backupCount=9, encoding='utf-8', delay=True):
|
||||
super().__init__(filename, maxBytes=maxBytes, backupCount=backupCount, encoding=encoding, delay=delay)
|
||||
if trace:
|
||||
self.formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s | %(module)s:%(pathname)s:%(lineno)d:%(message)s')
|
||||
else:
|
||||
self.formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s')
|
||||
|
||||
def strip(self, line):
|
||||
if line is None:
|
||||
return ""
|
||||
ansi_escape = re.compile(r'(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]')
|
||||
return ansi_escape.sub('', str(line))
|
||||
|
||||
def emit(self, record):
|
||||
record.msg = self.strip(record.msg)
|
||||
super().emit(record)
|
||||
|
||||
class LogFilter(logging.Filter):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@@ -250,11 +270,7 @@ def setup_logging(debug=None, trace=None, filename=None):
|
||||
rh.setLevel(level)
|
||||
log.addHandler(rh)
|
||||
|
||||
fh = RotatingFileHandler(log_file, maxBytes=32*1024*1024, backupCount=9, encoding='utf-8', delay=True) # 10MB default for log rotation
|
||||
if trace:
|
||||
fh.formatter = logging.Formatter(f'%(asctime)s | {hostname} | %(name)s | %(levelname)s | %(module)s | | %(pathname)s:%(lineno)d | %(message)s')
|
||||
else:
|
||||
fh.formatter = logging.Formatter(f'%(asctime)s | {hostname} | %(name)s | %(levelname)s | %(module)s | %(message)s')
|
||||
fh = FileBuffer(log_file)
|
||||
fh.addFilter(log_filter)
|
||||
fh.setLevel(logging.DEBUG)
|
||||
log.addHandler(fh)
|
||||
|
||||
@@ -60,7 +60,7 @@ class GoogleVeoVideoPipeline:
|
||||
)
|
||||
|
||||
def img2vid(self, prompt, image):
|
||||
from google import genai
|
||||
from google import genai # pylint: disable=no-name-in-module
|
||||
image_bytes = io.BytesIO()
|
||||
image.save(image_bytes, format='JPEG')
|
||||
return self.client.models.generate_videos(
|
||||
@@ -111,7 +111,7 @@ class GoogleVeoVideoPipeline:
|
||||
return args
|
||||
|
||||
def __call__(self, prompt: list[str], width: int, height: int, image: Image.Image = None, num_frames: int = 4*24):
|
||||
from google import genai
|
||||
from google import genai # pylint: disable=no-name-in-module
|
||||
|
||||
if isinstance(prompt, list) and len(prompt) > 0:
|
||||
prompt = prompt[0]
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ httptools
|
||||
|
||||
# versioned
|
||||
fastapi==0.124.4
|
||||
uvicorn==0.52.1
|
||||
uvicorn==0.52.4
|
||||
rich==15.0.0
|
||||
safetensors==0.8.0
|
||||
peft==0.20.0
|
||||
@@ -36,11 +36,11 @@ huggingface_hub==1.28.0
|
||||
hf_xet==1.6.0
|
||||
numpy==2.1.2
|
||||
pandas==2.3.1
|
||||
protobuf==7.35.1
|
||||
protobuf==7.36.0
|
||||
pytorch_lightning==2.6.5
|
||||
urllib3==1.26.19
|
||||
Pillow==12.2.0
|
||||
timm==1.0.27
|
||||
timm==1.0.28
|
||||
pyparsing==3.3.2
|
||||
typing-extensions==4.16.0
|
||||
sentencepiece==0.2.1
|
||||
|
||||
Reference in New Issue
Block a user