Fixed issues with adapter and disabled telementry for now
This commit is contained in:
1 parent
abf7cd221d
commit
76c764af49
2 files changed
+6
-1
No files matched your search
@@ -6,6 +6,9 @@ sys.path.insert(0, os.getcwd())
|
|||||||
# must come before ANY torch or fastai imports
|
# must come before ANY torch or fastai imports
|
||||||
# import toolkit.cuda_malloc
|
# import toolkit.cuda_malloc
|
||||||
|
|
||||||
|
# turn off diffusers telemetry until I can figure out how to make it opt-in
|
||||||
|
os.environ['DISABLE_TELEMETRY'] = 'YES'
|
||||||
|
|
||||||
# check if we have DEBUG_TOOLKIT in env
|
# check if we have DEBUG_TOOLKIT in env
|
||||||
if os.environ.get("DEBUG_TOOLKIT", "0") == "1":
|
if os.environ.get("DEBUG_TOOLKIT", "0") == "1":
|
||||||
# set torch to trace mode
|
# set torch to trace mode
|
||||||
|
|||||||
@@ -310,6 +310,9 @@ class StableDiffusion:
|
|||||||
else:
|
else:
|
||||||
Pipe = StableDiffusionAdapterPipeline
|
Pipe = StableDiffusionAdapterPipeline
|
||||||
extra_args['adapter'] = self.adapter
|
extra_args['adapter'] = self.adapter
|
||||||
|
else:
|
||||||
|
if self.is_xl:
|
||||||
|
extra_args['add_watermarker'] = False
|
||||||
|
|
||||||
# TODO add clip skip
|
# TODO add clip skip
|
||||||
if self.is_xl:
|
if self.is_xl:
|
||||||
@@ -321,7 +324,6 @@ class StableDiffusion:
|
|||||||
tokenizer=self.tokenizer[0],
|
tokenizer=self.tokenizer[0],
|
||||||
tokenizer_2=self.tokenizer[1],
|
tokenizer_2=self.tokenizer[1],
|
||||||
scheduler=noise_scheduler,
|
scheduler=noise_scheduler,
|
||||||
add_watermarker=False,
|
|
||||||
**extra_args
|
**extra_args
|
||||||
).to(self.device_torch)
|
).to(self.device_torch)
|
||||||
# force turn that (ruin your images with obvious green and red dots) the #$@@ off!!!
|
# force turn that (ruin your images with obvious green and red dots) the #$@@ off!!!
|
||||||
|
|||||||
Reference in new issue
Block a user