File size: 4,580 Bytes
bd4339a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694b3cc
 
bd4339a
 
 
 
 
 
 
694b3cc
bd4339a
 
 
 
 
 
 
 
 
 
694b3cc
46e3f6d
 
 
 
 
 
 
 
 
694b3cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46e3f6d
00ec5a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
tags:
- text-to-image
- stable-diffusion
- lora
- diffusers
- template:sd-lora
widget:
- text: pastel drawing of factorio, symetry
  output:
    url: images/pastel_00329_71531_Pastel drawing of factorio, symetry.png
- text: factorio, pattern
  output:
    url: images/texture_00240_01971_factorio, pattern.png
- text: factorio by Goya
  output:
    url: images/abstract_painting_00116_40985_factorio by Goya.png
- text: factorio
  output:
    url: images/abstract_painting_00000_86389_factorio.png
- text: factorio, fractals
  output:
    url: images/abstract_lines_00039_48448_factorio, fractals.png
- text: pastel drawing of factorio
  output:
    url: images/00019_23936_Pastel drawing of factorio.png
- text: factorio, pixel art, 8-bit colors
  output:
    url: images/00088_97924_factorio, pixel art, 8-bit colors.png
- text: Patent drawing of factorio
  output:
    url: images/00008_06084_Patent drawing of factorio.png
base_model: stabilityai/stable-diffusion-xl-base-1.0
instance_prompt: factorio
license: cc0-1.0
datasets:
- piebro/factorio-blueprint-visualizations
---
# Factorio

<Gallery />

## Model description 

Create abstract art in the style of artfully visualized Factorio blueprints. This Lora is trained using this dataset: https://huggingface.co/datasets/piebro/factorio-blueprint-visualizations.

## Trigger words

You should use `factorio` to trigger the image generation.

## Download model

Weights for this model are available in Safetensors format.

[Download](/piebro/factorio-blueprint-visualizations-sdxl-lora/tree/main) them in the Files & versions tab.


## Replication

This is the command I used using for training the lora, using this [file](https://raw.githubusercontent.com/huggingface/diffusers/1477865e4838d887bb93750dc325e10f1e6ae534/examples/dreambooth/train_dreambooth_lora_sdxl.py).

```bash
accelerate launch train_dreambooth_lora_sdxl.py --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 --pretrained_vae_model_name_or_path=madebyollin/sdxl-vae-fp16-fix --instance_data_dir=factorio_lora_images --instance_prompt='factorio' --output_dir=factorio_lora --seed=0 --resolution=1024 --train_batch_size=2 --max_train_steps=500 --checkpointing_steps=100 --gradient_accumulation_steps=2 --gradient_checkpointing --learning_rate=1e-4 --lr_scheduler=constant --lr_warmup_steps=0 --use_8bit_adam --mixed_precision=fp16
```

## Usage

```python
import torch
from diffusers import DiffusionPipeline, AutoencoderKL
device = "cuda" if torch.cuda.is_available() else "cpu"
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.to(device)
# This is where you load your trained weights
specific_safetensors = "pytorch_lora_weights.safetensors"
lora_scale = 0.9
pipe.load_lora_weights(
    'piebro/factorio-blueprint-visualizations-sdxl-lora', 
    weight_name = specific_safetensors,
)
prompt = "pastel drawing of factorio"
image = pipe(
    prompt=prompt, 
    num_inference_steps=50,
    cross_attention_kwargs={"scale": lora_scale}
).images[0]
```

## List of Example Prompts

### lines
```
Patent drawing of factorio
graphite sketch of factorio
factorio, detailed architectural blueprint style
factorio, intricate pen and ink line art
factorio in a detailed scientific illustration style
factorio, concept sketch
factorio, scientific illustration
Technical schematic of factorio in the style of a detailed patent drawing
factorio depicted in a detailed architectural blueprint style, with precise measurements and labels
factorio in a minimalist, line art drawing
```

### special
```
charcoal drawing of factorio
factorio in watercolor style
factorio, ball-point pen art
factorio visualized in a moody chiaroscuro ink drawing
factorio in a neon-lit digital cyberpunk art style
factorio, Art Deco-style geometric pattern design
factorio in a futuristic, sci-fi digital art concept
factorio, pixel art
factorio, pixel art, 8-bit colors
factorio, retro 1980s style digital pixel art
factorio by Rothko
factorio by Klimt
factorio by Ai Weiwei
```

### normal
```
factorio
a texture of factorio
Pastel drawing of factorio
Pastel drawing of factorio, symetry
factorio, symetry
factorio, fractals
factorio, pattern
factorio, geometric pattern design
factorio, design
factorio, acrylic paint
factorio, Comic Book
factorio rendered in a photorealistic digital art style
factorio, vintage
factorio by Goya
```