adrianhenry commited on
Commit
46c9384
·
verified ·
1 Parent(s): 3828280

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +37 -3
  2. config.yaml +1 -1
  3. lora.safetensors +1 -1
README.md CHANGED
@@ -23,15 +23,37 @@ instance_prompt: HYPER
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 `HYPER` to trigger the image generation.
33
 
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
36
 
37
  ```py
@@ -40,7 +62,19 @@ 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('hyperonsol/hyper-memes', 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)
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  <Gallery />
25
 
26
+ ## About this LoRA
27
 
28
+ This is a [LoRA](https://replicate.com/docs/guides/working-with-loras) for the FLUX.1-dev text-to-image model. It can be used with diffusers or ComfyUI.
29
+
30
+ It was trained on [Replicate](https://replicate.com/) using AI toolkit: https://replicate.com/ostris/flux-dev-lora-trainer/train
31
 
32
 
33
  ## Trigger words
34
+
35
  You should use `HYPER` to trigger the image generation.
36
 
37
 
38
+ ## Run this LoRA with an API using Replicate
39
+
40
+ ```py
41
+ import replicate
42
+
43
+ input = {
44
+ "prompt": "HYPER",
45
+ "lora_weights": "https://huggingface.co/hyperonsol/hyper-memes/resolve/main/lora.safetensors"
46
+ }
47
+
48
+ output = replicate.run(
49
+ "black-forest-labs/flux-dev-lora",
50
+ input=input
51
+ )
52
+ for index, item in enumerate(output):
53
+ with open(f"output_{index}.webp", "wb") as file:
54
+ file.write(item.read())
55
+ ```
56
+
57
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
58
 
59
  ```py
 
62
 
63
  pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
64
  pipeline.load_lora_weights('hyperonsol/hyper-memes', weight_name='lora.safetensors')
65
+ image = pipeline('HYPER').images[0]
66
  ```
67
 
68
  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)
69
+
70
+
71
+ ## Training details
72
+
73
+ - Steps: 6000
74
+ - Learning rate: 0.0004
75
+ - LoRA rank: 16
76
+
77
+
78
+ ## Contribute your own examples
79
+
80
+ You can use the [community tab](https://huggingface.co/hyperonsol/hyper-memes/discussions) to add images that show off what you’ve made with this LoRA.
config.yaml CHANGED
@@ -12,7 +12,7 @@ config:
12
  linear_alpha: 16
13
  save:
14
  dtype: float16
15
- save_every: 6001
16
  max_step_saves_to_keep: 1
17
  datasets:
18
  - folder_path: input_images
 
12
  linear_alpha: 16
13
  save:
14
  dtype: float16
15
+ save_every: 100
16
  max_step_saves_to_keep: 1
17
  datasets:
18
  - folder_path: input_images
lora.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:24ec6a7ab9c166b1db1ae3b9d548eed730e5d2a10f0baf06d6f5356c0f05d02b
3
  size 171969416
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f2aa979de8a4d2f847ac489995de78816372746e81ea8d240f75a9b548dfde7
3
  size 171969416