    
# SDXL LoRA DreamBooth - tonyassi/mgm

by [Tony Assi](https://www.tonyassi.com/)

Dreambooth style based on classic MGM Films. Try the [demo](https://huggingface.co/spaces/tonyassi/MGM-Film-Diffusion).

## Trigger words
Use **mgm film** in the prompt to trigger the MGM style.

## How to use
```bash
pip install diffusers accelerate
```

```python
import torch
from diffusers import DiffusionPipeline, AutoencoderKL

# Load the pipeline
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
pipe = DiffusionPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    vae=vae,
    torch_dtype=torch.float16,
    variant="fp16",
    use_safetensors=True
)
pipe.load_lora_weights("tonyassi/mgm")
pipe.to("cuda")

# Generate image
prompt = "mgm film megan fox pinup girl"
image = pipe(prompt=prompt,
             height=1024, 
             width=1024,
             num_inference_steps=50,
             negative_prompt="ugly, deformed face, deformed body").images[0]
image

```

## Examples
![mgm film bettie page outside a mansion with two poodle](https://cdn.discordapp.com/attachments/1120417968032063538/1182003731013836810/mgm_film_bettie_page_outside_a_mansion_with_two_poodles.png?ex=65831dc2&is=6570a8c2&hm=07cdb13d371f45b7f7ceb7a4b89c6daa775707804e901df23eb7b01093e877d3&) 
**mgm film bettie page outside a mansion with two poodles**

![](https://cdn.discordapp.com/attachments/1120417968032063538/1182032335168880750/mgm_film_asap_rocky_eating_in_a_fancy_restaurant_1950s2.png?ex=65833865&is=6570c365&hm=877cb16f69dc9be79ab15354152682c91a54b78bb34263de42a963c90180ca67&)
**mgm film asap rocky eating in a fancy restaurant, 1950s**

![](https://cdn.discordapp.com/attachments/1120417968032063538/1183845119489736807/mgm_film_megan_fox_pinup_girl.png?ex=6589d0af&is=65775baf&hm=e1816f74a1f06fc949eea207cbd2b8489175deeb3b8498d13d240f3ce33e0129&)
**mgm film megan fox pinup girl**

![](https://cdn.discordapp.com/attachments/1120417968032063538/1182033560966799510/mgm_film_lady_gaga_in_a_limo_neon_lights_pet_snake.png?ex=6583398a&is=6570c48a&hm=ac551e7c9265b0e5a5544f62038d3c83d0348c1c8cb85c2d42eba8047391257a&)
**mgm film lady gaga in a limo, neon lights, pet snake**

![](https://cdn.discordapp.com/attachments/1120417968032063538/1182033723735150662/mgm_film_asap_rocky_in_the_wizard_of_oz3.png?ex=658339b0&is=6570c4b0&hm=ad749536364009daaa0f7426b9ca6bc68036cab7b6202ed3ee356760baf24593&)
**mgm film asap rocky in the wizard of oz**

## Model description
These are tonyassi/mgm LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.

The weights were trained  using [DreamBooth](https://dreambooth.github.io/).

LoRA for the text encoder was enabled: False.

Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.

## Download model
Weights for this model are available in Safetensors format.

[Download](https://huggingface.co/tonyassi/mgm/tree/main) them in the Files & versions tab.


{"license": "openrail++", "tags": ["stable-diffusion-xl", "stable-diffusion-xl-diffusers", "text-to-image", "diffusers", "lora", "template:sd-lora"], "base_model": "stabilityai/stable-diffusion-xl-base-1.0", "instance_prompt": "mgm film"}
diffusers tensorboard stable-diffusion-xl stable-diffusion-xl-diffusers text-to-image lora template:sd-lora base_model:stabilityai/stable-diffusion-xl-base-1.0 license:openrail++ has_space region:us