--- 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 ## Model description

UPDATE:

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.

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.

## 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)