-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.py
More file actions
36 lines (30 loc) · 1.05 KB
/
quick_test.py
File metadata and controls
36 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Quick test with minimal steps
import sys
import os
print("Testing style application...")
print(f"Current directory: {os.getcwd()}")
print(f"Musicians file exists: {os.path.exists('musicians.jpg')}")
try:
from apply_style import apply_style_to_image
print("Import successful!")
print("\nStarting... (this will take 10-20 minutes on CPU)")
print("Please wait...")
apply_style_to_image(
input_image_path="musicians.jpg",
style_name="expressionist_street",
strength=0.75,
num_inference_steps=30, # Reduced steps for faster test
guidance_scale=7.5,
output_path="musicians_styled.jpg",
model_id="runwayml/stable-diffusion-v1-5"
)
if os.path.exists("musicians_styled.jpg"):
print("\nSUCCESS! File created: musicians_styled.jpg")
else:
print("\nWARNING: Process completed but file not found")
except KeyboardInterrupt:
print("\nInterrupted by user")
except Exception as e:
print(f"\nERROR: {e}")
import traceback
traceback.print_exc()