Update README.md
Browse files
README.md
CHANGED
@@ -41,13 +41,16 @@ Use the code below to get started with the model.
|
|
41 |
3. Run
|
42 |
```python
|
43 |
from io import BytesIO
|
|
|
|
|
44 |
from evo_nishikie_v1 import load_evo_nishikie
|
45 |
|
46 |
url = "https://huggingface.co/spaces/SakanaAI/Evo-Nishikie/resolve/main/sample2.jpg"
|
47 |
original_image = Image.open(BytesIO(requests.get(url).content))
|
48 |
|
49 |
# Generate
|
50 |
-
|
|
|
51 |
images = pipe(
|
52 |
prompt="着物を着た女性が、赤ん坊を抱え、もう一人の子どもが手押し車を引いています。背景には木があります。最高品質の輻の浮世絵。超詳細。",
|
53 |
negative_prompt="暗い",
|
@@ -55,7 +58,7 @@ Use the code below to get started with the model.
|
|
55 |
guidance_scale=7.0,
|
56 |
controlnet_conditioning_scale=0.8,
|
57 |
num_inference_steps=50,
|
58 |
-
generator=torch.Generator().manual_seed(0),
|
59 |
num_images_per_prompt=1,
|
60 |
output_type="pil",
|
61 |
).images
|
|
|
41 |
3. Run
|
42 |
```python
|
43 |
from io import BytesIO
|
44 |
+
from PIL import Image
|
45 |
+
import requests
|
46 |
from evo_nishikie_v1 import load_evo_nishikie
|
47 |
|
48 |
url = "https://huggingface.co/spaces/SakanaAI/Evo-Nishikie/resolve/main/sample2.jpg"
|
49 |
original_image = Image.open(BytesIO(requests.get(url).content))
|
50 |
|
51 |
# Generate
|
52 |
+
device = "cuda"
|
53 |
+
pipe, processor = load_evo_nishikie(device)
|
54 |
images = pipe(
|
55 |
prompt="着物を着た女性が、赤ん坊を抱え、もう一人の子どもが手押し車を引いています。背景には木があります。最高品質の輻の浮世絵。超詳細。",
|
56 |
negative_prompt="暗い",
|
|
|
58 |
guidance_scale=7.0,
|
59 |
controlnet_conditioning_scale=0.8,
|
60 |
num_inference_steps=50,
|
61 |
+
generator=torch.Generator(device).manual_seed(0),
|
62 |
num_images_per_prompt=1,
|
63 |
output_type="pil",
|
64 |
).images
|