Downloads · 30 days
0
Xibanya/sunset_city
sunset_city is a text-to-image model from Xibanya. Use it when you need an image from a text prompt. The card lists the license as cc-by-sa-4.0.
This is the Malevich ruDALL-E model finetuned on anime screenshots of big cities at sunset. <img style="text-align:center; display:block;" src="https://huggingface.co/Xibanya/sunsetcity/resolve/main/citysunset.png" wi…
Downloads · 30 days
0
Access
Public
Updated Feb 15, 2022
Repo size
2.6 GB
Likes
3
Public
Click a slice to open those files.
.pt2.6 GB · 100%
From the Hugging Face model README
This is the Malevich ruDALL-E model finetuned on anime screenshots of big cities at sunset. <img style="text-align:center; display:block;" src="https://huggingface.co/Xibanya/sunset_city/resolve/main/citysunset.png" width="256">
pip install rudalle
Basic implementation to get a list of image data objects.
from translate import Translator
from rudalle import get_rudalle_model, get_tokenizer, get_vae
from rudalle.pipelines import generate_images
model = get_rudalle_model('Malevich', pretrained=True, fp16=True, device='cuda')
model.load_state_dict(torch.load(CHECKPOINT_PATH))
vae = get_vae().to('cuda')
tokenizer = get_tokenizer()
input_text = Translator(to_lang='ru').translate('city at sunset')
images, _ = generate_images(
text=input_text,
tokenizer=tokenizer, dalle=model, vae=vae,
images_num=1,
top_k=2048,
top_p=0.95,
temperature=1.0
)
the Malevich model only recognizes input in Russian. If you're going to paste Cyrillic directly into the code rather than filter an English prompt through the translate API, you will need to put this at the top of the file:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-