Instructions to use AbstractPhil/sd15-flow-lune-json-prompt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AbstractPhil/sd15-flow-lune-json-prompt with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AbstractPhil/sd15-flow-lune-json-prompt", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
The json test train was highly successful. This merits a large expansion.
Installing dependenciesβ¦
done.
HF token: secrets
WARNING:torchao:Skipping import of cpp extensions due to incompatible torch version. Please upgrade to torch >= 2.11.0 (found 2.10.0+cu128).
Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao`
Flax classes are deprecated and will be removed in Diffusers v1.0.0. We recommend migrating to PyTorch classes or pinning your version of Diffusers.
Flax classes are deprecated and will be removed in Diffusers v1.0.0. We recommend migrating to PyTorch classes or pinning your version of Diffusers.
/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_validators.py:205: UserWarning: The `local_dir_use_symlinks` argument is deprecated and ignored in `hf_hub_download`. Downloading to a local directory does not use symlinks anymore.
warnings.warn(
GPU: NVIDIA A100-SXM4-80GB
Loading VAE + CLIP from stable-diffusion-v1-5/stable-diffusion-v1-5β¦
config.json:β100%
β547/547β[00:00<00:00,β69.1kB/s]
vae/diffusion_pytorch_model.safetensors:β100%
β335M/335Mβ[00:02<00:00,β378MB/s]
tokenizer_config.json:β100%
β806/806β[00:00<00:00,β112kB/s]
vocab.json:β
β1.06M/?β[00:00<00:00,β41.2MB/s]
merges.txt:β
β525k/?β[00:00<00:00,β39.4MB/s]
special_tokens_map.json:β100%
β472/472β[00:00<00:00,β67.1kB/s]
config.json:β100%
β617/617β[00:00<00:00,β72.3kB/s]
text_encoder/model.safetensors:β100%
β492M/492Mβ[00:02<00:00,β493MB/s]
Loadingβweights:β100%
β196/196β[00:00<00:00,β3476.41it/s]
β VAE + CLIP loaded
Streaming test rows from AbstractPhil/synthetic-object-relations-jsonβ¦
β 6 test rows
ββββ before (base lune) (AbstractPhil/sd15-flow-lune-flux/flux_t2_6_pose_t4_6_port_t1_4/checkpoint-00018765/unet) ββββ
config.json:β
β1.83k/?β[00:00<00:00,β211kB/s]
flux_t2_6_pose_t4_6_port_t1_4/checkpoint(β¦):β100%
β3.44G/3.44Gβ[00:12<00:00,β524MB/s]
β generated 6 images (conditioned on json_prompt)
ββββ after: prompt-JSON (AbstractPhil/sd15-flow-lune-json-prompt/checkpoint-00002500/unet) ββββ
config.json:β
β1.83k/?β[00:00<00:00,β219kB/s]
checkpoint-00002500/unet/diffusion_pytor(β¦):β100%
β3.44G/3.44Gβ[00:21<00:00,β390MB/s]
β generated 6 images (conditioned on json_prompt)
ββββ after: vit-JSON (AbstractPhil/sd15-flow-lune-json-vit/checkpoint-00002000/unet) ββββ
config.json:β
β1.83k/?β[00:00<00:00,β213kB/s]
checkpoint-00002000/unet/diffusion_pytor(β¦):β100%
β3.44G/3.44Gβ[00:16<00:00,β388MB/s]
β generated 6 images (conditioned on vit_json_prompt)
Saved grid: /content/lune_before_after.png
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Test prompts (row order)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
#0 banana on pergola
json_prompt : {"subjects":[{"name":"banana"},{"name":"pergola"},{"name":"spirit photography"}],"actions":["on pergola"],"setting":"outdoor"}
vit_json_prompt: {"subjects":[{"name":"bananas","attributes":["ripe","yellow","bunch"]},{"name":"trellis","attributes":["wooden"]},{"name":"foliage","attributes":["lush","green"]}],"actions":["hangs from a wooden trellis","surrounded by lush green foliage"],"setting":"outdoor"}
#1 tomato next to banana
json_prompt : {"subjects":[{"name":"tomato","attributes":["highly detailed"]},{"name":"banana","attributes":["highly detailed"]}],"actions":["next to banana"],"setting":"unknown"}
vit_json_prompt: {"subjects":[{"name":"tomato","attributes":["ripe","red"]},{"name":"zucchini","attributes":["partially peeled","green"]},{"name":"banana","attributes":["yellow"]},{"name":"orange","attributes":["halved"]},{"name":"wooden surface"},{"name":"lighting effect","attributes":["sunlit","artistic"]}],"actions":["arranged on a wooden surface"],"setting":"unknown"}
#3 blueberry beside pepper
json_prompt : {"subjects":[{"name":"blueberry"},{"name":"pepper"}],"actions":["beside pepper"],"setting":"unknown"}
vit_json_prompt: {"subjects":[{"name":"blueberries","attributes":["fresh"]},{"name":"bell pepper","attributes":["red"]},{"name":"leaves","attributes":["green","a few"]}],"actions":["close-up of fresh blueberries and a red bell pepper"],"setting":"unknown"}
#4 raspberry beside squash on virtual reality platform
json_prompt : {"subjects":[{"name":"raspberry"},{"name":"squash"},{"name":"virtual reality platform","attributes":["stylized","h 704"]}],"actions":["beside squash on virtual reality platform"],"setting":"unknown"}
vit_json_prompt: {"subjects":[{"name":"pumpkin","attributes":["golden-orange","dark stem"]},{"name":"leaves","attributes":["fresh","green"]},{"name":"raspberries","attributes":["bright red","two"]},{"name":"surface","attributes":["dark"]}],"actions":["surrounded by fresh green leaves and two bright red raspberries on a dark surface"],"setting":"unknown"}
#5 white dress caught on divider
json_prompt : {"subjects":[{"name":"dress","attributes":["white"]},{"name":"divider"}],"actions":["caught on divider"],"setting":"unknown"}
vit_json_prompt: {"subjects":[{"name":"wedding dress"},{"name":"hanger","attributes":["white"]},{"name":"fabric drapes","attributes":["cascading","pink"]},{"name":"curtain backdrop","attributes":["sheer"]}],"actions":["hangs on a white hanger","surrounded by cascading pink fabric drapes and a sheer curtain backdrop"],"setting":"indoor"}
#6 cotton light fixture
json_prompt : {"subjects":[{"name":"light fixture","attributes":["cotton"]},{"name":"cosmic apocalypse"}],"actions":[],"setting":"unknown"}
vit_json_prompt: {"subjects":[{"name":"Edison light bulb","attributes":["warm","glowing"]},{"name":"night sky","attributes":["dark","starry"]},{"name":"cotton buds"},{"name":"stars","attributes":["twinkling"]}],"actions":["hangs from a dark, starry night sky","surrounded by cotton buds and twinkling stars"],"setting":"outdoor"}
Reading the grid:
β’ 'before' conditioned on JSON it never trained on β expect incoherent or
prompt-ignoring output. That is the baseline the finetune has to beat.
β’ 'after' columns should track the target's content. prompt-JSON vs vit-JSON
shows whether image-aligned conditioning produced the better model.
β’ All models share the same initial noise (SEED), so differences are weights,
not luck.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
