five

diffusers-parti-prompts/sdxl-1.0

收藏
Hugging Face2023-07-30 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/diffusers-parti-prompts/sdxl-1.0
下载链接
链接失效反馈
官方服务:
资源简介:
--- dataset_info: features: - name: Prompt dtype: string - name: Category dtype: string - name: Challenge dtype: string - name: Note dtype: string - name: images dtype: image - name: model_name dtype: string - name: seed dtype: int64 splits: - name: train num_bytes: 189820015.232 num_examples: 1632 download_size: 189815139 dataset_size: 189820015.232 --- # Dataset Card for "sdxl-1.0" Dataset was generated using the code below: ```python import torch from datasets import Dataset, Features from datasets import Image as ImageFeature from datasets import Value, load_dataset from diffusers import DDIMScheduler, DiffusionPipeline import PIL def main(): print("Loading dataset...") parti_prompts = load_dataset("nateraw/parti-prompts", split="train") print("Loading pipeline...") ckpt_id = "stabilityai/stable-diffusion-xl-base-1.0" pipe = DiffusionPipeline.from_pretrained( ckpt_id, torch_dtype=torch.float16, use_auth_token=True ).to("cuda") pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config) pipe.set_progress_bar_config(disable=True) seed = 0 generator = torch.Generator("cuda").manual_seed(seed) print("Running inference...") main_dict = {} for i in range(len(parti_prompts)): sample = parti_prompts[i] prompt = sample["Prompt"] image = pipe( prompt, generator=generator, num_inference_steps=100, guidance_scale=7.5, ).images[0] image = image.resize((256, 256), resample=PIL.Image.Resampling.LANCZOS) img_path = f"sd_xl_{i}.png" image.save(img_path) main_dict.update( { prompt: { "img_path": img_path, "Category": sample["Category"], "Challenge": sample["Challenge"], "Note": sample["Note"], "model_name": ckpt_id, "seed": seed, } } ) def generation_fn(): for prompt in main_dict: prompt_entry = main_dict[prompt] yield { "Prompt": prompt, "Category": prompt_entry["Category"], "Challenge": prompt_entry["Challenge"], "Note": prompt_entry["Note"], "images": {"path": prompt_entry["img_path"]}, "model_name": prompt_entry["model_name"], "seed": prompt_entry["seed"], } print("Preparing HF dataset...") ds = Dataset.from_generator( generation_fn, features=Features( Prompt=Value("string"), Category=Value("string"), Challenge=Value("string"), Note=Value("string"), images=ImageFeature(), model_name=Value("string"), seed=Value("int64"), ), ) ds_id = "diffusers-parti-prompts/sdxl-1.0" ds.push_to_hub(ds_id) if __name__ == "__main__": main()
提供机构:
diffusers-parti-prompts
原始信息汇总

数据集概述

数据集名称

"sdxl-1.0"

数据集特征

  • Prompt: 数据类型为字符串。
  • Category: 数据类型为字符串。
  • Challenge: 数据类型为字符串。
  • Note: 数据类型为字符串。
  • images: 数据类型为图像。
  • model_name: 数据类型为字符串。
  • seed: 数据类型为int64。

数据集划分

  • train: 包含1632个样本,总大小为189820015.232字节。

数据集大小

  • 下载大小: 189815139字节
  • 数据集总大小: 189820015.232字节
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作