more
This commit is contained in:
parent
c6f4c1621b
commit
c62e263349
2 changed files with 9 additions and 7 deletions
13
generate.py
13
generate.py
|
|
@ -686,7 +686,7 @@ def wan_reference_to_video(foreground, background, keep=False):
|
|||
background_url,
|
||||
],
|
||||
"aspect_ratio": "16:9",
|
||||
"resolution": "1080p",
|
||||
"resolution": "720p",
|
||||
"enable_prompt_expansion": False,
|
||||
"multi_shots": True,
|
||||
"enable_safety_checker": False
|
||||
|
|
@ -788,7 +788,7 @@ def ltx_a2v(item, character, prompt=None, first_frame=None, keep=False):
|
|||
ox.net.save_url(output_url, output, overwrite=True)
|
||||
ai = add_ai_variant(item, output, "ai:audio-to-video")
|
||||
ai.data["model"] = model
|
||||
ai.data["prompt"] = prompt
|
||||
ai.data["prompt"] = ox.escape_html(prompt)
|
||||
ai.data["seed"] = result["seed"]
|
||||
ai.save()
|
||||
first_frame.add(ai)
|
||||
|
|
@ -930,12 +930,12 @@ def describe_item(item, neutral=False):
|
|||
if isinstance(item, str):
|
||||
item = Item.objects.get(public_id=item)
|
||||
if item.get("prompt") and neutral:
|
||||
return item.get("prompt")
|
||||
return ox.decode_html(item.get("prompt"))
|
||||
video_url = public_video_url(item)
|
||||
prompt = describe_video(video_url, neutral)
|
||||
if neutral:
|
||||
item.refresh_from_db()
|
||||
item.data["prompt"] = prompt
|
||||
item.data["prompt"] = ox.escape_html(prompt)
|
||||
item.save()
|
||||
return prompt
|
||||
|
||||
|
|
@ -1510,6 +1510,9 @@ def process_reshoot_firstframe(character='P1'):
|
|||
item.refresh_from_db()
|
||||
add_tag(item, 'ai-failed')
|
||||
print('>> failed', item)
|
||||
continue
|
||||
if not first_frame:
|
||||
continue
|
||||
if first_frame.items.filter(data__type__icontains='ai:').exists():
|
||||
continue
|
||||
print(item, first_frame)
|
||||
|
|
@ -1527,7 +1530,7 @@ def process_motion_firstframe(character="P1", keep=False):
|
|||
if ai.exists() or 'ai-failed' in item.data.get('tags', []):
|
||||
print('>> skip', item)
|
||||
continue
|
||||
print(i)
|
||||
print(item)
|
||||
try:
|
||||
replace_character_motion_control(item, character, keep=keep)
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue