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- inference.py +1 -1
inference.py
CHANGED
|
@@ -57,7 +57,7 @@ def main():
|
|
| 57 |
|
| 58 |
images = [Image.open(p).convert("RGB") for p in args.images]
|
| 59 |
|
| 60 |
-
target_h, target_w = pipe.
|
| 61 |
|
| 62 |
result = pipe(
|
| 63 |
images=images,
|
|
|
|
| 57 |
|
| 58 |
images = [Image.open(p).convert("RGB") for p in args.images]
|
| 59 |
|
| 60 |
+
target_h, target_w = pipe.vae_image_processor.get_default_height_width(images[-1])
|
| 61 |
|
| 62 |
result = pipe(
|
| 63 |
images=images,
|