Spaces:
Running
on
Zero
Running
on
Zero
update demo
Browse files- edit_app.py +3 -1
- requirements.txt +1 -0
edit_app.py
CHANGED
@@ -48,7 +48,9 @@ example_instructions = [
|
|
48 |
model_id = "MudeHui/ip2p-warp-gpt4v"
|
49 |
|
50 |
def main():
|
51 |
-
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
|
|
|
|
|
52 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
53 |
example_image = Image.open("imgs/example.jpg").convert("RGB")
|
54 |
|
|
|
48 |
model_id = "MudeHui/ip2p-warp-gpt4v"
|
49 |
|
50 |
def main():
|
51 |
+
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
|
52 |
+
if torch.cuda.is_available():
|
53 |
+
pipe = pipe.to('cuda')
|
54 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
55 |
example_image = Image.open("imgs/example.jpg").convert("RGB")
|
56 |
|
requirements.txt
CHANGED
@@ -4,3 +4,4 @@ torchvision
|
|
4 |
numpy
|
5 |
transformers
|
6 |
git+https://github.com/huggingface/diffusers
|
|
|
|
4 |
numpy
|
5 |
transformers
|
6 |
git+https://github.com/huggingface/diffusers
|
7 |
+
accelerate
|