Instructions to use aimalias/jg4s with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use aimalias/jg4s with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("krea/Krea-2-Raw", torch_dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("aimalias/jg4s") prompt = "A JG4S woman wearing a shimmering silver space suit, standing on the iridescent sands of a neon-lit alien planet under three moons." image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,73 +1,57 @@
|
|
| 1 |
---
|
| 2 |
base_model: krea/Krea-2-Raw
|
| 3 |
-
library_name: diffusers
|
| 4 |
-
license: apache-2.0
|
| 5 |
-
instance_prompt: JG4S woman
|
| 6 |
-
widget: []
|
| 7 |
tags:
|
| 8 |
- text-to-image
|
| 9 |
-
- diffusers-training
|
| 10 |
- diffusers
|
| 11 |
- lora
|
| 12 |
- krea2
|
| 13 |
-
- krea2-diffusers
|
| 14 |
- template:sd-lora
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
-
|
| 18 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# Krea 2 DreamBooth LoRA - aimalias/jg4s
|
| 22 |
|
| 23 |
<Gallery />
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
| 44 |
-
>>> import torch
|
| 45 |
-
>>> from diffusers import Krea2Pipeline
|
| 46 |
-
|
| 47 |
-
>>> # Load the LoRA onto Krea 2 Turbo (the distilled inference model)
|
| 48 |
-
>>> pipe = Krea2Pipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16).to("cuda")
|
| 49 |
-
>>> pipe.load_lora_weights("aimalias/jg4s")
|
| 50 |
-
|
| 51 |
-
>>> # Turbo recipe: 8 steps, no classifier-free guidance
|
| 52 |
-
>>> image = pipe("JG4S woman", num_inference_steps=8, guidance_scale=0.0).images[0]
|
| 53 |
-
>>> image.save("output.png")
|
| 54 |
-
```
|
| 55 |
|
| 56 |
-
|
| 57 |
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
```python
|
| 64 |
-
# TODO: add an example code snippet for running this diffusion pipeline
|
| 65 |
```
|
| 66 |
-
|
| 67 |
-
#### Limitations and bias
|
| 68 |
-
|
| 69 |
-
[TODO: provide examples of latent issues and potential remediations]
|
| 70 |
-
|
| 71 |
-
## Training details
|
| 72 |
-
|
| 73 |
-
[TODO: describe the data used to train the model]
|
|
|
|
| 1 |
---
|
| 2 |
base_model: krea/Krea-2-Raw
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
- text-to-image
|
|
|
|
| 5 |
- diffusers
|
| 6 |
- lora
|
| 7 |
- krea2
|
|
|
|
| 8 |
- template:sd-lora
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
instance_prompt: "JG4S woman"
|
| 11 |
+
widget:
|
| 12 |
+
- text: "A JG4S woman wearing a shimmering silver space suit, standing on the iridescent sands of a neon-lit alien planet under three moons."
|
| 13 |
+
output:
|
| 14 |
+
url: sample_0.png
|
| 15 |
+
- text: "A JG4S woman dressed in a flowing linen gown, reading an ancient leather-bound book in a sun-drenched Tuscan library filled with vines."
|
| 16 |
+
output:
|
| 17 |
+
url: sample_1.png
|
| 18 |
+
- text: "A JG4S woman as a cyberpunk street racer, leaning against a chrome hover-car in a rainy Tokyo alleyway illuminated by flickering holographic ads."
|
| 19 |
+
output:
|
| 20 |
+
url: sample_2.png
|
| 21 |
---
|
| 22 |
|
| 23 |
+
# Krea 2 LoRA — aimalias/jg4s
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
<Gallery />
|
| 26 |
|
| 27 |
+
A DreamBooth-LoRA for **Krea 2**, trained on **Krea 2 RAW** and shown on **Krea 2 Turbo**. The samples below were generated with this LoRA on Turbo (8 steps).
|
| 28 |
|
| 29 |
+
## Trigger
|
| 30 |
|
| 31 |
+
Use the token `JG4S woman` to invoke the concept.
|
| 32 |
|
| 33 |
+
## Samples
|
| 34 |
|
| 35 |
+

|
| 36 |
|
| 37 |
+
> *"A JG4S woman wearing a shimmering silver space suit, standing on the iridescent sands of a neon-lit alien planet under three moons."*
|
| 38 |
|
| 39 |
+

|
| 40 |
|
| 41 |
+
> *"A JG4S woman dressed in a flowing linen gown, reading an ancient leather-bound book in a sun-drenched Tuscan library filled with vines."*
|
| 42 |
|
| 43 |
+

|
| 44 |
|
| 45 |
+
> *"A JG4S woman as a cyberpunk street racer, leaning against a chrome hover-car in a rainy Tokyo alleyway illuminated by flickering holographic ads."*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
## Use it with diffusers
|
| 48 |
|
| 49 |
+
```py
|
| 50 |
+
import torch
|
| 51 |
+
from diffusers import Krea2Pipeline
|
| 52 |
|
| 53 |
+
pipe = Krea2Pipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16).to("cuda")
|
| 54 |
+
pipe.load_lora_weights("aimalias/jg4s")
|
| 55 |
+
image = pipe("A JG4S woman wearing a shimmering silver space suit, standing on the iridescent sands of a neon-lit alien planet under three moons.", num_inference_steps=8, guidance_scale=0.0).images[0]
|
| 56 |
+
image.save("output.png")
|
|
|
|
|
|
|
| 57 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|