37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""Test Style B (Dark Noir) generation"""
|
|
|
|
import vertexai
|
|
from vertexai.preview.vision_models import ImageGenerationModel
|
|
from pathlib import Path
|
|
|
|
# Initialize
|
|
vertexai.init(project="gen-lang-client-0428644398", location="us-central1")
|
|
|
|
# Prompt for Style B (Dark Noir)
|
|
prompt = "2D game prop, dark hand-drawn gritty noir style with dramatic shadows, high contrast, sketchy atmospheric lines. Asset: DINOSAUR SKULL with teeth. Background: SOLID BRIGHT GREEN (#00FF00)"
|
|
|
|
output_path = Path("test_vertex_output_styleb.png")
|
|
|
|
print("🎨 Generating Style B (Dark Noir)...")
|
|
print(f"📝 Prompt: {prompt[:80]}...")
|
|
|
|
try:
|
|
model = ImageGenerationModel.from_pretrained("imagegeneration@006")
|
|
|
|
response = model.generate_images(
|
|
prompt=prompt,
|
|
number_of_images=1,
|
|
aspect_ratio="1:1",
|
|
safety_filter_level="block_some",
|
|
person_generation="allow_adult"
|
|
)
|
|
|
|
response.images[0].save(location=str(output_path))
|
|
|
|
print(f"✅ Saved: {output_path}")
|
|
print("\n✅ SUCCESS! Style B generated!")
|
|
|
|
except Exception as e:
|
|
print(f"❌ Error: {e}")
|