Instructions to use stepfun-ai/Step1X-Edit-v1p1-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stepfun-ai/Step1X-Edit-v1p1-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stepfun-ai/Step1X-Edit-v1p1-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md (#1)
Browse files- Update README.md (588413daab02a15c02887c2a851451cdce7f5b1c)
Co-authored-by: Pengtao Chen <PengtaoChen@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -52,8 +52,7 @@ image = pipe(
|
|
| 52 |
image=image,
|
| 53 |
prompt=prompt,
|
| 54 |
num_inference_steps=28,
|
| 55 |
-
|
| 56 |
-
guidance_scale=6.0,
|
| 57 |
generator=torch.Generator().manual_seed(42),
|
| 58 |
).images[0]
|
| 59 |
image.save("0000.jpg")
|
|
|
|
| 52 |
image=image,
|
| 53 |
prompt=prompt,
|
| 54 |
num_inference_steps=28,
|
| 55 |
+
true_cfg_scale=6.0,
|
|
|
|
| 56 |
generator=torch.Generator().manual_seed(42),
|
| 57 |
).images[0]
|
| 58 |
image.save("0000.jpg")
|