AlekseyCalvin commited on
Commit
ea718e2
1 Parent(s): 4aa3259

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +23 -49
  2. config.yaml +64 -47
  3. lora.safetensors +3 -0
README.md CHANGED
@@ -1,59 +1,35 @@
1
  ---
2
- license: apache-2.0
3
-
 
 
 
4
  tags:
5
- - text-to-image
6
- - template:sd-lora
7
  - flux
8
- - lora
9
- - flux dev
10
- - image-generation
11
  - diffusers
12
- - photo
 
 
13
  pipeline_tag: text-to-image
14
- emoji: 🔜
15
- language:
16
- - en
17
- base_model: black-forest-labs/FLUX.1-dev
18
-
19
- instance_prompt: HST autochrome photo
20
-
21
- widget:
22
- - text: HST style photo of a green-eyed cat, centered title text HISTORIC COLOR DEV
23
- output:
24
- url: hstdev2.png
25
- - text: autochrome HST style photo of a green-eyed cat, centered title text HISTORIC COLOR DEV
26
- output:
27
- url: hstdev5.png
28
-
29
  ---
30
 
31
- # Soonr Flux HST IV: HISTORIC COLOR 2 Dev
32
- A Dev version of our antique color photography LoRA for [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-Dev).
33
- See our [Schnell Version](/AlekseyCalvin/historic_color_schnell/tree/main) for a somewhat more explicit iteration of this adapter.
34
- Trained by A.C.T. Soon® for 6000 steps, using a very low learning rate, on one A100 via Colab Pro, using an AI Toolkit notebook by Ostris.
35
- While our Schnell version of this LoRA was trained on a relatively large archive, 300 images, for the Dev variation we used a slightly smaller selection of high quality restored choice images from an expanded data set. Historic Color 3 will have yet another variant, trained on highest quality scans of original negatives.
36
- This data set, used for both models, consists of a selection from a remarkable and unique collection of color photographs taken during the 1900s and 1910s by Sergey Prokudin-Gorsky, who traveled and photographed widely in those years while pioneering and perfecting implementations of an early three-color-composite photography technique.
37
- We urge you to explore the work of Prokudin-Gorsky for yourself, at the wonderfully organized online [archive at this link](https://prokudin-gorsky.org/), featuring many hundreds of high quality downloadable scans of composite color photo prints from the photographer's original glass plate negatives, available at this site alongside relatively recent restorations of a substantial portion of the images. The original glass-plate negatives are currently held at and administrated by the Library of Congress in Washington, DC, USA.
38
-
39
- ## Trigger words
40
- You should use `HST` or 'HST style' to trigger the image generation.
41
 
42
- - base model: [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev)
43
 
44
- <Gallery />
45
 
46
- ## Historical Note
47
- Prokudin-Gorsky's color photography technique would involve three photo-exposures, either simultaneous or sequential, using specialized color-spectrum filters (basically R.B.G.: red, blue, and green), rendering the same subject/shot onto glass plates covered with light-emulsive mixture. Prokudin-Gorsky's focus on refining the developer and filter quality, in tandem with his incessant and wide-ranging experimentation, and his persistent usage of glass plates (unwieldly and increasingly old-fashioned, but elsewise extra reliable) ultimately led him to produce a color photography oeuvre of much greater fidelity and vividness than achieved by most of his contemporaries.
48
- At the same time, the peculiarities of the photographer's method, coupled with his exceptionally hands-on execution thereof, would manifest in a range of idyosyncratic color, light, and motion artifacts common across the resulting prints. Seldom marring the image as a whole, and less grave than the weaknesses of some contemporenously emerging autochrome techniques, the warm color hazes and flares framing many of Prokudin-Gorsky's prints may be seen as a kind of ephemeral signature.
49
- Alongside some of the more subtle chromatic, textural, and (in some measure) figural characteristics of his work, these auras have imprinted themselves into this Flux LoRA, the fourth in our series of historical adapters for Flux.
50
 
51
- ![HST style autochrome photo of a dark koala building a hut in snowy mountains](hstdev1.jpg)
52
 
53
- ## Download model
54
-
55
- Weights for this model are available in Safetensors format.
56
- [Download](/AlekseyCalvin/historic_color_dev/tree/main) them in the Files & versions tab.
57
 
58
 
59
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
@@ -62,11 +38,9 @@ Weights for this model are available in Safetensors format.
62
  from diffusers import AutoPipelineForText2Image
63
  import torch
64
 
65
- pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.bfloat16).to('cuda')
66
- pipeline.load_lora_weights('AlekseyCalvin/historic_color_dev')
67
- image = pipeline('HST style photo of a cat').images[0]
68
- image.save("my_image.png")
69
  ```
70
 
71
  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)
72
-
 
1
  ---
2
+ license: other
3
+ license_name: flux-1-dev-non-commercial-license
4
+ license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
5
+ language:
6
+ - en
7
  tags:
 
 
8
  - flux
 
 
 
9
  - diffusers
10
+ - lora
11
+ - replicate
12
+ base_model: "black-forest-labs/FLUX.1-dev"
13
  pipeline_tag: text-to-image
14
+ # widget:
15
+ # - text: >-
16
+ # prompt
17
+ # output:
18
+ # url: https://...
19
+ instance_prompt: HST
 
 
 
 
 
 
 
 
 
20
  ---
21
 
22
+ # Historic_Color_Dev
 
 
 
 
 
 
 
 
 
23
 
24
+ <!-- <Gallery /> -->
25
 
26
+ Trained on Replicate using:
27
 
28
+ https://replicate.com/ostris/flux-dev-lora-trainer/train
 
 
 
29
 
 
30
 
31
+ ## Trigger words
32
+ You should use `HST` to trigger the image generation.
 
 
33
 
34
 
35
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
 
38
  from diffusers import AutoPipelineForText2Image
39
  import torch
40
 
41
+ pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
42
+ pipeline.load_lora_weights('alekseycalvin/historic_color_dev', weight_name='lora.safetensors')
43
+ image = pipeline('your prompt').images[0]
 
44
  ```
45
 
46
  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)
 
config.yaml CHANGED
@@ -1,87 +1,104 @@
1
- job: extension
2
  config:
3
- name: Historic_Color_DEV
4
  process:
5
- - type: sd_trainer
6
- training_folder: /content/output
7
  device: cuda:0
 
8
  network:
9
  type: lora
10
- linear: 16
11
- linear_alpha: 16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  save:
13
  dtype: float16
14
- save_every: 1000
15
- max_step_saves_to_keep: 4
16
  datasets:
17
- - folder_path: /content/dataset
18
  caption_ext: txt
19
  caption_dropout_rate: 0.05
20
  shuffle_tokens: false
21
- cache_latents_to_disk: true
 
22
  resolution:
23
  - 512
24
  - 768
25
  - 1024
26
  train:
27
  batch_size: 1
28
- steps: 3000
29
  gradient_accumulation_steps: 1
30
  train_unet: true
31
  train_text_encoder: false
32
- content_or_style: style
33
  gradient_checkpointing: true
34
  noise_scheduler: flowmatch
35
  optimizer: adamw8bit
36
- lr: 0.0001
37
- skip_first_sample: true
38
- linear_timesteps: true
39
  ema_config:
40
  use_ema: true
41
  ema_decay: 0.99
42
  dtype: bf16
43
  model:
44
- name_or_path: black-forest-labs/FLUX.1-dev
45
  is_flux: true
46
  quantize: true
47
  sample:
48
  sampler: flowmatch
49
- sample_every: 1000
50
  width: 1024
51
  height: 1024
52
- prompts:
53
- - HST style photo of Lenin in 1924 surrounded by two other individuals on either
54
- side of him. Film photograph, three-quarter length, from front. Lenin in the
55
- center, wearing a white outfit sits in a wicker wheelchair, wearing a white
56
- shirt and flat cap. His eyes look intense and slightly demented. He seems
57
- convalescent and ill following a stroke. A woman in a white dress with a black
58
- belt stands to the left, leaning forward with her hands on the back of the
59
- wheelchair.
60
- - HST style Arthur Rimbaud. He is dressed in a dark suit with a white shirt
61
- and a maroon tie with small white polka dots. He is looking to his right with
62
- an inquisitive expression.
63
- - HST nightclub in 1921 USSR,, fish eye lens, smoke machine, lazer lights, Trotsky
64
- holding a martini
65
- - HST style Andrey Beliy showing off his cool new poetry books at the beach
66
- in 1921 USSR, a shark is jumping out of the water to eat the books, Beliy
67
- screams in surprise
68
- - HST style Alexey Khvostenko and Anri Volokhonskiy and a bear collaborate building
69
- a log cabin in the snow covered mountains
70
- - HST style Viktor Tsoy soulfully playing the guitar, on stage in 1921 USSR,
71
- singing a song, laser lights, punk rocker
72
- - HST style Lawrence from Felt
73
- - HST style Medium-frame photo of Robert Duncan the poet sitting in his office,
74
- wearing a dark suit and tie. Bust view, facing forward. Sitting with hands
75
- resting, neutral facial expression. Bookshelves filled with books in the background.
76
- Wooden furniture in the surrounding space.
77
- - HST style Lenin in cap and Bolshevik suit holding a sign with text, 'World
78
- workers, all our eyes!'
79
- - HST style Egor Letov in a leather jacket, in a desert, on a motorcycle
80
  neg: ''
81
  seed: 42
82
  walk_seed: true
83
  guidance_scale: 3.5
84
- sample_steps: 20
85
  meta:
86
- name: Historic_Color_DEV
87
  version: '1.0'
 
1
+ job: custom_job
2
  config:
3
+ name: flux_train_replicate
4
  process:
5
+ - type: custom_sd_trainer
6
+ training_folder: output
7
  device: cuda:0
8
+ trigger_word: HST
9
  network:
10
  type: lora
11
+ linear: 128
12
+ linear_alpha: 128
13
+ network_kwargs:
14
+ only_if_contains:
15
+ - transformer.transformer_blocks.0.norm1.linear
16
+ - transformer.transformer_blocks.0.norm1_context.linear
17
+ - transformer.transformer_blocks.0.attn.to_q
18
+ - transformer.transformer_blocks.0.attn.to_k
19
+ - transformer.transformer_blocks.0.attn.to_v
20
+ - transformer.transformer_blocks.0.attn.add_k_proj
21
+ - transformer.transformer_blocks.0.attn.add_v_proj
22
+ - transformer.transformer_blocks.0.attn.add_q_proj
23
+ - transformer.transformer_blocks.0.attn.to_out.0
24
+ - transformer.transformer_blocks.0.attn.to_add_out
25
+ - transformer.transformer_blocks.0.ff.net.0.proj
26
+ - transformer.transformer_blocks.0.ff.net.2
27
+ - transformer.transformer_blocks.0.ff_context.net.0.proj
28
+ - transformer.transformer_blocks.0.ff_context.net.2
29
+ - transformer.transformer_blocks.2.norm1.linear
30
+ - transformer.transformer_blocks.2.norm1_context.linear
31
+ - transformer.transformer_blocks.2.attn.to_q
32
+ - transformer.transformer_blocks.2.attn.to_k
33
+ - transformer.transformer_blocks.2.attn.to_v
34
+ - transformer.transformer_blocks.2.attn.add_k_proj
35
+ - transformer.transformer_blocks.2.attn.add_v_proj
36
+ - transformer.transformer_blocks.2.attn.add_q_proj
37
+ - transformer.transformer_blocks.2.attn.to_out.0
38
+ - transformer.transformer_blocks.2.attn.to_add_out
39
+ - transformer.transformer_blocks.2.ff.net.0.proj
40
+ - transformer.transformer_blocks.2.ff.net.2
41
+ - transformer.transformer_blocks.2.ff_context.net.0.proj
42
+ - transformer.transformer_blocks.2.ff_context.net.2
43
+ - transformer.transformer_blocks.18.norm1.linear
44
+ - transformer.transformer_blocks.18.norm1_context.linear
45
+ - transformer.transformer_blocks.18.attn.to_q
46
+ - transformer.transformer_blocks.18.attn.to_k
47
+ - transformer.transformer_blocks.18.attn.to_v
48
+ - transformer.transformer_blocks.18.attn.add_k_proj
49
+ - transformer.transformer_blocks.18.attn.add_v_proj
50
+ - transformer.transformer_blocks.18.attn.add_q_proj
51
+ - transformer.transformer_blocks.18.attn.to_out.0
52
+ - transformer.transformer_blocks.18.attn.to_add_out
53
+ - transformer.transformer_blocks.18.ff.net.0.proj
54
+ - transformer.transformer_blocks.18.ff.net.2
55
+ - transformer.transformer_blocks.18.ff_context.net.0.proj
56
+ - transformer.transformer_blocks.18.ff_context.net.2
57
  save:
58
  dtype: float16
59
+ save_every: 501
60
+ max_step_saves_to_keep: 1
61
  datasets:
62
+ - folder_path: input_images
63
  caption_ext: txt
64
  caption_dropout_rate: 0.05
65
  shuffle_tokens: false
66
+ cache_latents_to_disk: false
67
+ cache_latents: true
68
  resolution:
69
  - 512
70
  - 768
71
  - 1024
72
  train:
73
  batch_size: 1
74
+ steps: 500
75
  gradient_accumulation_steps: 1
76
  train_unet: true
77
  train_text_encoder: false
78
+ content_or_style: balanced
79
  gradient_checkpointing: true
80
  noise_scheduler: flowmatch
81
  optimizer: adamw8bit
82
+ lr: 0.0008
 
 
83
  ema_config:
84
  use_ema: true
85
  ema_decay: 0.99
86
  dtype: bf16
87
  model:
88
+ name_or_path: FLUX.1-dev
89
  is_flux: true
90
  quantize: true
91
  sample:
92
  sampler: flowmatch
93
+ sample_every: 501
94
  width: 1024
95
  height: 1024
96
+ prompts: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  neg: ''
98
  seed: 42
99
  walk_seed: true
100
  guidance_scale: 3.5
101
+ sample_steps: 28
102
  meta:
103
+ name: flux_train_replicate
104
  version: '1.0'
lora.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f805a984ab86d51ed715bf3ce92440d1a0ef8750d03415cf9cd3f70a8b72f32c
3
+ size 117976536