Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest update deforum ux #471

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Latest update deforum ux #471

wants to merge 11 commits into from

Conversation

clr-li
Copy link
Contributor

@clr-li clr-li commented Sep 23, 2024

Asana: https://app.asana.com/0/1203067047205953/1205632871208949

I made a new pr since the old one was very outdated. I did implement the feedback Dev provided in the previous pr.

Q/A checklist

  • If you add new dependencies, did you update the lock file?
poetry lock --no-update
  • Run tests
ulimit -n unlimited && ./scripts/run-tests.sh
  • Do a self code review of the changes - Read the diff at least twice.
  • Carefully think about the stuff that might break because of this change - this sounds obvious but it's easy to forget to do "Go to references" on each function you're changing and see if it's used in a way you didn't expect.
  • The relevant pages still run when you press submit
  • The API for those pages still work (API tab)
  • The public API interface doesn't change if you didn't want it to (check API tab > docs page)
  • Do your UI changes (if applicable) look acceptable on mobile?
  • Ensure you have not regressed the import time unless you have a good reason to do so.
    You can visualize this using tuna:
python3 -X importtime -c 'import server' 2> out.log && tuna out.log

To measure import time for a specific library:

$ time python -c 'import pandas'

________________________________________________________
Executed in    1.15 secs    fish           external
   usr time    2.22 secs   86.00 micros    2.22 secs
   sys time    0.72 secs  613.00 micros    0.72 secs

To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:

def my_function():
    import pandas as pd
    ...

Legal Boilerplate

Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.

recipes/DeforumSD.py Outdated Show resolved Hide resolved
recipes/DeforumSD.py Outdated Show resolved Hide resolved
@devxpy
Copy link
Member

devxpy commented Oct 7, 2024

i get this error when i load the page locally

ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/Users/dev/Projects/dara/ddgai/./server.py", line 107, in middleware
    await app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/sessions.py", line 86, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/authentication.py", line 48, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 75, in __call__
    raise exc
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 64, in __call__
    await self.app(scope, receive, sender)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 680, in __call__
    await route.handle(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 275, in handle
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
    response = await func(request)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/routing.py", line 231, in app
    raw_response = await run_endpoint_function(
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/Users/dev/Projects/dara/gooey-gui/py/gooey_gui/core/renderer.py", line 70, in wrapper
    return renderer(
  File "/Users/dev/Projects/dara/gooey-gui/py/gooey_gui/core/renderer.py", line 117, in renderer
    ret = render()
  File "/Users/dev/Projects/dara/ddgai/routers/root.py", line 615, in recipe_or_handle_or_static
    return render_recipe_page(request, parts[0], RecipeTabs.run, example_id)
  File "/Users/dev/Projects/dara/ddgai/routers/root.py", line 691, in render_recipe_page
    page.render()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 359, in render
    self.render_selected_tab()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 898, in render_selected_tab
    submitted = self._render_input_col()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 1474, in _render_input_col
    self.render_form_v2()
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 374, in render_form_v2
    animation_prompts_editor()
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 159, in animation_prompts_editor
    zoom_dict = get_zoom_pan_dict(gui.session_state.get("zoom", {0: 1.004}))
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 307, in get_zoom_pan_dict
    frame, zoom = pair.split(":(")
ValueError: not enough values to unpack (expected 2, got 1)

recipes/DeforumSD.py Show resolved Hide resolved
recipes/DeforumSD.py Show resolved Hide resolved
@clr-li
Copy link
Contributor Author

clr-li commented Oct 9, 2024

i get this error when i load the page locally

ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/Users/dev/Projects/dara/ddgai/./server.py", line 107, in middleware
    await app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/sessions.py", line 86, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/authentication.py", line 48, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 75, in __call__
    raise exc
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 64, in __call__
    await self.app(scope, receive, sender)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 680, in __call__
    await route.handle(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 275, in handle
    await self.app(scope, receive, send)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
    response = await func(request)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/routing.py", line 231, in app
    raw_response = await run_endpoint_function(
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/Users/dev/.virtualenvs/ddgai-b0692ca2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/Users/dev/Projects/dara/gooey-gui/py/gooey_gui/core/renderer.py", line 70, in wrapper
    return renderer(
  File "/Users/dev/Projects/dara/gooey-gui/py/gooey_gui/core/renderer.py", line 117, in renderer
    ret = render()
  File "/Users/dev/Projects/dara/ddgai/routers/root.py", line 615, in recipe_or_handle_or_static
    return render_recipe_page(request, parts[0], RecipeTabs.run, example_id)
  File "/Users/dev/Projects/dara/ddgai/routers/root.py", line 691, in render_recipe_page
    page.render()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 359, in render
    self.render_selected_tab()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 898, in render_selected_tab
    submitted = self._render_input_col()
  File "/Users/dev/Projects/dara/ddgai/./daras_ai_v2/base.py", line 1474, in _render_input_col
    self.render_form_v2()
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 374, in render_form_v2
    animation_prompts_editor()
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 159, in animation_prompts_editor
    zoom_dict = get_zoom_pan_dict(gui.session_state.get("zoom", {0: 1.004}))
  File "/Users/dev/Projects/dara/ddgai/recipes/DeforumSD.py", line 307, in get_zoom_pan_dict
    frame, zoom = pair.split(":(")
ValueError: not enough values to unpack (expected 2, got 1)

Hmm, not sure why that error is happening. I implemented all of your other feedback, maybe it's fixed? If not I can help take a look tomorrow after standup

@devxpy devxpy assigned devxpy and unassigned clr-li Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants