Spaces:
Running
Running
Alexi Canales
commited on
Commit
·
280fc95
1
Parent(s):
6d3dbcc
switching to cpu:
Browse files
README.md
CHANGED
@@ -11,3 +11,7 @@ short_description: image_fx_processor
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
|
16 |
+
Init command for dependencies:
|
17 |
+
pip install gradio diffusers transformers torch Pillow
|
app.py
CHANGED
@@ -6,9 +6,9 @@ import torch
|
|
6 |
# Load the model (once)
|
7 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
8 |
"timbrooks/instruct-pix2pix",
|
9 |
-
torch_dtype=torch.
|
10 |
safety_checker=None
|
11 |
-
).to("
|
12 |
|
13 |
def stylize(image: Image.Image, quote: str) -> Image.Image:
|
14 |
# Step 1: Stylize with instruct-pix2pix
|
|
|
6 |
# Load the model (once)
|
7 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
8 |
"timbrooks/instruct-pix2pix",
|
9 |
+
torch_dtype=torch.float32,
|
10 |
safety_checker=None
|
11 |
+
).to("cpu")
|
12 |
|
13 |
def stylize(image: Image.Image, quote: str) -> Image.Image:
|
14 |
# Step 1: Stylize with instruct-pix2pix
|