Text-to-Image
Diffusers
English
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
Inference Endpoints
Supermaxman commited on
Commit
70c834c
1 Parent(s): bcbc907

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +123 -0
README.md CHANGED
@@ -1,3 +1,126 @@
1
  ---
2
  license: creativeml-openrail-m
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: creativeml-openrail-m
3
+ language:
4
+ - en
5
+ tags:
6
+ - stable-diffusion
7
+ - stable-diffusion-diffusers
8
+ - text-to-image
9
+ widget:
10
+ - text: "Hubble snaps images of the birthplace of stars within a cluster: The dust and gas expand within the cluster due to the powerful influence of baby stars. With these new images comes improved detail and a clearer view for astronomers to study how early stars are born and change over time."
11
+ example_title: Baby Stars
12
+ - text: "Hubble captures the death of a star: Old stars, nearing the end of their life, collapse under the weight of their own gravity and the outer layers explode as a 'supernova'. In this image Hubble captures the moments after collapse, where the star has exploded and left an empty void in its place, where a new black hole has emerged."
13
+ example_title: Old Stars
14
+ - text: "Hubble image of galaxies colliding: The distorted spirals of two distant galaxies colliding are captured here in a new image from the NASA/ESA Hubble Space Telescope. The typically symmetric spirals common in spiral galaxies appear significantly warped, as the shape of both galaxies is torn apart by their gravitational pulls."
15
+ example_title: Galaxies Collide
16
+ - text: "Pink-tinted plumes in the Large Magellanic Cloud: The aggressively pink plumes seen in this image are extremely uncommon, with purple-tinted currents and nebulous strands reaching out into the surrounding space."
17
+ example_title: Pink Plumes
18
+ - text: "The stellar plasma of Wolf 359: The red dwarf star Wolf 359 from the constellation Leo is captured in extreme detail in a new image from the NASA/ESA Hubble Space Telescope. Wolf 359, classified as a M6 red dwarf, has certain peculiar qualities indicated by an unusual ejection of plasma. The Hubble telescope was able to capture one such event"
19
+ example_title: Wolf 359
20
+ extra_gated_prompt: |-
21
+ This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage.
22
+ The CreativeML OpenRAIL License specifies:
23
+
24
+ 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content
25
+ 2. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license
26
+ 3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully)
27
+ Please read the full license carefully here: https://huggingface.co/spaces/CompVis/stable-diffusion-license
28
+
29
+ extra_gated_heading: Please read the LICENSE to access this model
30
+ thumbnail: ""
31
+ inference: true
32
+ datasets:
33
+ - Supermaxman/esa-hubble
34
  ---
35
+
36
+ # Hubble Diffusion v1: Stable Diffusion v1.4 fine tuned on ESA Hubble Deep Space Images & Captions
37
+
38
+ Put in a detailed text prompt and generate Hubble Deep Space Images!
39
+
40
+ > Hubble captures the death of a star: Old stars, nearing the end of their life, collapse under the
41
+ > weight of their own gravity and the outer layers explode as a 'supernova'. In this image Hubble
42
+ > captures the moments after collapse, where the star has exploded and left an empty void in its
43
+ > place, where a new black hole has emerged.
44
+
45
+ ![old.png](https://github.com/Supermaxman/HubbleDiffuser/blob/02a359c183dc5fb769e8d4d023daf27906e30334/examples/hubble-diffusion-1/old.png?raw=true)
46
+
47
+ > Hubble snaps images of the birthplace of stars within a cluster:
48
+ > The dust and gas expand within the cluster due to the powerful influence of baby stars.
49
+ > With these new images comes improved detail and a clearer view for astronomers to
50
+ > study how early stars are born and change over time.
51
+
52
+ ![baby.png](https://github.com/Supermaxman/HubbleDiffuser/blob/02a359c183dc5fb769e8d4d023daf27906e30334/examples/hubble-diffusion-1/baby.png?raw=true)
53
+
54
+ > Hubble image of galaxies colliding: The distorted spirals of two distant galaxies colliding are
55
+ > captured here in a new image from the NASA/ESA Hubble Space Telescope. The typically symmetric
56
+ > spirals common in spiral galaxies appear significantly warped, as the shape of both galaxies is torn
57
+ > apart by their gravitational pulls.
58
+
59
+ ![collide.png](https://github.com/Supermaxman/HubbleDiffuser/blob/02a359c183dc5fb769e8d4d023daf27906e30334/examples/hubble-diffusion-1/collide.png?raw=true)
60
+
61
+ ## Model Details
62
+
63
+ - **Developed by:** Maxwell Weinzierl
64
+ - **Model type:** Diffusion-based text-to-image generation model
65
+ - **Language(s):** English
66
+ - **License:** [The CreativeML OpenRAIL M license](https://huggingface.co/spaces/CompVis/stable-diffusion-license) is an [Open RAIL M license](https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses), adapted from the work that [BigScience](https://bigscience.huggingface.co/) and [the RAIL Initiative](https://www.licenses.ai/) are jointly carrying in the area of responsible AI licensing. See also [the article about the BLOOM Open RAIL license](https://bigscience.huggingface.co/blog/the-bigscience-rail-license) on which our license is based.
67
+ - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses a fixed, pretrained text encoder ([CLIP ViT-L/14](https://arxiv.org/abs/2103.00020)) as suggested in the [Imagen paper](https://arxiv.org/abs/2205.11487).
68
+ - **Resources for more information:** [GitHub Repository](https://github.com/CompVis/stable-diffusion), [Paper](https://arxiv.org/abs/2112.10752).
69
+ - **Cite as:**
70
+
71
+ @misc{weinzierl2023sdhubble1,
72
+ author = {Weinzierl, Maxwell A.},
73
+ title = {Hubble Diffusion v1: Stable Diffusion v1.4 fine tuned on ESA Hubble Deep Space Images & Captions},
74
+ year={2023},
75
+ howpublished= {\url{https://huggingface.co/Supermaxman/hubble-diffusion-1}}
76
+ }
77
+
78
+ ## Examples
79
+
80
+ We recommend using [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Hubble Diffusion.
81
+
82
+ ### Usage
83
+
84
+ ```bash
85
+ pip install transformers diffusers accelerate
86
+ ```
87
+
88
+ ```python
89
+ import torch
90
+ from diffusers import StableDiffusionPipeline
91
+
92
+ model_id = "Supermaxman/hubble-diffusion-1"
93
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
94
+ pipe = pipe.to("cuda")
95
+ # saves significant GPU memory for small inference cost
96
+ pipe.enable_attention_slicing()
97
+
98
+ prompt = "Hubble snaps images of the birthplace of stars within a cluster: The dust and gas expand within the cluster due to the powerful influence of baby stars. With these new images comes improved detail and a clearer view for astronomers to study how early stars are born and change over time."
99
+ image = pipe(prompt).images[0]
100
+ image
101
+ ```
102
+
103
+ ![example.png](https://github.com/Supermaxman/HubbleDiffuser/blob/ef399e27d09746d5bf16c51b051de04dac072cc2/examples/hubble-diffusion-1/example.png?raw=true)
104
+
105
+ ## Model description
106
+
107
+ Trained on [ESA Hubble Deep Space Images & Captions](https://huggingface.co/datasets/Supermaxman/esa-hubble) using [Google Colab Pro](https://colab.research.google.com/signup) with a single A100 GPU for around 33,000 steps (about 12 hours, at a cost of about $20).
108
+
109
+ ## Links
110
+
111
+ - [Captioned Hubble Deep Space Scans dataset](https://huggingface.co/datasets/Supermaxman/esa-hubble)
112
+ - [Model weights in Diffusers format](https://huggingface.co/Supermaxman/hubble-diffusion-1)
113
+ - [Training code](https://github.com/Supermaxman/HubbleDiffuser)
114
+
115
+ Trained by [Maxwell Weinzierl](https://personal.utdallas.edu/~maxwell.weinzierl/) ([@Supermaxman1](https://twitter.com/Supermaxman1)).
116
+
117
+ ## Citation
118
+
119
+ ```bibtex
120
+ @misc{weinzierl2023sdhubble1,
121
+ author = {Weinzierl, Maxwell A.},
122
+ title = {Hubble Diffusion v1: Stable Diffusion v1.4 fine tuned on ESA Hubble Deep Space Images & Captions},
123
+ year={2023},
124
+ howpublished= {\url{https://huggingface.co/Supermaxman/hubble-diffusion-1}}
125
+ }
126
+ ```