Supermaxman commited on
Commit
271ae5b
·
1 Parent(s): de1c991

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +127 -0
README.md CHANGED
@@ -1,3 +1,130 @@
1
  ---
2
  license: openrail++
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: openrail++
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
+ thumbnail: ""
21
+ inference: true
22
+ datasets:
23
+ - Supermaxman/esa-hubble
24
  ---
25
+
26
+ # Hubble Diffusion v2: Stable Diffusion v2.1 fine tuned on ESA Hubble Deep Space Images & Captions
27
+
28
+ Put in a detailed text prompt and generate high-quality Hubble Deep Space Images! Now with Stable Diffusion 2.1!
29
+
30
+ > Hubble captures the death of a star: Old stars, nearing the end of their life, collapse under the
31
+ > weight of their own gravity and the outer layers explode as a 'supernova'. In this image Hubble
32
+ > captures the moments after collapse, where the star has exploded and left an empty void in its
33
+ > place, where a new black hole has emerged.
34
+
35
+ ![old.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/old.png?raw=true)
36
+
37
+ > Pink-tinted plumes in the Large Magellanic Cloud:
38
+ > The aggressively pink plumes seen in this image are extremely uncommon,
39
+ > with purple-tinted currents and nebulous strands reaching out into the surrounding space.
40
+
41
+ ![pink.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/pink.png?raw=true)
42
+
43
+ > Hubble snaps images of the birthplace of stars within a cluster:
44
+ > The dust and gas expand within the cluster due to the powerful influence of baby stars.
45
+ > With these new images comes improved detail and a clearer view for astronomers to
46
+ > study how early stars are born and change over time.
47
+
48
+ ![baby.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/baby.png?raw=true)
49
+
50
+ > Hubble image of galaxies colliding: The distorted spirals of two distant galaxies colliding are
51
+ > captured here in a new image from the NASA/ESA Hubble Space Telescope. The typically symmetric
52
+ > spirals common in spiral galaxies appear significantly warped, as the shape of both galaxies is torn
53
+ > apart by their gravitational pulls.
54
+
55
+ ![collide.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/collide.png?raw=true)
56
+
57
+ > 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.
58
+ > 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
59
+
60
+ ![wolf359.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/wolf359.png?raw=true)
61
+
62
+ ## Model Details
63
+
64
+ - **Developed by:** Maxwell Weinzierl
65
+ - **Model type:** Diffusion-based text-to-image generation model
66
+ - **Language(s):** English
67
+ - **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL)
68
+ - **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 ([OpenCLIP-ViT/H](https://github.com/mlfoundations/open_clip)).
69
+ - **Resources for more information:** [GitHub Repository](https://github.com/Stability-AI/).
70
+ - **Cite as:**
71
+
72
+ @misc{weinzierl2023sdhubble2,
73
+ author = {Weinzierl, Maxwell A.},
74
+ title = {Hubble Diffusion v2: Stable Diffusion v2.1 fine tuned on ESA Hubble Deep Space Images & Captions},
75
+ year={2023},
76
+ howpublished= {\url{https://huggingface.co/Supermaxman/hubble-diffusion-2}}
77
+ }
78
+
79
+ Also, be sure to check out the prior version [Hubble Diffusion v1](https://huggingface.co/Supermaxman/hubble-diffusion-1)!
80
+
81
+ ## Examples
82
+
83
+ We recommend using [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Hubble Diffusion.
84
+
85
+ ### Usage
86
+
87
+ ```bash
88
+ pip install transformers diffusers accelerate
89
+ ```
90
+
91
+ ```python
92
+ import torch
93
+ from diffusers import StableDiffusionPipeline
94
+
95
+ model_id = "Supermaxman/hubble-diffusion-2"
96
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
97
+ pipe = pipe.to("cuda")
98
+ # saves significant GPU memory for small inference cost
99
+ pipe.enable_attention_slicing()
100
+
101
+ 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."
102
+ image = pipe(prompt).images[0]
103
+ image
104
+ ```
105
+
106
+ ![example.png](https://github.com/Supermaxman/HubbleDiffuser/blob/f0020b338dc13adfbac9b9e2dfa647a37df5026a/examples/hubble-diffusion-2/example.png?raw=true)
107
+
108
+ ## Model description
109
+
110
+ 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).
111
+
112
+ ## Links
113
+
114
+ - [Captioned Hubble Deep Space Scans dataset](https://huggingface.co/datasets/Supermaxman/esa-hubble)
115
+ - [Model weights in Diffusers format](https://huggingface.co/Supermaxman/hubble-diffusion-2)
116
+ - [Training code](https://github.com/Supermaxman/HubbleDiffuser)
117
+ - [Hubble Diffusion v1](https://huggingface.co/Supermaxman/hubble-diffusion-1)
118
+
119
+ Trained by [Maxwell Weinzierl](https://personal.utdallas.edu/~maxwell.weinzierl/) ([@Supermaxman1](https://twitter.com/Supermaxman1)).
120
+
121
+ ## Citation
122
+
123
+ ```bibtex
124
+ @misc{weinzierl2023sdhubble2,
125
+ author = {Weinzierl, Maxwell A.},
126
+ title = {Hubble Diffusion v2: Stable Diffusion v2.1 fine tuned on ESA Hubble Deep Space Images & Captions},
127
+ year={2023},
128
+ howpublished= {\url{https://huggingface.co/Supermaxman/hubble-diffusion-2}}
129
+ }
130
+ ```