Diffusion models have recently been shown to generate high-quality synthetic images, especially when paired with a guidance technique to trade off diversity for fidelity. We explore diffusion models for the problem of text-conditional image synthesis and compare two different guidance strategies: CLIP guidance and classifier-free guidance. We find that the latter is preferred by human evaluators for both photorealism and caption similarity, and often produces photorealistic samples. Samples from a 3.5 billion parameter text-conditional diffusion model using classifier-free guidance are favored by human evaluators to those from DALL-E, even when the latter uses expensive CLIP reranking. Additionally, we find that our models can be fine-tuned to perform image inpainting, enabling powerful text-driven image editing.
Usage
# !pip install diffusersimport torch
from diffusers import DiffusionPipeline
import PIL.Image
model_id = "fusing/glide-base"# load model and scheduler
pipeline = DiffusionPipeline.from_pretrained(model_id)
# run inference (text-conditioned denoising + upscaling)
img = pipeline("a crayon drawing of a corgi")
# process image to PIL
img = img.squeeze(0)
img = ((img + 1)*127.5).round().clamp(0, 255).to(torch.uint8).cpu().numpy()
image_pil = PIL.Image.fromarray(img)
# save image
image_pil.save("test.png")
Samples
Runs of fusing glide-base on huggingface.co
9
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
9
30-day runs
More Information About glide-base huggingface.co Model
glide-base huggingface.co is an AI model on huggingface.co that provides glide-base's model effect (), which can be used instantly with this fusing glide-base model. huggingface.co supports a free trial of the glide-base model, and also provides paid use of the glide-base. Support call glide-base model through api, including Node.js, Python, http.
glide-base huggingface.co is an online trial and call api platform, which integrates glide-base's modeling effects, including api services, and provides a free online trial of glide-base, you can try glide-base online for free by clicking the link below.
fusing glide-base online free url in huggingface.co:
glide-base is an open source model from GitHub that offers a free installation service, and any user can find glide-base on GitHub to install. At the same time, huggingface.co provides the effect of glide-base install, users can directly use glide-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.