Skip to content

Commit

Permalink
Merge pull request #54 from edenartlab/staging
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
genekogan authored Jan 9, 2025
2 parents 0285aaf + ea0c387 commit 1e9f4b4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion eve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ def load_env(db):

# start sentry
sentry_dsn = os.getenv("SENTRY_DSN")
sentry_env = "production" if db == "PROD" else "staging"
if sentry_dsn:
sentry_sdk.init(
dsn=sentry_dsn, traces_sample_rate=1.0, profiles_sample_rate=1.0
dsn=sentry_dsn,
traces_sample_rate=1.0,
profiles_sample_rate=1.0,
environment=sentry_env,
)

# load api keys
Expand Down
4 changes: 2 additions & 2 deletions eve/clients/discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def async_callback(message):
result = data.get("result", {})
result["result"] = prepare_result(result["result"])
output = result["result"][0]["output"][0]
url = output["url"]
url = output.get("url")

# Get creation ID from the output
creation_id = str(output.get("creation"))
Expand All @@ -170,7 +170,7 @@ async def async_callback(message):
await self.send_message(
channel, url, reference=reference, view=view
)
else:
elif url:
await self.send_message(channel, url, reference=reference)

elif update_type == UpdateType.END_PROMPT:
Expand Down
1 change: 1 addition & 0 deletions eve/clients/discord/modal_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
.env({"DB": db})
.apt_install("libmagic1", "ffmpeg", "wget")
.pip_install_from_pyproject("pyproject.toml")
.run_commands(["playwright install"])
.copy_local_dir("../workflows", "/workflows")
)

Expand Down
6 changes: 4 additions & 2 deletions eve/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ async def _task_handler(func, *args, **kwargs):
# Run both functions concurrently
main_task = func(*args[:-1], task.parent_tool or task.tool, task_args)
preprocess_task = _preprocess_task(task)

# preprocess_task is just a stub. it will allow us to parallelize pre-processing tasks that dont want to hold up the main task
result, preprocess_result = await asyncio.gather(main_task, preprocess_task)

if output_type in ["image", "video", "audio", "lora"]:
Expand All @@ -141,9 +143,9 @@ async def _task_handler(func, *args, **kwargs):

for output in result["output"]:
# name = preprocess_result.get("name") or task_args.get("prompt") or args.get("text_input")
name = task_args.get("prompt") or args.get("text_input")
name = task_args.get("prompt") or task_args.get("text_input")
if not name:
name = args.get("interpolation_prompts") or args.get("interpolation_texts")
name = task_args.get("interpolation_prompts") or task_args.get("interpolation_texts")
if name:
name = " to ".join(name)
new_creation = Creation(
Expand Down
2 changes: 1 addition & 1 deletion eve/tools/flux_trainer/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ parameters:
items:
type: image
label: Images
description: Images to train LoRA with
description: Images to train LoRA with (Use at least 5 imgs, 10-20 is even better)
required: true
min_length: 1
mode:
Expand Down

0 comments on commit 1e9f4b4

Please sign in to comment.