Skip to content

Commit

Permalink
update stablediffusion-lowram.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Jan 6, 2023
1 parent 4a0ceb1 commit 6780aba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions patches/stablediffusion-lowram.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
diff --git a/ldm/util.py b/ldm/util.py
index 8c09ca1..5c2fd6d 100644
index 8c09ca1..681ffcf 100644
--- a/ldm/util.py
+++ b/ldm/util.py
@@ -76,7 +76,9 @@ def instantiate_from_config(config):
@@ -76,7 +76,7 @@ def instantiate_from_config(config):
elif config == "__is_unconditional__":
return None
raise KeyError("Expected key `target` to instantiate.")
- return get_obj_from_str(config["target"])(**config.get("params", dict()))
+ model = get_obj_from_str(config["target"])(**config.get("params", dict()))
+ model.cuda()
+ return model
+ return get_obj_from_str(config["target"])(**config.get("params", dict())).cuda()


def get_obj_from_str(string, reload=False):

0 comments on commit 6780aba

Please sign in to comment.