Here are some examples of images generated using this style LoRA:
Inference Example
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image, peft_utils
import torch
try: # A temp hack for some version diffusers lora loading problemfrom diffusers.utils.peft_utils import _derive_exclude_modules
defnew_derive_exclude_modules(*args, **kwargs):
exclude_modules = _derive_exclude_modules(*args, **kwargs)
if exclude_modules isnotNone:
exclude_modules = [n for n in exclude_modules if"proj_out"notin n]
return exclude_modules
peft_utils._derive_exclude_modules = new_derive_exclude_modules
except:
pass
pipe = FluxKontextPipeline.from_pretrained("HighCWu/FLUX.1-Kontext-dev-bnb-hqq-4bit", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("HighCWu/Jojo_lora_4bit_training_v2", weight_name="flux_kontext_jojo_style_lora_v2.safetensors", adapter_name="jojo")
pipe.set_adapters(["jojo"], [1.0])
pipe.to("cuda")
# Load a source image (you can use any image)
image = load_image("https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg").resize((1024, 1024))
# Prepare the prompt# The style_name is used in the prompt and for the output filename.
style_name = "JojoV2"
prompt = f"Turn this image into the style of JoJo's Bizarre Adventure. "# Run inference
result_image = pipe(
image=image,
prompt=prompt,
height=1024,
width=1024,
guidance_scale=4.0,
num_inference_steps=28,
).images[0]
# Save the result
output_filename = f"{style_name.replace(' ', '_')}.png"
result_image.save(output_filename)
print(f"Image saved as {output_filename}")
Feel free to open an issue or contact us for feedback or collaboration!
Runs of HighCWu Jojo_lora_4bit_training_v2 on huggingface.co
19
Total runs
0
24-hour runs
5
3-day runs
4
7-day runs
7
30-day runs
More Information About Jojo_lora_4bit_training_v2 huggingface.co Model
Jojo_lora_4bit_training_v2 huggingface.co
Jojo_lora_4bit_training_v2 huggingface.co is an AI model on huggingface.co that provides Jojo_lora_4bit_training_v2's model effect (), which can be used instantly with this HighCWu Jojo_lora_4bit_training_v2 model. huggingface.co supports a free trial of the Jojo_lora_4bit_training_v2 model, and also provides paid use of the Jojo_lora_4bit_training_v2. Support call Jojo_lora_4bit_training_v2 model through api, including Node.js, Python, http.
Jojo_lora_4bit_training_v2 huggingface.co is an online trial and call api platform, which integrates Jojo_lora_4bit_training_v2's modeling effects, including api services, and provides a free online trial of Jojo_lora_4bit_training_v2, you can try Jojo_lora_4bit_training_v2 online for free by clicking the link below.
HighCWu Jojo_lora_4bit_training_v2 online free url in huggingface.co:
Jojo_lora_4bit_training_v2 is an open source model from GitHub that offers a free installation service, and any user can find Jojo_lora_4bit_training_v2 on GitHub to install. At the same time, huggingface.co provides the effect of Jojo_lora_4bit_training_v2 install, users can directly use Jojo_lora_4bit_training_v2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Jojo_lora_4bit_training_v2 install url in huggingface.co: