Image-to-Image
Diffusers
StableDiffusionPipeline
peter-sushko commited on
Commit
3a33e85
·
verified ·
1 Parent(s): db9f5e6

Update README.md

Browse files

added download link

Files changed (1) hide show
  1. README.md +11 -4
README.md CHANGED
@@ -23,9 +23,7 @@ Install diffusers, transformers library:
23
  pip install torch==2.7.0 diffusers==0.33.1 transformers==4.51.3 accelerate==1.6.0 pillow==11.2.1
24
  ```
25
 
26
- Download weights adapted for diffusers:
27
-
28
- WEIGHTS
29
 
30
 
31
  ```python
@@ -42,7 +40,16 @@ pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
42
  pipe.to("cuda")
43
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
44
 
45
- image = Image.open("example_imgs/simba.jpg")
 
 
 
 
 
 
 
 
 
46
  prompt = "give him a crown"
47
 
48
  result = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=2).images[0]
 
23
  pip install torch==2.7.0 diffusers==0.33.1 transformers==4.51.3 accelerate==1.6.0 pillow==11.2.1
24
  ```
25
 
26
+ Then run:
 
 
27
 
28
 
29
  ```python
 
40
  pipe.to("cuda")
41
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
42
 
43
+
44
+ url = "https://github.com/AyanaBharadwaj/RealEdit/blob/main/example_imgs/simba.jpg"
45
+
46
+ def download_image(url):
47
+ image = PIL.Image.open(requests.get(url, stream=True).raw)
48
+ image = PIL.ImageOps.exif_transpose(image)
49
+ image = image.convert("RGB")
50
+ return image
51
+ image = download_image(url)
52
+
53
  prompt = "give him a crown"
54
 
55
  result = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=2).images[0]