File size: 3,383 Bytes
d20a34c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
---
license: other
license_name: bespoke-lora-trained-license
license_link: https://multimodal.art/civitai-licenses?allowNoCredit=True&allowCommercialUse=Image&allowDerivatives=True&allowDifferentLicense=True
tags:
- text-to-image
- stable-diffusion
- lora
- diffusers
- template:sd-lora
- migrated
- depth of field
- tool
- dof
- blurry background
- focus
base_model: runwayml/stable-diffusion-v1-5
instance_prompt:
widget:
- text: ' '
output:
url: >-
2221968.jpeg
- text: ' '
output:
url: >-
2221993.jpeg
- text: 'photo of a man smiling in the forest, beard '
parameters:
negative_prompt: cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution
output:
url: >-
2222002.jpeg
- text: 'photo of a man smiling in the forest, beard '
parameters:
negative_prompt: cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution
output:
url: >-
2222004.jpeg
- text: 'photo of a woman with light brown hair, posing for a photo, centered streets of big city '
parameters:
negative_prompt: hat, nude, cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution
output:
url: >-
2222006.jpeg
- text: 'photo of a woman with light brown hair, posing for a photo, centered streets of big city '
parameters:
negative_prompt: hat, nude, cartoon, cgi, render, illustration, painting, drawing, bad quality, grainy, low resolution
output:
url: >-
2222008.jpeg
---
# Depth of Field Slider - LoRA
<Gallery />
## Model description
<ul><li><p>weight: <strong>-8.0 to 8.0 </strong><em>( or way more or less )</em></p></li><li><p>positive: <strong>large DOF (sharp background)</strong></p></li><li><p>negative: <strong>narrow DOF (blurry background)</strong></p></li></ul><p></p><p>UPDATE:</p><p>The original file had an sdxl meta tag that makes automatic1111 web ui only show it for sdxl. I have uploaded one with the correct meta tag. If you are having issues, download and replace the previous one with the new one and refresh your network modules.</p><p></p><p>Weight depends on starting photo, if it already has a shallow depth of field, you may need to go pretty high to remove it (10.0 to 15.0), but -5.0 to 5.0 works for most images. The image stays pretty stable even at extreme values, though it will change the composition.</p><p></p>
## Download model
Weights for this model are available in Safetensors format.
[Download](/ostris/depth-of-field-slider-lora/tree/main) them in the Files & versions tab.
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
```py
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained('runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('ostris/depth-of-field-slider-lora', weight_name='depth_of_field_slider_v1.safetensors')
image = pipeline('photo of a woman with light brown hair, posing for a photo, centered streets of big city ').images[0]
```
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
|