SDXL-MARIUS-V18 / inference.py
muquanta-axel-v17's picture
Update inference.py
b22425e verified
Raw
History Blame Contribute Delete
1.27 kB
import torch
from solvay_v18_loader import get_pipe
def main():
print("=========================================")
print(" 🌌 MARIUS V18 | SOLVAY INTERFACE ")
print("=========================================")
# 1. Load the Engine
pipe = get_pipe()
print("\n🎨 Studio Ready. (Type 'quit' to exit)")
img_idx = 1
while True:
try:
# 2. Interactive Prompt
prompt = input(f"\n[{img_idx}] Enter Prompt > ").strip()
if prompt.lower() in ['quit', 'exit', 'q']:
print("πŸ‘‹ Closing session.")
break
if not prompt: continue
print(" ... Dreaming ...")
# 3. Generate
image = pipe(prompt, num_inference_steps=30).images[0]
# 4. Save
filename = f"solvay_output_{img_idx:03d}.png"
image.save(filename)
print(f" ✨ Image generated: {filename}")
img_idx += 1
except KeyboardInterrupt:
print("\nπŸ‘‹ Interrupted.")
break
except Exception as e:
print(f"❌ Error: {e}")
if __name__ == "__main__":
main()