Update README.md
Browse files
README.md
CHANGED
@@ -23,7 +23,8 @@ import torch
|
|
23 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|
24 |
|
25 |
model_id = "timbrooks/instruct-pix2pix"
|
26 |
-
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
|
|
|
27 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
28 |
|
29 |
url = "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg"
|
|
|
23 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|
24 |
|
25 |
model_id = "timbrooks/instruct-pix2pix"
|
26 |
+
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", safety_checker=None)
|
27 |
+
pipe.to("cuda")
|
28 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
29 |
|
30 |
url = "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg"
|