import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'quzo/iwatch2'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
pipeline.load_lora_weights(adapter_id)
prompt = "photo of iwatch"## 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
model_output = 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]
model_output.save("output.png", format="PNG")
Runs of quzo iwatch2 on huggingface.co
16
Total runs
0
24-hour runs
2
3-day runs
4
7-day runs
13
30-day runs
More Information About iwatch2 huggingface.co Model
iwatch2 huggingface.co is an AI model on huggingface.co that provides iwatch2's model effect (), which can be used instantly with this quzo iwatch2 model. huggingface.co supports a free trial of the iwatch2 model, and also provides paid use of the iwatch2. Support call iwatch2 model through api, including Node.js, Python, http.
iwatch2 huggingface.co is an online trial and call api platform, which integrates iwatch2's modeling effects, including api services, and provides a free online trial of iwatch2, you can try iwatch2 online for free by clicking the link below.
iwatch2 is an open source model from GitHub that offers a free installation service, and any user can find iwatch2 on GitHub to install. At the same time, huggingface.co provides the effect of iwatch2 install, users can directly use iwatch2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.