Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -98,12 +98,11 @@ def get_output_embeds(input_embeddings):
|
|
| 98 |
|
| 99 |
#Generating an image with these modified embeddings
|
| 100 |
|
| 101 |
-
def generate_with_embs(text_embeddings,
|
| 102 |
height = 512 # default height of Stable Diffusion
|
| 103 |
width = 512 # default width of Stable Diffusion
|
| 104 |
num_inference_steps = 30 # Number of denoising steps
|
| 105 |
guidance_scale = 7.5 # Scale for classifier-free guidance
|
| 106 |
-
generator = torch.manual_seed(seed) # Seed generator to create the inital latent noise
|
| 107 |
batch_size = 1
|
| 108 |
|
| 109 |
max_length = text_input.input_ids.shape[-1]
|
|
|
|
| 98 |
|
| 99 |
#Generating an image with these modified embeddings
|
| 100 |
|
| 101 |
+
def generate_with_embs(text_embeddings, text_input, generator):
|
| 102 |
height = 512 # default height of Stable Diffusion
|
| 103 |
width = 512 # default width of Stable Diffusion
|
| 104 |
num_inference_steps = 30 # Number of denoising steps
|
| 105 |
guidance_scale = 7.5 # Scale for classifier-free guidance
|
|
|
|
| 106 |
batch_size = 1
|
| 107 |
|
| 108 |
max_length = text_input.input_ids.shape[-1]
|