Instructions to use jdopensource/JoyAI-Image-Edit-Plus-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jdopensource/JoyAI-Image-Edit-Plus-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("jdopensource/JoyAI-Image-Edit-Plus-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
fix: update _get_bucket_size to vae_image_processor.get_default_height_width
Browse files
README.md
CHANGED
|
@@ -64,7 +64,7 @@ images = [
|
|
| 64 |
]
|
| 65 |
|
| 66 |
# Determine output resolution from the last reference image
|
| 67 |
-
target_h, target_w = pipe.
|
| 68 |
|
| 69 |
# Generate
|
| 70 |
result = pipe(
|
|
@@ -95,7 +95,7 @@ result.images[0].save("output.png")
|
|
| 95 |
| `num_inference_steps` | 30 |
|
| 96 |
| `guidance_scale` | 4.0 |
|
| 97 |
| `torch_dtype` | `torch.bfloat16` |
|
| 98 |
-
| Resolution | Auto-detected via `
|
| 99 |
|
| 100 |
## CLI Inference
|
| 101 |
|
|
|
|
| 64 |
]
|
| 65 |
|
| 66 |
# Determine output resolution from the last reference image
|
| 67 |
+
target_h, target_w = pipe.vae_image_processor.get_default_height_width(images[-1])
|
| 68 |
|
| 69 |
# Generate
|
| 70 |
result = pipe(
|
|
|
|
| 95 |
| `num_inference_steps` | 30 |
|
| 96 |
| `guidance_scale` | 4.0 |
|
| 97 |
| `torch_dtype` | `torch.bfloat16` |
|
| 98 |
+
| Resolution | Auto-detected via `vae_image_processor.get_default_height_width()` (1024-base buckets) |
|
| 99 |
|
| 100 |
## CLI Inference
|
| 101 |
|