Add prompt enrichment suffix for equirectangular 360 views
This commit is contained in:
@@ -46,6 +46,7 @@ REALESRGAN_MODEL = "RealESRGAN_x4plus.pth"
|
||||
REALESRGAN_SCALE = 4 # x4 model for full upscale
|
||||
# Recommended VAE for SDXL checkpoints
|
||||
SDXL_VAE = "stabilityai/sdxl-vae"
|
||||
PROMPT_ENRICHMENT_SUFFIX = ", equirectangular 360 view"
|
||||
|
||||
|
||||
def downloads_allowed() -> bool:
|
||||
@@ -103,6 +104,13 @@ def sanitize_name(prompt: str) -> str:
|
||||
return base or "env"
|
||||
|
||||
|
||||
def enrich_prompt(prompt: str) -> str:
|
||||
prompt = prompt.strip()
|
||||
if prompt.endswith(PROMPT_ENRICHMENT_SUFFIX):
|
||||
return prompt
|
||||
return f"{prompt}{PROMPT_ENRICHMENT_SUFFIX}"
|
||||
|
||||
|
||||
def next_filename(output_dir: str, base: str, width: int, height: int) -> str:
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
i = 1
|
||||
|
||||
Reference in New Issue
Block a user