TalHach61 commited on
Commit
da7c8ee
·
verified ·
1 Parent(s): eea1421

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -3
README.md CHANGED
@@ -70,6 +70,7 @@ from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline
70
  from controlnet_aux import OpenposeDetector
71
  import torch
72
  from diffusers.utils import load_image
 
73
 
74
  controlnet = ControlNetModel.from_pretrained(
75
  "briaai/BRIA-2.3-ControlNet-Pose",
@@ -83,15 +84,16 @@ pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
83
  )
84
  pipe.to("cuda")
85
 
86
- prompt = "A portrait of a Beautiful and playful ethereal singer, golden designs, highly detailed, blurry background"
87
  negative_prompt = "Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
88
 
89
  # Calculate Pose image
90
  openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')
91
 
92
- image = load_image("https://huggingface.co/briaai/BRIA-2.3-ControlNet-Pose/resolve/main/test_image.png")
93
 
94
- pose_image = openpose(image)
95
 
96
  image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=pose_image, controlnet_conditioning_scale=1.0, height=1024, width=1024).images[0]
 
97
  ```
 
70
  from controlnet_aux import OpenposeDetector
71
  import torch
72
  from diffusers.utils import load_image
73
+ from PIL import Image
74
 
75
  controlnet = ControlNetModel.from_pretrained(
76
  "briaai/BRIA-2.3-ControlNet-Pose",
 
84
  )
85
  pipe.to("cuda")
86
 
87
+ prompt = "Two kids in bright orange jackets play near a blue tent in a forest with silver-leafed trees.,photography"
88
  negative_prompt = "Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
89
 
90
  # Calculate Pose image
91
  openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')
92
 
93
+ image = load_image("https://huggingface.co/briaai/BRIA-2.3-ControlNet-Pose/resolve/main/test_image.jpg")
94
 
95
+ pose_image = openpose(image, include_body=True, include_hand=True, include_face=True)[0]
96
 
97
  image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=pose_image, controlnet_conditioning_scale=1.0, height=1024, width=1024).images[0]
98
+
99
  ```