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

v0.2.1 (#294) #1

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion install.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import launch
import sys
from importlib_metadata import version

python = sys.executable


def install():
if not launch.is_installed("importlib_metadata"):
launch.run_pip("install importlib_metadata", "importlib_metadata", live=True)
from importlib_metadata import version

if launch.is_installed("tensorrt"):
if not version("tensorrt") == "9.0.1.post11.dev4":
launch.run(
Expand Down
2 changes: 1 addition & 1 deletion scripts/trt.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def process_batch(self, p, *args, **kwargs):
if self.torch_unet:
return super().process_batch(p, *args, **kwargs)

if self.idx != sd_unet.current_unet.profile_idx:
if sd_unet.current_unet is not None and self.idx != sd_unet.current_unet.profile_idx:
sd_unet.current_unet.profile_idx = self.idx
sd_unet.current_unet.switch_engine()

Expand Down
5 changes: 4 additions & 1 deletion ui_trt.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ def get_lora_checkpoints():
if os.path.exists(config_file):
with open(config_file, "r") as f:
config = json.load(f)
version = SDVersion.from_str(config["sd version"])
try:
version = SDVersion.from_str(config["sd version"])
except:
version = SDVersion.Unknown

else:
version = SDVersion.Unknown
Expand Down