Skip to content

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Aug 9, 2023

What type of PR is this? (check all applicable)

  • Bug Fix

Have you discussed this change with the InvokeAI team?

  • Yes

Have you updated all relevant documentation?

  • Yes

Description

@JPPhoto discovered that if he had previously manually set the value of max_ram_cache to greater than the amount available on his system, that configure_invokeai would crash. This is because the UI is now reading system values to set up the maximum value for the RAM and VRAM cache sliders, but was not checking that the old setting was within range.

This fixes the issue by clipping RAM and VRAM cache settings to the maximum and minimum permissible values.

It also cleans up some unneeded import code located in invokeai.frontend.install.__init__, which was exacerbating circular dependency issues and had no benefit other than making some from statements shorter.

Related Tickets & Documents

See this for @JPPhoto bug report and discussion thread:
https://discord.com/channels/1020123559063990373/1042475531079262378/1138844145167892651

Copy link
Contributor

@JPPhoto JPPhoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes allow invokeai-configure to run, but you do get some weird values if your invokeai.yaml values exceeded maximums as MAX_RAM and MAX_VRAM are exact rather than rounded.

@hipsterusername hipsterusername force-pushed the bugfix/clip-ram-vram-settings-patch branch from d3169a2 to 58473f4 Compare August 10, 2023 19:16
@hipsterusername hipsterusername enabled auto-merge (rebase) August 10, 2023 19:16
@hipsterusername hipsterusername force-pushed the bugfix/clip-ram-vram-settings-patch branch from 58473f4 to 07a0a8c Compare August 10, 2023 19:59
@hipsterusername hipsterusername force-pushed the bugfix/clip-ram-vram-settings-patch branch from 07a0a8c to f7493f1 Compare August 10, 2023 21:50
@hipsterusername hipsterusername merged commit d0fee93 into main Aug 10, 2023
@hipsterusername hipsterusername deleted the bugfix/clip-ram-vram-settings-patch branch August 10, 2023 22:00
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.

7 participants