From 1b47a89c179406851a470ecbfaa1dd8842d81310 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 16 Jan 2026 11:12:40 +0000 Subject: [PATCH 1/3] tweak characters --- generate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generate.py b/generate.py index dc0fce2..2f35366 100644 --- a/generate.py +++ b/generate.py @@ -372,8 +372,11 @@ def process_frame(item, prompt, character=None, position=0): return img def replace_character(item, character, position=0): - prompt = "Replace the foreground character in image 1 with the character in image 2, keep the posture, clothing, background, light, admosthere from image 1, but take the face and personality from image 2. Make sure the size of the character is adjusted since the new character is a child. The quality of the image should be the same between foreground and background, adjust the quality of the character to match the background" - if character in ("P1", "P2", "P3"): + prompt = "Replace the foreground character in image 1 with the character in image 2, keep the posture, clothing, background, light, admosthere from image 1, but take the facial features and personality from image 2. Make sure the size of the character is adjusted since the new character is a child and make sure the size of the head matches the body. The quality of the image should be the same between foreground and background, adjust the quality of the character to match the background. Use the style of image 1 for the character: if image 1 is a photo make the character a real person, if image 1 is a drawing make the character a drawn character, if image 1 is a comic use a comic character and so on" + prompt = "Replace the foreground character in image 1 with the character in image 2, keep the posture, clothing, background, light, admosthere from image 1, but take the facial features and personality from image 2. Make sure the size of the character is adjusted since the new character is a child and make sure the size of the head matches the body. The quality of the image should be the same between foreground and background, adjust the quality of the character to match the background. Use the style of image 1 for the character: if image 1 is a photo make the character a real person, if image 1 is a drawing make the character a drawn character, if image 1 is a comic use a comic character" + if character == "P5": + prompt = prompt.replace('child', 'teenager') + if character in ("P1", "P2", "P3", "P4", "P5"): character = public_document_url(Document.objects.get(data__title="Character " + character)) return process_frame(item, prompt, character, position) From 8bea9f88fac1898b255b26415db8a023fff9f751 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 16 Jan 2026 11:13:28 +0000 Subject: [PATCH 2/3] use settings from global options instead of extra file --- etc/systemd/system/render-infinity.service | 2 +- render.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/systemd/system/render-infinity.service b/etc/systemd/system/render-infinity.service index a016046..9afaad8 100644 --- a/etc/systemd/system/render-infinity.service +++ b/etc/systemd/system/render-infinity.service @@ -9,7 +9,7 @@ User=pandora Group=pandora Nice=19 WorkingDirectory=/srv/pandora/pandora -ExecStart=/srv/pandora/pandora/manage.py infinity --config /etc/infinity.json +ExecStart=/srv/pandora/pandora/manage.py infinity [Install] WantedBy=multi-user.target diff --git a/render.py b/render.py index b0f7b7d..59b4654 100644 --- a/render.py +++ b/render.py @@ -717,6 +717,7 @@ def update_m3u(render_prefix, exclude=[]): shutil.move(front_m3u_f + "_", front_m3u_f) def render_infinity(options): + options = load_defaults(options) prefix = options['prefix'] duration = int(options['duration']) From 0448fd613fd414a9586fe70d931f23162aa4df09 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 16 Jan 2026 13:29:22 +0000 Subject: [PATCH 3/3] missing import --- render_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/render_utils.py b/render_utils.py index f90862d..b099714 100644 --- a/render_utils.py +++ b/render_utils.py @@ -2,6 +2,7 @@ import re import os import lxml.etree +import ox from .render_kdenlive import melt_xml