Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
# ip2p-RoboPredict: InstructPix2Pix Fine-tuning for Robotic Action Frame Prediction
|
| 7 |
GitHub: https://github.com/yutengzhang03/ip2p-finetune
|
| 8 |
-
<img src='
|
| 9 |
|
| 10 |
|
| 11 |
|
|
@@ -22,11 +27,11 @@ import PIL
|
|
| 22 |
import requests
|
| 23 |
import torch
|
| 24 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|
| 25 |
-
model_id = "
|
| 26 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
|
| 27 |
pipe.to("cuda")
|
| 28 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 29 |
-
url = "https://
|
| 30 |
def download_image(url):
|
| 31 |
image = PIL.Image.open(requests.get(url, stream=True).raw)
|
| 32 |
image = PIL.ImageOps.exif_transpose(image)
|
|
@@ -36,4 +41,4 @@ image = download_image(url)
|
|
| 36 |
prompt = "turn him into cyborg"
|
| 37 |
images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
|
| 38 |
images[0]
|
| 39 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ip2p-RoboPredict Demo
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "3.41.2"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
---
|
| 11 |
# ip2p-RoboPredict: InstructPix2Pix Fine-tuning for Robotic Action Frame Prediction
|
| 12 |
GitHub: https://github.com/yutengzhang03/ip2p-finetune
|
| 13 |
+
<img src='img/show-example.png'/>
|
| 14 |
|
| 15 |
|
| 16 |
|
|
|
|
| 27 |
import requests
|
| 28 |
import torch
|
| 29 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|
| 30 |
+
model_id = "yutengz/ip2p-RoboPredict"
|
| 31 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
|
| 32 |
pipe.to("cuda")
|
| 33 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 34 |
+
url = "https://github.com/yutengzhang03/ip2p-finetune/blob/main/img/source.png"
|
| 35 |
def download_image(url):
|
| 36 |
image = PIL.Image.open(requests.get(url, stream=True).raw)
|
| 37 |
image = PIL.ImageOps.exif_transpose(image)
|
|
|
|
| 41 |
prompt = "turn him into cyborg"
|
| 42 |
images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
|
| 43 |
images[0]
|
| 44 |
+
```
|