1
0
forked from cgvr/DeltaVR

incorporate InvokeAI into start_pipeline.py

This commit is contained in:
2025-11-12 17:51:02 +02:00
parent fdd4ff827e
commit 590c62eadd
5 changed files with 209 additions and 100 deletions

View File

@@ -8,7 +8,7 @@ load_dotenv()
ACCOUNT_ID = os.environ["CLOUDFLARE_ACCOUNT_ID"]
API_TOKEN = os.environ["CLOUDFLARE_API_TOKEN"]
def text_to_image(prompt, output_path):
def text_to_image_cloudflare(prompt, output_path):
MODEL = "@cf/black-forest-labs/flux-1-schnell"
URL = f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/{MODEL}"
@@ -34,6 +34,8 @@ def text_to_image(prompt, output_path):
with open(output_path, "wb") as f:
f.write(img_bytes)
return True
def refine_text_prompt(prompt):
MODEL = "@cf/meta/llama-3.2-3b-instruct"