import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'quzo/em94'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
pipeline.load_lora_weights(adapter_id)
prompt = "chubby fat woman em94"## Optional: quantise the model to save on vram.## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.#from optimum.quanto import quantize, freeze, qint8#quantize(pipeline.transformer, weights=qint8)#freeze(pipeline.transformer)
pipeline.to('cuda'if torch.cuda.is_available() else'mps'if torch.backends.mps.is_available() else'cpu') # the pipeline is already in its target precision level
image = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda'if torch.cuda.is_available() else'mps'if torch.backends.mps.is_available() else'cpu').manual_seed(42),
width=1024,
height=1024,
guidance_scale=3.0,
).images[0]
image.save("output.png", format="PNG")
em94 huggingface.co is an AI model on huggingface.co that provides em94's model effect (), which can be used instantly with this quzo em94 model. huggingface.co supports a free trial of the em94 model, and also provides paid use of the em94. Support call em94 model through api, including Node.js, Python, http.
em94 huggingface.co is an online trial and call api platform, which integrates em94's modeling effects, including api services, and provides a free online trial of em94, you can try em94 online for free by clicking the link below.
em94 is an open source model from GitHub that offers a free installation service, and any user can find em94 on GitHub to install. At the same time, huggingface.co provides the effect of em94 install, users can directly use em94 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.