from diffusers import CogView3PlusPipeline
import torch
pipe = CogView3PlusPipeline.from_pretrained("THUDM/CogView3-Plus-3B", torch_dtype=torch.float16).to("cuda")
# Enable it to reduce GPU memory usage
pipe.enable_model_cpu_offload()
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()
prompt = "A vibrant cherry red sports car sits proudly under the gleaming sun, its polished exterior smooth and flawless, casting a mirror-like reflection. The car features a low, aerodynamic body, angular headlights that gaze forward like predatory eyes, and a set of black, high-gloss racing rims that contrast starkly with the red. A subtle hint of chrome embellishes the grille and exhaust, while the tinted windows suggest a luxurious and private interior. The scene conveys a sense of speed and elegance, the car appearing as if it's about to burst into a sprint along a coastal road, with the ocean's azure waves crashing in the background."
image = pipe(
prompt=prompt,
guidance_scale=7.0,
num_images_per_prompt=1,
num_inference_steps=50,
width=1024,
height=1024,
).images[0]
image.save("cogview3.png")
For more content and to download the original SAT weights, please visit our
GitHub
.
Citation
🌟 If you find our work helpful, feel free to cite our paper and leave a star:
@article{zheng2024cogview3,
title={Cogview3: Finer and faster text-to-image generation via relay diffusion},
author={Zheng, Wendi and Teng, Jiayan and Yang, Zhuoyi and Wang, Weihan and Chen, Jidong and Gu, Xiaotao and Dong, Yuxiao and Ding, Ming and Tang, Jie},
journal={arXiv preprint arXiv:2403.05121},
year={2024}
}
CogView3-Plus-3B huggingface.co is an AI model on huggingface.co that provides CogView3-Plus-3B's model effect (), which can be used instantly with this THUDM CogView3-Plus-3B model. huggingface.co supports a free trial of the CogView3-Plus-3B model, and also provides paid use of the CogView3-Plus-3B. Support call CogView3-Plus-3B model through api, including Node.js, Python, http.
CogView3-Plus-3B huggingface.co is an online trial and call api platform, which integrates CogView3-Plus-3B's modeling effects, including api services, and provides a free online trial of CogView3-Plus-3B, you can try CogView3-Plus-3B online for free by clicking the link below.
THUDM CogView3-Plus-3B online free url in huggingface.co:
CogView3-Plus-3B is an open source model from GitHub that offers a free installation service, and any user can find CogView3-Plus-3B on GitHub to install. At the same time, huggingface.co provides the effect of CogView3-Plus-3B install, users can directly use CogView3-Plus-3B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.