48 lines
1.4 KiB
Python
48 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test script to generate a draft orbit of 12 images.
|
|
Allows us to verify prompts and consistency across left and right sides.
|
|
"""
|
|
import os
|
|
import sys
|
|
import time
|
|
|
|
_HERE = os.path.dirname(os.path.abspath(__file__))
|
|
if _HERE not in sys.path:
|
|
sys.path.insert(0, _HERE)
|
|
|
|
from orbit_qwen import run_qwen_orbit
|
|
|
|
|
|
def main():
|
|
# "/mnt/zim/tour-comfy/output/20260625_045029_pose_3_20260618_173728_image.png"
|
|
input_image = "/mnt/zim/tour-comfy/output/20260625_045029_pose_3_20260618_173728_image.png"
|
|
output_dir = "/home/mike/dev/qwen-image-edit-rapid-aio-nsfw-v23/test/orbit_360_test_13"
|
|
|
|
if not os.path.exists(input_image):
|
|
print(f"Error: input image not found: {input_image}")
|
|
sys.exit(1)
|
|
|
|
print(f"Generating 12-view orbit for: {input_image}")
|
|
print(f"Output directory: {output_dir}")
|
|
|
|
t0 = time.perf_counter()
|
|
res = run_qwen_orbit(
|
|
image_path=input_image,
|
|
output_dir=output_dir,
|
|
n_views=12,
|
|
seed=42,
|
|
mode="turntable",
|
|
anchor="original",
|
|
interp_factor=1,
|
|
steps=4, # Fast draft steps (4)
|
|
on_progress=lambda i, n, deg: print(f" [{i + 1}/{n}] rendering {int(deg):3d}°...", flush=True)
|
|
)
|
|
dt = time.perf_counter() - t0
|
|
print(f"Done in {dt:.1f}s")
|
|
print(f"Views generated at: {res['views_dir']}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|