Instructions to use PrunaAI/p-image-edit-next-scene-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use PrunaAI/p-image-edit-next-scene-lora 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("fill-in-base-model", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("PrunaAI/p-image-edit-next-scene-lora") prompt = "Next Scene: The woman smokes a cigarette, dramatically." 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
- Local Apps
- Draw Things
| pipeline_tag: image-to-image | |
| tags: | |
| - image-to-image | |
| - lora | |
| - diffusers | |
| - template:diffusion-lora | |
| widget: | |
| - output: | |
| url: images/example_001.png | |
| text: 'Next Scene: The woman smokes a cigarette, dramatically.' | |
| - output: | |
| url: images/example_002.png | |
| text: 'Next Scene: The woman walks towards a man in the car' | |
| - output: | |
| url: images/example_003.png | |
| text: 'Next Scene: The cow is eating grass in the fields' | |
| - output: | |
| url: images/example_004.png | |
| text: 'Next Scene: The man is shaking hands with another man.' | |
| - output: | |
| url: images/example_005.png | |
| text: 'Next Scene: An old hand puts a glass of wine on the table next to the book.' | |
| license: apache-2.0 | |
| # Next Scene Lora | |
| <Gallery /> | |
| ## Model description | |
| This is an image-editing LoRA. Provide an input image and an instruction describing the edit. **Trigger word:** use `Next Scene: ` in your instructions for best results. The examples below show input → output for different instructions. | |
| ## Trigger word | |
| Include **`Next Scene: `** in your edit instruction, for example: | |
| ``` | |
| Next Scene: <your edit instruction here> | |
| ``` | |
| ## Gallery | |
| ### Example 1 | |
|  | |
| *Prompt:* Next Scene: The woman smokes a cigarette, dramatically. | |
| *Input:*  | |
| ### Example 2 | |
|  | |
| *Prompt:* Next Scene: The woman walks towards a man in the car | |
| *Input:*  | |
| ### Example 3 | |
|  | |
| *Prompt:* Next Scene: The cow is eating grass in the fields | |
| *Input:*  | |
| ### Example 4 | |
|  | |
| *Prompt:* Next Scene: The man is shaking hands with another man. | |
| *Input:*  | |
| ### Example 5 | |
|  | |
| *Prompt:* Next Scene: An old hand puts a glass of wine on the table next to the book. | |
| *Input:*  | |
| ## LoRA scale | |
| The gallery was generated with **`lora_scale=2.0`**. You can tune this when running inference (e.g. lower for a subtler effect, higher for a stronger style). | |
| ## Use on Replicate | |
| ```python | |
| import replicate | |
| output = replicate.run( | |
| "prunaai/p-image-edit-lora:17651bd22e8c151cdb13a97b0f8554dce1e7238cd0a18cf90bc237ac5f0bc067", | |
| input={ | |
| "images": ["https://example.com/input.png"], | |
| "prompt": "Next Scene: your edit instruction", | |
| "lora_weights": "https://huggingface.co/davidberenstein1957/p-image-edit-next-scene-lora/resolve/main/weights.safetensors", | |
| "lora_scale": 2.0, | |
| "hf_api_token": "your-hf-token", | |
| } | |
| ) | |
| ``` | |